@steedos/odata-v4-sql 2.2.55-beta.9 → 2.3.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +0 -16
- package/lib/index.js +0 -7
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/tsconfig.json +2 -1
package/lib/index.d.ts
CHANGED
|
@@ -5,26 +5,10 @@ export interface SqlOptions {
|
|
|
5
5
|
useParameters?: boolean;
|
|
6
6
|
type?: SQLLang;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates an SQL query descriptor from an OData query string
|
|
10
|
-
* @param {string} odataQuery - An OData query string
|
|
11
|
-
* @return {string} SQL query descriptor
|
|
12
|
-
* @example
|
|
13
|
-
* const filter = createQuery("$filter=Size eq 4 and Age gt 18");
|
|
14
|
-
* let sqlQuery = `SELECT * FROM table WHERE ${filter.where}`;
|
|
15
|
-
*/
|
|
16
8
|
export declare function createQuery(odataQuery: string, options?: SqlOptions): Visitor;
|
|
17
9
|
export declare function createQuery(odataQuery: string, options?: SqlOptions, type?: SQLLang): Visitor;
|
|
18
10
|
export declare function createQuery(odataQuery: Token, options?: SqlOptions): Visitor;
|
|
19
11
|
export declare function createQuery(odataQuery: Token, options?: SqlOptions, type?: SQLLang): Visitor;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an SQL WHERE clause from an OData filter expression string
|
|
22
|
-
* @param {string} odataFilter - A filter expression in OData $filter format
|
|
23
|
-
* @return {string} SQL WHERE clause
|
|
24
|
-
* @example
|
|
25
|
-
* const filter = createFilter("Size eq 4 and Age gt 18");
|
|
26
|
-
* let sqlQuery = `SELECT * FROM table WHERE ${filter}`;
|
|
27
|
-
*/
|
|
28
12
|
export declare function createFilter(odataFilter: string, options?: SqlOptions): Visitor;
|
|
29
13
|
export declare function createFilter(odataFilter: string, options?: SqlOptions, type?: SQLLang): Visitor;
|
|
30
14
|
export declare function createFilter(odataFilter: Token, options?: SqlOptions): Visitor;
|
package/lib/index.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFilter = exports.createQuery = exports.SQLLang = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* @Author: baozhoutao@steedos.com
|
|
6
|
-
* @Date: 2022-07-05 15:03:38
|
|
7
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
8
|
-
* @LastEditTime: 2022-07-10 15:53:06
|
|
9
|
-
* @Description:
|
|
10
|
-
*/
|
|
11
4
|
const visitor_1 = require("./visitor");
|
|
12
5
|
var visitor_2 = require("./visitor");
|
|
13
6
|
Object.defineProperty(exports, "SQLLang", { enumerable: true, get: function () { return visitor_2.SQLLang; } });
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAOA,uCAA6C;AAC7C,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,8DAAyD;AAoBzD,SAAgB,WAAW,CAAC,UAAyB,EAAE,UAAsB,EAAE,EAAE,IAAa;IAC1F,IAAI,OAAO,IAAI,IAAI,WAAW,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAC5D,IAAI,GAAG,GAAgB,CAAC,OAAO,UAAU,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAA,uBAAK,EAAS,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAChG,OAAO,IAAI,iBAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACpD,CAAC;AAJD,kCAIC;AAcD,SAAgB,YAAY,CAAC,WAA0B,EAAE,UAAsB,EAAE,EAAE,IAAa;IAC5F,IAAI,OAAO,IAAI,IAAI,WAAW,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAC5D,IAAI,GAAG,GAAgB,CAAC,OAAO,WAAW,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAA,wBAAM,EAAS,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACpG,OAAO,IAAI,iBAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACpD,CAAC;AAJD,oCAIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/odata-v4-sql",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-beta.4",
|
|
4
4
|
"description": "OData to SQL query compiler",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/jaystack/odata-v4-sql#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@steedos/odata-v4-parser": "2.
|
|
30
|
+
"@steedos/odata-v4-parser": "2.3.0-beta.4",
|
|
31
31
|
"odata-v4-literal": "^0.1.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "4.6.3"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "04dec60fc62988742fcf63181d26f584f5995196"
|
|
40
40
|
}
|