mocody 0.2.15 → 0.2.16
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/LICENSE +21 -21
- package/README.md +4 -4
- package/dist/core/base-schema.d.ts +13 -13
- package/dist/core/base-schema.js +11 -11
- package/dist/core/base-schema.js.map +1 -1
- package/dist/couch/couch-data-operation.d.ts +90 -90
- package/dist/couch/couch-data-operation.js +581 -581
- package/dist/couch/couch-data-operation.js.map +1 -1
- package/dist/couch/couch-filter-query-operation.d.ts +47 -47
- package/dist/couch/couch-filter-query-operation.js +438 -438
- package/dist/couch/couch-initializer.d.ts +45 -45
- package/dist/couch/couch-initializer.js +98 -98
- package/dist/couch/couch-initializer.js.map +1 -1
- package/dist/couch/couch-manage-table.d.ts +46 -46
- package/dist/couch/couch-manage-table.js +113 -113
- package/dist/dynamo/dynamo-data-operation.d.ts +97 -97
- package/dist/dynamo/dynamo-data-operation.js +788 -793
- package/dist/dynamo/dynamo-data-operation.js.map +1 -1
- package/dist/dynamo/dynamo-filter-query-operation.d.ts +28 -28
- package/dist/dynamo/dynamo-filter-query-operation.js +627 -627
- package/dist/dynamo/dynamo-helper.d.ts +1 -1
- package/dist/dynamo/dynamo-helper.js +8 -8
- package/dist/dynamo/dynamo-initializer.d.ts +14 -8
- package/dist/dynamo/dynamo-initializer.js +58 -34
- package/dist/dynamo/dynamo-initializer.js.map +1 -1
- package/dist/dynamo/dynamo-manage-table.d.ts +33 -32
- package/dist/dynamo/dynamo-manage-table.js +419 -418
- package/dist/dynamo/dynamo-manage-table.js.map +1 -1
- package/dist/dynamo/dynamo-query-scan-processor.d.ts +25 -24
- package/dist/dynamo/dynamo-query-scan-processor.js +268 -266
- package/dist/dynamo/dynamo-query-scan-processor.js.map +1 -1
- package/dist/helpers/base-joi-helper.d.ts +2 -2
- package/dist/helpers/base-joi-helper.js +12 -12
- package/dist/helpers/constants.d.ts +3 -3
- package/dist/helpers/constants.js +6 -6
- package/dist/helpers/errors.d.ts +13 -13
- package/dist/helpers/errors.js +38 -38
- package/dist/helpers/logging-service.d.ts +8 -8
- package/dist/helpers/logging-service.js +44 -44
- package/dist/helpers/mocody-utils.d.ts +13 -15
- package/dist/helpers/mocody-utils.js +48 -48
- package/dist/helpers/query-validator.d.ts +20 -20
- package/dist/helpers/query-validator.js +84 -84
- package/dist/helpers/util-service.d.ts +29 -29
- package/dist/helpers/util-service.js +155 -155
- package/dist/index.d.ts +10 -10
- package/dist/index.js +19 -19
- package/dist/model/index.d.ts +40 -40
- package/dist/model/index.js +6 -6
- package/dist/mongo/mongo-data-operation.d.ts +88 -88
- package/dist/mongo/mongo-data-operation.js +597 -597
- package/dist/mongo/mongo-data-operation.js.map +1 -1
- package/dist/mongo/mongo-filter-query-operation.d.ts +47 -47
- package/dist/mongo/mongo-filter-query-operation.js +433 -433
- package/dist/mongo/mongo-initializer.d.ts +16 -16
- package/dist/mongo/mongo-initializer.js +47 -47
- package/dist/mongo/mongo-initializer.js.map +1 -1
- package/dist/mongo/mongo-table-manager.d.ts +31 -31
- package/dist/mongo/mongo-table-manager.js +104 -104
- package/dist/type/index.d.ts +108 -108
- package/dist/type/index.js +2 -2
- package/package.json +70 -72
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Chris Uzoh
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Chris Uzoh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## mocody
|
|
2
|
-
Implementation of single table design, and unified query access for MongoDB, CouchDB, and dynamoDB.
|
|
3
|
-
|
|
4
|
-
## Caution: This project is still experimental! Do NOT use in production.
|
|
1
|
+
## mocody
|
|
2
|
+
Implementation of single table design, and unified query access for MongoDB, CouchDB, and dynamoDB.
|
|
3
|
+
|
|
4
|
+
## Caution: This project is still experimental! Do NOT use in production.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Joi from "joi";
|
|
2
|
-
export interface IMocodyCoreEntityModel {
|
|
3
|
-
id: string;
|
|
4
|
-
featureEntity: string;
|
|
5
|
-
dangerouslyExpireAt?: string;
|
|
6
|
-
dangerouslyExpireAtTTL?: string | number | Date;
|
|
7
|
-
}
|
|
8
|
-
export declare const coreSchemaDefinition: {
|
|
9
|
-
readonly id: Joi.StringSchema;
|
|
10
|
-
readonly featureEntity: Joi.StringSchema;
|
|
11
|
-
readonly dangerouslyExpireAt: readonly [Joi.StringSchema, Joi.AnySchema<any>];
|
|
12
|
-
readonly dangerouslyExpireAtTTL: Joi.AnySchema<any>;
|
|
13
|
-
};
|
|
1
|
+
import Joi from "joi";
|
|
2
|
+
export interface IMocodyCoreEntityModel {
|
|
3
|
+
id: string;
|
|
4
|
+
featureEntity: string;
|
|
5
|
+
dangerouslyExpireAt?: string;
|
|
6
|
+
dangerouslyExpireAtTTL?: string | number | Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const coreSchemaDefinition: {
|
|
9
|
+
readonly id: Joi.StringSchema;
|
|
10
|
+
readonly featureEntity: Joi.StringSchema;
|
|
11
|
+
readonly dangerouslyExpireAt: readonly [Joi.StringSchema, Joi.AnySchema<any>];
|
|
12
|
+
readonly dangerouslyExpireAtTTL: Joi.AnySchema<any>;
|
|
13
|
+
};
|
package/dist/core/base-schema.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coreSchemaDefinition = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const joi_1 =
|
|
6
|
-
exports.coreSchemaDefinition = {
|
|
7
|
-
id: joi_1.default.string().required().min(5).max(512),
|
|
8
|
-
featureEntity: joi_1.default.string().required().min(2).max(256),
|
|
9
|
-
dangerouslyExpireAt: [joi_1.default.string().isoDate().strict(false), joi_1.default.any().strip()],
|
|
10
|
-
dangerouslyExpireAtTTL: joi_1.default.any().strip(),
|
|
11
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.coreSchemaDefinition = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
6
|
+
exports.coreSchemaDefinition = {
|
|
7
|
+
id: joi_1.default.string().required().min(5).max(512),
|
|
8
|
+
featureEntity: joi_1.default.string().required().min(2).max(256),
|
|
9
|
+
dangerouslyExpireAt: [joi_1.default.string().isoDate().strict(false), joi_1.default.any().strip()],
|
|
10
|
+
dangerouslyExpireAtTTL: joi_1.default.any().strip(),
|
|
11
|
+
};
|
|
12
12
|
//# sourceMappingURL=base-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-schema.js","sourceRoot":"","sources":["../../src/core/base-schema.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"base-schema.js","sourceRoot":"","sources":["../../src/core/base-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAYT,QAAA,oBAAoB,GAAG;IAClC,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC3C,aAAa,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtD,mBAAmB,EAAE,CAAC,aAAG,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9E,sBAAsB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;CACjC,CAAC"}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { IMocodyFieldCondition, IMocodyIndexDefinition, IMocodyPagingResult, IMocodyPreparedTransaction, IMocodyQueryIndexOptions, IMocodyQueryIndexOptionsNoPaging, IMocodyTransactionPrepare } from "../type";
|
|
2
|
-
import { RepoModel } from "../model";
|
|
3
|
-
import Joi from "joi";
|
|
4
|
-
import type { MocodyInitializerCouch } from "./couch-initializer";
|
|
5
|
-
import { CouchManageTable } from "./couch-manage-table";
|
|
6
|
-
interface IOptions<T> {
|
|
7
|
-
schemaDef: Joi.SchemaMap;
|
|
8
|
-
couchDbInitializer: () => MocodyInitializerCouch;
|
|
9
|
-
dataKeyGenerator: () => string;
|
|
10
|
-
featureEntityValue: string;
|
|
11
|
-
secondaryIndexOptions: IMocodyIndexDefinition<T>[];
|
|
12
|
-
baseTableName: string;
|
|
13
|
-
strictRequiredFields: (keyof T)[] | string[];
|
|
14
|
-
}
|
|
15
|
-
export declare class CouchDataOperation<T> extends RepoModel<T> implements RepoModel<T> {
|
|
16
|
-
private readonly _mocody_partitionKeyFieldName;
|
|
17
|
-
private readonly _mocody_sortKeyFieldName;
|
|
18
|
-
private readonly _mocody_operationNotSuccessful;
|
|
19
|
-
private readonly _mocody_entityFieldsKeySet;
|
|
20
|
-
private readonly _mocody_couchDb;
|
|
21
|
-
private readonly _mocody_dataKeyGenerator;
|
|
22
|
-
private readonly _mocody_schema;
|
|
23
|
-
private readonly _mocody_tableFullName;
|
|
24
|
-
private readonly _mocody_strictRequiredFields;
|
|
25
|
-
private readonly _mocody_featureEntityValue;
|
|
26
|
-
private readonly _mocody_secondaryIndexOptions;
|
|
27
|
-
private readonly _mocody_errorHelper;
|
|
28
|
-
private readonly _mocody_filterQueryOperation;
|
|
29
|
-
private _mocody_tableManager;
|
|
30
|
-
constructor({ schemaDef, couchDbInitializer, secondaryIndexOptions, featureEntityValue, baseTableName, strictRequiredFields, dataKeyGenerator, }: IOptions<T>);
|
|
31
|
-
mocody_tableManager(): CouchManageTable<T>;
|
|
32
|
-
private _mocody_generateDynamoTableKey;
|
|
33
|
-
private _mocody_couchDbInstance;
|
|
34
|
-
private _mocody_getLocalVariables;
|
|
35
|
-
private _mocody_getProjectionFields;
|
|
36
|
-
private _mocody_stripNonRequiredOutputData;
|
|
37
|
-
private _mocody_getNativePouchId;
|
|
38
|
-
private _mocody_getBaseObject;
|
|
39
|
-
private _mocody_withConditionPassed;
|
|
40
|
-
private _mocody_checkValidateMustBeAnObjectDataType;
|
|
41
|
-
private _mocody_checkValidateStrictRequiredFields;
|
|
42
|
-
private _mocody_removeDuplicateString;
|
|
43
|
-
private _mocody_allHelpValidateGetValue;
|
|
44
|
-
private _mocody_createGenericError;
|
|
45
|
-
mocody_createOne({ data }: {
|
|
46
|
-
data: T;
|
|
47
|
-
}): Promise<T>;
|
|
48
|
-
mocody_formatForDump({ dataList }: {
|
|
49
|
-
dataList: T[];
|
|
50
|
-
}): Promise<string[]>;
|
|
51
|
-
mocody_validateFormatData({ data }: {
|
|
52
|
-
data: T;
|
|
53
|
-
}): Promise<string>;
|
|
54
|
-
private _mocody_validateReady;
|
|
55
|
-
mocody_getAll({ size, skip }?: {
|
|
56
|
-
size?: number;
|
|
57
|
-
skip?: number;
|
|
58
|
-
}): Promise<T[]>;
|
|
59
|
-
mocody_getOneById({ dataId, withCondition, }: {
|
|
60
|
-
dataId: string;
|
|
61
|
-
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
62
|
-
}): Promise<T | null>;
|
|
63
|
-
mocody_updateOne({ dataId, updateData, withCondition, }: {
|
|
64
|
-
dataId: string;
|
|
65
|
-
updateData: Partial<T>;
|
|
66
|
-
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
67
|
-
}): Promise<T>;
|
|
68
|
-
mocody_prepareTransaction({ transactPrepareInfo, }: {
|
|
69
|
-
transactPrepareInfo: IMocodyTransactionPrepare<T>[];
|
|
70
|
-
}): Promise<IMocodyPreparedTransaction[]>;
|
|
71
|
-
mocody_executeTransaction({ transactInfo }: {
|
|
72
|
-
transactInfo: IMocodyPreparedTransaction[];
|
|
73
|
-
}): Promise<void>;
|
|
74
|
-
mocody_getManyByIds({ dataIds, fields, excludeFields, withCondition, }: {
|
|
75
|
-
dataIds: string[];
|
|
76
|
-
fields?: (keyof T)[];
|
|
77
|
-
excludeFields?: (keyof T)[];
|
|
78
|
-
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
79
|
-
}): Promise<T[]>;
|
|
80
|
-
mocody_getManyByIndex<TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptionsNoPaging<TData, TSortKeyField>): Promise<TData[]>;
|
|
81
|
-
mocody_getManyByIndexPaginate<TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptions<TData, TSortKeyField>): Promise<IMocodyPagingResult<TData[]>>;
|
|
82
|
-
mocody_getManyWithRelation<TQuery = T, TData = T, TSortKeyField = string>(paramOption: Omit<IMocodyQueryIndexOptions<TQuery, TSortKeyField>, "pagingParams">): Promise<TData[]>;
|
|
83
|
-
mocody_getManyWithRelationPaginate<TQuery = T, TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptions<TQuery, TSortKeyField>): Promise<IMocodyPagingResult<TData[]>>;
|
|
84
|
-
private _mocody_getManyBySecondaryIndexPaginateBase;
|
|
85
|
-
mocody_deleteById({ dataId, withCondition, }: {
|
|
86
|
-
dataId: string;
|
|
87
|
-
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
88
|
-
}): Promise<T>;
|
|
89
|
-
}
|
|
90
|
-
export {};
|
|
1
|
+
import { IMocodyFieldCondition, IMocodyIndexDefinition, IMocodyPagingResult, IMocodyPreparedTransaction, IMocodyQueryIndexOptions, IMocodyQueryIndexOptionsNoPaging, IMocodyTransactionPrepare } from "../type";
|
|
2
|
+
import { RepoModel } from "../model";
|
|
3
|
+
import Joi from "joi";
|
|
4
|
+
import type { MocodyInitializerCouch } from "./couch-initializer";
|
|
5
|
+
import { CouchManageTable } from "./couch-manage-table";
|
|
6
|
+
interface IOptions<T> {
|
|
7
|
+
schemaDef: Joi.SchemaMap;
|
|
8
|
+
couchDbInitializer: () => MocodyInitializerCouch;
|
|
9
|
+
dataKeyGenerator: () => string;
|
|
10
|
+
featureEntityValue: string;
|
|
11
|
+
secondaryIndexOptions: IMocodyIndexDefinition<T>[];
|
|
12
|
+
baseTableName: string;
|
|
13
|
+
strictRequiredFields: (keyof T)[] | string[];
|
|
14
|
+
}
|
|
15
|
+
export declare class CouchDataOperation<T> extends RepoModel<T> implements RepoModel<T> {
|
|
16
|
+
private readonly _mocody_partitionKeyFieldName;
|
|
17
|
+
private readonly _mocody_sortKeyFieldName;
|
|
18
|
+
private readonly _mocody_operationNotSuccessful;
|
|
19
|
+
private readonly _mocody_entityFieldsKeySet;
|
|
20
|
+
private readonly _mocody_couchDb;
|
|
21
|
+
private readonly _mocody_dataKeyGenerator;
|
|
22
|
+
private readonly _mocody_schema;
|
|
23
|
+
private readonly _mocody_tableFullName;
|
|
24
|
+
private readonly _mocody_strictRequiredFields;
|
|
25
|
+
private readonly _mocody_featureEntityValue;
|
|
26
|
+
private readonly _mocody_secondaryIndexOptions;
|
|
27
|
+
private readonly _mocody_errorHelper;
|
|
28
|
+
private readonly _mocody_filterQueryOperation;
|
|
29
|
+
private _mocody_tableManager;
|
|
30
|
+
constructor({ schemaDef, couchDbInitializer, secondaryIndexOptions, featureEntityValue, baseTableName, strictRequiredFields, dataKeyGenerator, }: IOptions<T>);
|
|
31
|
+
mocody_tableManager(): CouchManageTable<T>;
|
|
32
|
+
private _mocody_generateDynamoTableKey;
|
|
33
|
+
private _mocody_couchDbInstance;
|
|
34
|
+
private _mocody_getLocalVariables;
|
|
35
|
+
private _mocody_getProjectionFields;
|
|
36
|
+
private _mocody_stripNonRequiredOutputData;
|
|
37
|
+
private _mocody_getNativePouchId;
|
|
38
|
+
private _mocody_getBaseObject;
|
|
39
|
+
private _mocody_withConditionPassed;
|
|
40
|
+
private _mocody_checkValidateMustBeAnObjectDataType;
|
|
41
|
+
private _mocody_checkValidateStrictRequiredFields;
|
|
42
|
+
private _mocody_removeDuplicateString;
|
|
43
|
+
private _mocody_allHelpValidateGetValue;
|
|
44
|
+
private _mocody_createGenericError;
|
|
45
|
+
mocody_createOne({ data }: {
|
|
46
|
+
data: T;
|
|
47
|
+
}): Promise<T>;
|
|
48
|
+
mocody_formatForDump({ dataList }: {
|
|
49
|
+
dataList: T[];
|
|
50
|
+
}): Promise<string[]>;
|
|
51
|
+
mocody_validateFormatData({ data }: {
|
|
52
|
+
data: T;
|
|
53
|
+
}): Promise<string>;
|
|
54
|
+
private _mocody_validateReady;
|
|
55
|
+
mocody_getAll({ size, skip }?: {
|
|
56
|
+
size?: number;
|
|
57
|
+
skip?: number;
|
|
58
|
+
}): Promise<T[]>;
|
|
59
|
+
mocody_getOneById({ dataId, withCondition, }: {
|
|
60
|
+
dataId: string;
|
|
61
|
+
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
62
|
+
}): Promise<T | null>;
|
|
63
|
+
mocody_updateOne({ dataId, updateData, withCondition, }: {
|
|
64
|
+
dataId: string;
|
|
65
|
+
updateData: Partial<T>;
|
|
66
|
+
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
67
|
+
}): Promise<T>;
|
|
68
|
+
mocody_prepareTransaction({ transactPrepareInfo, }: {
|
|
69
|
+
transactPrepareInfo: IMocodyTransactionPrepare<T>[];
|
|
70
|
+
}): Promise<IMocodyPreparedTransaction[]>;
|
|
71
|
+
mocody_executeTransaction({ transactInfo }: {
|
|
72
|
+
transactInfo: IMocodyPreparedTransaction[];
|
|
73
|
+
}): Promise<void>;
|
|
74
|
+
mocody_getManyByIds({ dataIds, fields, excludeFields, withCondition, }: {
|
|
75
|
+
dataIds: string[];
|
|
76
|
+
fields?: (keyof T)[];
|
|
77
|
+
excludeFields?: (keyof T)[];
|
|
78
|
+
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
79
|
+
}): Promise<T[]>;
|
|
80
|
+
mocody_getManyByIndex<TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptionsNoPaging<TData, TSortKeyField>): Promise<TData[]>;
|
|
81
|
+
mocody_getManyByIndexPaginate<TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptions<TData, TSortKeyField>): Promise<IMocodyPagingResult<TData[]>>;
|
|
82
|
+
mocody_getManyWithRelation<TQuery = T, TData = T, TSortKeyField = string>(paramOption: Omit<IMocodyQueryIndexOptions<TQuery, TSortKeyField>, "pagingParams">): Promise<TData[]>;
|
|
83
|
+
mocody_getManyWithRelationPaginate<TQuery = T, TData = T, TSortKeyField = string>(paramOption: IMocodyQueryIndexOptions<TQuery, TSortKeyField>): Promise<IMocodyPagingResult<TData[]>>;
|
|
84
|
+
private _mocody_getManyBySecondaryIndexPaginateBase;
|
|
85
|
+
mocody_deleteById({ dataId, withCondition, }: {
|
|
86
|
+
dataId: string;
|
|
87
|
+
withCondition?: IMocodyFieldCondition<T> | undefined;
|
|
88
|
+
}): Promise<T>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|