Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saltcorn/db-common

Package Overview
Dependencies
Maintainers
1
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saltcorn/db-common - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4-beta.1

12

dist/internal.d.ts

@@ -61,8 +61,8 @@ /**

*/
export declare const mkWhere: (whereObj: Where, is_sqlite: boolean, initCount?: number) => WhereAndVals;
export declare const mkWhere: (whereObj: Where, is_sqlite?: boolean, initCount?: number) => WhereAndVals;
export declare type CoordOpts = {
latField: string;
longField: string;
lat: string;
long: string;
latField: number | string;
longField: number | string;
lat: number | string;
long: number | string;
};

@@ -103,3 +103,3 @@ export declare type SelectOptions = {

field: string;
where?: string;
where?: Where;
aggregate: string;

@@ -106,0 +106,0 @@ subselect?: SubselectOptions;

@@ -200,3 +200,3 @@ "use strict";

*/
const mkWhere = (whereObj, is_sqlite, initCount = 0) => {
const mkWhere = (whereObj, is_sqlite = false, initCount = 0) => {
const wheres = whereObj ? Object.entries(whereObj) : [];

@@ -233,3 +233,3 @@ //console.log({ wheres });

const cos_lat_2 = Math.pow(Math.cos((+lat * Math.PI) / 180), 2);
return `((${(0, exports.sqlsanitizeAllowDots)(latField)} - ${+lat})*(${(0, exports.sqlsanitizeAllowDots)(latField)} - ${+lat})) + ((${(0, exports.sqlsanitizeAllowDots)(longField)} - ${+long})*(${(0, exports.sqlsanitizeAllowDots)(longField)} - ${+long})*${cos_lat_2})`;
return `((${(0, exports.sqlsanitizeAllowDots)(`${latField}`)} - ${+lat})*(${(0, exports.sqlsanitizeAllowDots)(`${latField}`)} - ${+lat})) + ((${(0, exports.sqlsanitizeAllowDots)(`${longField}`)} - ${+long})*(${(0, exports.sqlsanitizeAllowDots)(`${longField}`)} - ${+long})*${cos_lat_2})`;
};

@@ -236,0 +236,0 @@ const orderByIsObject = (object) => {

@@ -26,4 +26,4 @@ /**

*/
export declare const runWithTenant: (tenant: string, f: () => any) => any;
export declare const runWithTenant: <Type>(tenant: string, f: () => Promise<Type>) => Promise<Type>;
export declare const getTenantSchema: () => string;
//# sourceMappingURL=multi-tenant.d.ts.map

@@ -27,3 +27,3 @@ /**

*/
export declare const runWithTenant: (t: string, f: () => any) => any;
export declare const runWithTenant: <Type>(t: string, f: () => Promise<Type>) => Promise<Type>;
//# sourceMappingURL=single-tenant.d.ts.map
{
"name": "@saltcorn/db-common",
"version": "0.6.3",
"version": "0.6.4-beta.1",
"description": "Db common structures for Saltcorn, open-source no-code platform",

@@ -5,0 +5,0 @@ "homepage": "https://saltcorn.com",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc