@qrvey/data-persistence 0.0.2-2 → 0.0.2-3
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.
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildSort = exports.buildQueryIndex = exports.buildFilter = void 0;
|
|
4
4
|
const constants_1 = require("../utils/constants");
|
|
5
|
-
function buildFilter(attribute, value, operator = 'EQUAL') {
|
|
5
|
+
function buildFilter(attribute, value, operator = 'EQUAL', { omitPrimary = false } = {}) {
|
|
6
6
|
return {
|
|
7
7
|
attribute,
|
|
8
8
|
operator,
|
|
9
9
|
value,
|
|
10
|
+
omitPrimary,
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
exports.buildFilter = buildFilter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crudHelpers.js","sourceRoot":"","sources":["../../../src/helpers/crudHelpers.ts"],"names":[],"mappings":";;;AAEA,kDAAqD;AAErD,SAAgB,WAAW,CACvB,SAAiB,EACjB,KAAa,EACb,QAAQ,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"crudHelpers.js","sourceRoot":"","sources":["../../../src/helpers/crudHelpers.ts"],"names":[],"mappings":";;;AAEA,kDAAqD;AAErD,SAAgB,WAAW,CACvB,SAAiB,EACjB,KAAa,EACb,QAAQ,GAAG,OAAO,EAClB,EAAE,WAAW,GAAG,KAAK,EAAE,GAAG,EAAE;IAE5B,OAAO;QACH,SAAS;QACT,QAAQ;QACR,KAAK;QACL,WAAW;KACd,CAAC;AACN,CAAC;AAZD,kCAYC;AAED,SAAgB,eAAe,CAAC,SAAiB,EAAE,OAAiB;IAChE,OAAO;QACH,SAAS;QACT,OAAO;KACV,CAAC;AACN,CAAC;AALD,0CAKC;AAED,SAAgB,SAAS,CACrB,MAAc,EACd,YAA2B,2BAAe,CAAC,GAAG;IAE9C,OAAO;QACH,MAAM;QACN,SAAS;KACZ,CAAC;AACN,CAAC;AARD,8BAQC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ declare class CrudService<T> {
|
|
|
89
89
|
attribute: string;
|
|
90
90
|
operator: string;
|
|
91
91
|
value: string;
|
|
92
|
+
omitPrimary: boolean;
|
|
92
93
|
};
|
|
93
94
|
buildQueryIndex(indexName: string, columns: string[]): {
|
|
94
95
|
indexName: string;
|
|
@@ -97,10 +98,13 @@ declare class CrudService<T> {
|
|
|
97
98
|
buildSort(column: string, direction: SortDirection): ISorting;
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
declare function buildFilter(attribute: string, value: string, operator?: string
|
|
101
|
+
declare function buildFilter(attribute: string, value: string, operator?: string, { omitPrimary }?: {
|
|
102
|
+
omitPrimary?: boolean | undefined;
|
|
103
|
+
}): {
|
|
101
104
|
attribute: string;
|
|
102
105
|
operator: string;
|
|
103
106
|
value: string;
|
|
107
|
+
omitPrimary: boolean;
|
|
104
108
|
};
|
|
105
109
|
declare function buildQueryIndex(indexName: string, columns: string[]): {
|
|
106
110
|
indexName: string;
|