@steedos/odata-v4-mongodb 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/lib/visitor.js +1 -1
- package/package.json +3 -3
- package/tsconfig.json +1 -0
package/lib/index.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates MongoDB collection, query, projection, sort, skip and limit from an OData URI string
|
|
3
|
-
* @param {string} queryString - An OData query string
|
|
4
|
-
* @return {Visitor} Visitor instance object with collection, query, projection, sort, skip and limit
|
|
5
|
-
* @example
|
|
6
|
-
* const query = createQuery("$filter=Size eq 4&$orderby=Orders&$skip=10&$top=5");
|
|
7
|
-
* collections[query.collection].find(query.query).project(query.projection).sort(query.sort).skip(query.skip).limit(query.limit).toArray(function(err, data){ ... });
|
|
8
|
-
*/
|
|
9
1
|
export declare function createQuery(odataQuery: string): any;
|
|
10
2
|
export declare function createQuery(odataQuery: any): any;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a MongoDB query object from an OData filter expression string
|
|
13
|
-
* @param {string} odataFilter - A filter expression in OData $filter format
|
|
14
|
-
* @return {Object} MongoDB query object
|
|
15
|
-
* @example
|
|
16
|
-
* const filter = createFilter("Size eq 4 and Age gt 18");
|
|
17
|
-
* collection.find(filter, function(err, data){ ... });
|
|
18
|
-
*/
|
|
19
3
|
export declare function createFilter(odataFilter: string): any;
|
|
20
4
|
export declare function createFilter(odataFilter: any): any;
|
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 = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* @Author: baozhoutao@steedos.com
|
|
6
|
-
* @Date: 2022-07-10 15:44:34
|
|
7
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
8
|
-
* @LastEditTime: 2022-07-10 17:09:22
|
|
9
|
-
* @Description:
|
|
10
|
-
*/
|
|
11
4
|
var visitor_1 = require("./visitor");
|
|
12
5
|
var odata_v4_parser_1 = require("@steedos/odata-v4-parser");
|
|
13
6
|
function createQuery(odataQuery) {
|
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,qCAAmC;AACnC,4DAAwD;AAYxD,SAAgB,WAAW,CAAC,UAAuB;IAC/C,IAAI,GAAG,GAAY,CAAC,OAAO,UAAU,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAA,uBAAK,EAAS,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC5F,OAAO,IAAI,iBAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAHD,kCAGC;AAYD,SAAgB,YAAY,CAAC,WAAwB;IACjD,IAAI,OAAO,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAY,CAAC,OAAO,WAAW,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAA,wBAAM,EAAS,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAChG,IAAI,iBAAO,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,OAAO,CAAC,KAAK,CAAC;AACzB,CAAC;AALD,oCAKC"}
|
package/lib/visitor.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Visitor = void 0;
|
|
4
4
|
var odata_v4_literal_1 = require("odata-v4-literal");
|
|
5
|
-
var Visitor =
|
|
5
|
+
var Visitor = (function () {
|
|
6
6
|
function Visitor() {
|
|
7
7
|
this.query = {};
|
|
8
8
|
this.sort = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/odata-v4-mongodb",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-beta.4",
|
|
4
4
|
"description": "Service OData requests from a MongoDB data store",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/jaystack/odata-v4-mongodb#readme",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@steedos/odata-v4-parser": "2.
|
|
29
|
+
"@steedos/odata-v4-parser": "2.3.0-beta.4",
|
|
30
30
|
"odata-v4-literal": "^0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"private": false,
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "04dec60fc62988742fcf63181d26f584f5995196"
|
|
37
37
|
}
|