@imbricate/core 3.10.1 → 3.12.0
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/database/base-class/essential-readonly.d.ts +18 -0
- package/database/base-class/essential-readonly.js +29 -0
- package/database/base-class/essential.d.ts +18 -0
- package/database/base-class/essential.js +36 -0
- package/database/base-class/exclude-annotation.d.ts +16 -0
- package/database/base-class/exclude-annotation.js +32 -0
- package/database/base-class/exclude-edit-records.d.ts +15 -0
- package/database/base-class/exclude-edit-records.js +31 -0
- package/database/base-class/full-feature-readonly.d.ts +21 -0
- package/database/base-class/full-feature-readonly.js +39 -0
- package/database/base-class/full-feature.d.ts +29 -0
- package/database/base-class/full-feature.js +24 -0
- package/database/definition.d.ts +15 -0
- package/database/feature.d.ts +16 -0
- package/database/feature.js +23 -0
- package/database/interface.d.ts +64 -30
- package/database/outcome.d.ts +58 -0
- package/database/outcome.js +28 -0
- package/document/base-class/essential-readonly.d.ts +17 -0
- package/document/base-class/essential-readonly.js +25 -0
- package/document/base-class/essential.d.ts +18 -0
- package/document/base-class/essential.js +33 -0
- package/document/base-class/exclude-annotation.d.ts +16 -0
- package/document/base-class/exclude-annotation.js +29 -0
- package/document/base-class/exclude-edit-records.d.ts +15 -0
- package/document/base-class/exclude-edit-records.js +28 -0
- package/document/base-class/full-feature-readonly.d.ts +19 -0
- package/document/base-class/full-feature-readonly.js +35 -0
- package/document/base-class/full-feature.d.ts +23 -0
- package/document/base-class/full-feature.js +21 -0
- package/document/feature.d.ts +13 -0
- package/document/feature.js +20 -0
- package/document/interface.d.ts +41 -22
- package/document/outcome.d.ts +32 -0
- package/document/outcome.js +19 -0
- package/document/property/default-value.js +3 -3
- package/document/property.d.ts +1 -1
- package/document/validate.js +21 -6
- package/error/database/database-error.d.ts +9 -0
- package/error/database/database-error.js +16 -0
- package/error/database/feature-not-supported.d.ts +12 -0
- package/error/database/feature-not-supported.js +19 -0
- package/error/document/document-error.d.ts +9 -0
- package/error/document/document-error.js +16 -0
- package/error/document/feature-not-supported.d.ts +12 -0
- package/error/document/feature-not-supported.js +20 -0
- package/error/imbricate-error.d.ts +14 -0
- package/error/imbricate-error.js +27 -0
- package/index.d.ts +15 -0
- package/index.js +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Essential Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentProperties } from "../../document/property";
|
|
7
|
+
import { ImbricateDatabaseAuditOptions } from "../definition";
|
|
8
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
9
|
+
import { IImbricateDatabase } from "../interface";
|
|
10
|
+
import { ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "../outcome";
|
|
11
|
+
import { ImbricateDatabaseSchema } from "../schema";
|
|
12
|
+
import { ImbricateDatabaseEssentialBase } from "./essential";
|
|
13
|
+
export declare abstract class ImbricateDatabaseEssentialReadOnlyBase extends ImbricateDatabaseEssentialBase implements IImbricateDatabase {
|
|
14
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
15
|
+
putSchema(_schema: ImbricateDatabaseSchema, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
|
|
16
|
+
createDocument(_properties: DocumentProperties, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
|
|
17
|
+
removeDocument(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Essential Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseEssentialReadOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const essential_1 = require("./essential");
|
|
12
|
+
class ImbricateDatabaseEssentialReadOnlyBase extends essential_1.ImbricateDatabaseEssentialBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
putSchema(_schema, _auditOptions) {
|
|
20
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA);
|
|
21
|
+
}
|
|
22
|
+
createDocument(_properties, _auditOptions) {
|
|
23
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT);
|
|
24
|
+
}
|
|
25
|
+
removeDocument(_uniqueIdentifier, _auditOptions) {
|
|
26
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ImbricateDatabaseEssentialReadOnlyBase = ImbricateDatabaseEssentialReadOnlyBase;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Essential
|
|
5
|
+
*/
|
|
6
|
+
import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions } from "../definition";
|
|
7
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDatabase } from "../interface";
|
|
9
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabaseGetEditRecordsOutcome, ImbricateDatabasePutAnnotationOutcome } from "../outcome";
|
|
10
|
+
import { ImbricateDatabaseFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateDatabaseEssentialBase extends ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
|
|
12
|
+
readonly annotations: DatabaseAnnotations;
|
|
13
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
14
|
+
putAnnotation(_namespace: string, _identifier: string, _value: DatabaseAnnotationValue, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
15
|
+
deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
16
|
+
addEditRecords(_records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
17
|
+
getEditRecords(): PromiseLike<ImbricateDatabaseGetEditRecordsOutcome>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Essential
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseEssentialBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDatabaseEssentialBase extends full_feature_1.ImbricateDatabaseFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.annotations = {};
|
|
16
|
+
this.supportedFeatures = [
|
|
17
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA,
|
|
18
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT,
|
|
19
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT,
|
|
20
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
putAnnotation(_namespace, _identifier, _value, _auditOptions) {
|
|
24
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_ANNOTATION);
|
|
25
|
+
}
|
|
26
|
+
deleteAnnotation(_namespace, _identifier, _auditOptions) {
|
|
27
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_ANNOTATION);
|
|
28
|
+
}
|
|
29
|
+
addEditRecords(_records) {
|
|
30
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_EDIT_RECORD);
|
|
31
|
+
}
|
|
32
|
+
getEditRecords() {
|
|
33
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_EDIT_RECORD);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ImbricateDatabaseEssentialBase = ImbricateDatabaseEssentialBase;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Exclude Annotation
|
|
5
|
+
*/
|
|
6
|
+
import { DatabaseAnnotationValue, DatabaseAnnotations, ImbricateDatabaseAuditOptions } from "../definition";
|
|
7
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDatabase } from "../interface";
|
|
9
|
+
import { ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabasePutAnnotationOutcome } from "../outcome";
|
|
10
|
+
import { ImbricateDatabaseFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateDatabaseExcludeAnnotationBase extends ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
|
|
12
|
+
readonly annotations: DatabaseAnnotations;
|
|
13
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
14
|
+
putAnnotation(_namespace: string, _identifier: string, _value: DatabaseAnnotationValue, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
15
|
+
deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Exclude Annotation
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseExcludeAnnotationBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDatabaseExcludeAnnotationBase extends full_feature_1.ImbricateDatabaseFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.annotations = {};
|
|
16
|
+
this.supportedFeatures = [
|
|
17
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA,
|
|
18
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT,
|
|
19
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT,
|
|
20
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
21
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_EDIT_RECORD,
|
|
22
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_EDIT_RECORD,
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
putAnnotation(_namespace, _identifier, _value, _auditOptions) {
|
|
26
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_ANNOTATION);
|
|
27
|
+
}
|
|
28
|
+
deleteAnnotation(_namespace, _identifier, _auditOptions) {
|
|
29
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_ANNOTATION);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ImbricateDatabaseExcludeAnnotationBase = ImbricateDatabaseExcludeAnnotationBase;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Exclude Edit Records
|
|
5
|
+
*/
|
|
6
|
+
import { DatabaseEditRecord } from "../definition";
|
|
7
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDatabase } from "../interface";
|
|
9
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseGetEditRecordsOutcome } from "../outcome";
|
|
10
|
+
import { ImbricateDatabaseFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateDatabaseExcludeEditRecordsBase extends ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
|
|
12
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
13
|
+
addEditRecords(_records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
14
|
+
getEditRecords(): PromiseLike<ImbricateDatabaseGetEditRecordsOutcome>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Exclude Edit Records
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseExcludeEditRecordsBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDatabaseExcludeEditRecordsBase extends full_feature_1.ImbricateDatabaseFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA,
|
|
17
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT,
|
|
18
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT,
|
|
19
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
20
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_ANNOTATION,
|
|
21
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_ANNOTATION,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
addEditRecords(_records) {
|
|
25
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_EDIT_RECORD);
|
|
26
|
+
}
|
|
27
|
+
getEditRecords() {
|
|
28
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_EDIT_RECORD);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.ImbricateDatabaseExcludeEditRecordsBase = ImbricateDatabaseExcludeEditRecordsBase;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database_BaseClass
|
|
4
|
+
* @description Full Feature Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentProperties } from "../../document/property";
|
|
7
|
+
import { DatabaseAnnotationValue, DatabaseEditRecord, ImbricateDatabaseAuditOptions } from "../definition";
|
|
8
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
9
|
+
import { IImbricateDatabase } from "../interface";
|
|
10
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabasePutAnnotationOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "../outcome";
|
|
11
|
+
import { ImbricateDatabaseSchema } from "../schema";
|
|
12
|
+
import { ImbricateDatabaseFullFeatureBase } from "./full-feature";
|
|
13
|
+
export declare abstract class ImbricateDatabaseFullFeatureReadOnlyBase extends ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
|
|
14
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
15
|
+
putSchema(_schema: ImbricateDatabaseSchema, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
|
|
16
|
+
createDocument(_properties: DocumentProperties, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
|
|
17
|
+
removeDocument(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
|
|
18
|
+
putAnnotation(_namespace: string, _identifier: string, _value: DatabaseAnnotationValue, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
19
|
+
deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
20
|
+
addEditRecords(_records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database_BaseClass
|
|
5
|
+
* @description Full Feature Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseFullFeatureReadOnlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDatabaseFullFeatureReadOnlyBase extends full_feature_1.ImbricateDatabaseFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
17
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_EDIT_RECORD,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
putSchema(_schema, _auditOptions) {
|
|
21
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA);
|
|
22
|
+
}
|
|
23
|
+
createDocument(_properties, _auditOptions) {
|
|
24
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT);
|
|
25
|
+
}
|
|
26
|
+
removeDocument(_uniqueIdentifier, _auditOptions) {
|
|
27
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT);
|
|
28
|
+
}
|
|
29
|
+
putAnnotation(_namespace, _identifier, _value, _auditOptions) {
|
|
30
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_ANNOTATION);
|
|
31
|
+
}
|
|
32
|
+
deleteAnnotation(_namespace, _identifier, _auditOptions) {
|
|
33
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_ANNOTATION);
|
|
34
|
+
}
|
|
35
|
+
addEditRecords(_records) {
|
|
36
|
+
throw feature_not_supported_1.ImbricateDatabaseFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_EDIT_RECORD);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ImbricateDatabaseFullFeatureReadOnlyBase = ImbricateDatabaseFullFeatureReadOnlyBase;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database_BaseClass
|
|
4
|
+
* @description Full Feature
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentProperties } from "../../document/property";
|
|
7
|
+
import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "../definition";
|
|
8
|
+
import { IMBRICATE_DATABASE_FEATURE } from "../feature";
|
|
9
|
+
import { IImbricateDatabase } from "../interface";
|
|
10
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseCountDocumentsOutcome, ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabaseGetDocumentOutcome, ImbricateDatabaseGetEditRecordsOutcome, ImbricateDatabasePutAnnotationOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseQueryDocumentsOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "../outcome";
|
|
11
|
+
import { ImbricateDatabaseSchema } from "../schema";
|
|
12
|
+
export declare abstract class ImbricateDatabaseFullFeatureBase implements IImbricateDatabase {
|
|
13
|
+
abstract readonly uniqueIdentifier: string;
|
|
14
|
+
abstract readonly databaseName: string;
|
|
15
|
+
abstract readonly databaseVersion: string;
|
|
16
|
+
abstract readonly schema: ImbricateDatabaseSchema;
|
|
17
|
+
abstract readonly annotations: DatabaseAnnotations;
|
|
18
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
19
|
+
abstract putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
|
|
20
|
+
abstract createDocument(properties: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
|
|
21
|
+
abstract getDocument(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseGetDocumentOutcome>;
|
|
22
|
+
abstract queryDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseQueryDocumentsOutcome>;
|
|
23
|
+
abstract countDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseCountDocumentsOutcome>;
|
|
24
|
+
abstract removeDocument(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
|
|
25
|
+
abstract putAnnotation(namespace: string, identifier: string, value: DatabaseAnnotationValue, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
26
|
+
abstract deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
27
|
+
abstract addEditRecords(records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
28
|
+
abstract getEditRecords(): PromiseLike<ImbricateDatabaseGetEditRecordsOutcome>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database_BaseClass
|
|
5
|
+
* @description Full Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateDatabaseFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.supportedFeatures = [
|
|
13
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_SCHEMA,
|
|
14
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_CREATE_DOCUMENT,
|
|
15
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_DOCUMENT,
|
|
16
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_ANNOTATION,
|
|
17
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_DELETE_ANNOTATION,
|
|
18
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_DOCUMENT,
|
|
19
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_PUT_EDIT_RECORD,
|
|
20
|
+
feature_1.IMBRICATE_DATABASE_FEATURE.DATABASE_GET_EDIT_RECORD,
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ImbricateDatabaseFullFeatureBase = ImbricateDatabaseFullFeatureBase;
|
package/database/definition.d.ts
CHANGED
|
@@ -60,10 +60,16 @@ export type DatabaseEditOperationDeleteAnnotation = {
|
|
|
60
60
|
readonly annotationIdentifier: string;
|
|
61
61
|
};
|
|
62
62
|
export type DatabaseEditOperationValue<T extends IMBRICATE_DATABASE_EDIT_TYPE> = T extends IMBRICATE_DATABASE_EDIT_TYPE.PUT_SCHEMA ? ImbricateDatabaseSchema : T extends IMBRICATE_DATABASE_EDIT_TYPE.PUT_ANNOTATION ? DatabaseEditOperationPutAnnotation : T extends IMBRICATE_DATABASE_EDIT_TYPE.DELETE_ANNOTATION ? DatabaseEditOperationDeleteAnnotation : never;
|
|
63
|
+
/**
|
|
64
|
+
* Edit operation of the database
|
|
65
|
+
*/
|
|
63
66
|
export type DatabaseEditOperation<T extends IMBRICATE_DATABASE_EDIT_TYPE> = {
|
|
64
67
|
readonly action: T;
|
|
65
68
|
readonly value: DatabaseEditOperationValue<T>;
|
|
66
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* Edit record of the database
|
|
72
|
+
*/
|
|
67
73
|
export type DatabaseEditRecord = {
|
|
68
74
|
readonly uniqueIdentifier: string;
|
|
69
75
|
readonly editAt: Date;
|
|
@@ -72,8 +78,17 @@ export type DatabaseEditRecord = {
|
|
|
72
78
|
readonly operations: Array<DatabaseEditOperation<IMBRICATE_DATABASE_EDIT_TYPE>>;
|
|
73
79
|
readonly author?: ImbricateAuthor;
|
|
74
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Annotations of the database
|
|
83
|
+
*/
|
|
75
84
|
export type DatabaseAnnotations = Record<DatabaseAnnotationKey, DatabaseAnnotationValue>;
|
|
85
|
+
/**
|
|
86
|
+
* Annotation key of the database
|
|
87
|
+
*/
|
|
76
88
|
export type DatabaseAnnotationKey = string;
|
|
89
|
+
/**
|
|
90
|
+
* Annotation value of the database
|
|
91
|
+
*/
|
|
77
92
|
export type DatabaseAnnotationValue = {
|
|
78
93
|
readonly namespace: string;
|
|
79
94
|
readonly identifier: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_DATABASE_FEATURE {
|
|
7
|
+
DATABASE_PUT_SCHEMA = "DATABASE_PUT_SCHEMA",
|
|
8
|
+
DATABASE_CREATE_DOCUMENT = "DATABASE_CREATE_DOCUMENT",
|
|
9
|
+
DATABASE_DELETE_DOCUMENT = "DATABASE_DELETE_DOCUMENT",
|
|
10
|
+
DATABASE_GET_DOCUMENT = "DATABASE_GET_DOCUMENT",
|
|
11
|
+
DATABASE_PUT_ANNOTATION = "DATABASE_PUT_ANNOTATION",
|
|
12
|
+
DATABASE_DELETE_ANNOTATION = "DATABASE_DELETE_ANNOTATION",
|
|
13
|
+
DATABASE_PUT_EDIT_RECORD = "DATABASE_PUT_EDIT_RECORD",
|
|
14
|
+
DATABASE_GET_EDIT_RECORD = "DATABASE_GET_EDIT_RECORD"
|
|
15
|
+
}
|
|
16
|
+
export declare const checkImbricateDatabaseFeatureSupported: (features: IMBRICATE_DATABASE_FEATURE[], feature: IMBRICATE_DATABASE_FEATURE) => boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateDatabaseFeatureSupported = exports.IMBRICATE_DATABASE_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_DATABASE_FEATURE;
|
|
10
|
+
(function (IMBRICATE_DATABASE_FEATURE) {
|
|
11
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_PUT_SCHEMA"] = "DATABASE_PUT_SCHEMA";
|
|
12
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_CREATE_DOCUMENT"] = "DATABASE_CREATE_DOCUMENT";
|
|
13
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_DELETE_DOCUMENT"] = "DATABASE_DELETE_DOCUMENT";
|
|
14
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_GET_DOCUMENT"] = "DATABASE_GET_DOCUMENT";
|
|
15
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_PUT_ANNOTATION"] = "DATABASE_PUT_ANNOTATION";
|
|
16
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_DELETE_ANNOTATION"] = "DATABASE_DELETE_ANNOTATION";
|
|
17
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_PUT_EDIT_RECORD"] = "DATABASE_PUT_EDIT_RECORD";
|
|
18
|
+
IMBRICATE_DATABASE_FEATURE["DATABASE_GET_EDIT_RECORD"] = "DATABASE_GET_EDIT_RECORD";
|
|
19
|
+
})(IMBRICATE_DATABASE_FEATURE || (exports.IMBRICATE_DATABASE_FEATURE = IMBRICATE_DATABASE_FEATURE = {}));
|
|
20
|
+
const checkImbricateDatabaseFeatureSupported = (features, feature) => {
|
|
21
|
+
return features.includes(feature);
|
|
22
|
+
};
|
|
23
|
+
exports.checkImbricateDatabaseFeatureSupported = checkImbricateDatabaseFeatureSupported;
|
package/database/interface.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* @namespace Database
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
|
-
import { IImbricateDocument } from "../document/interface";
|
|
7
6
|
import { DocumentProperties } from "../document/property";
|
|
8
7
|
import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "./definition";
|
|
8
|
+
import { IMBRICATE_DATABASE_FEATURE } from "./feature";
|
|
9
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseCountDocumentsOutcome, ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabaseGetDocumentOutcome, ImbricateDatabaseGetEditRecordsOutcome, ImbricateDatabasePutAnnotationOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseQueryDocumentsOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "./outcome";
|
|
9
10
|
import { ImbricateDatabaseSchema } from "./schema";
|
|
10
11
|
export interface IImbricateDatabase {
|
|
11
12
|
/**
|
|
@@ -17,9 +18,9 @@ export interface IImbricateDatabase {
|
|
|
17
18
|
*/
|
|
18
19
|
readonly databaseName: string;
|
|
19
20
|
/**
|
|
20
|
-
* Version of the database
|
|
21
|
+
* Version of the database
|
|
21
22
|
*/
|
|
22
|
-
readonly databaseVersion:
|
|
23
|
+
readonly databaseVersion: string;
|
|
23
24
|
/**
|
|
24
25
|
* Schema of the database
|
|
25
26
|
*/
|
|
@@ -28,100 +29,133 @@ export interface IImbricateDatabase {
|
|
|
28
29
|
* Annotations of the database
|
|
29
30
|
*/
|
|
30
31
|
readonly annotations: DatabaseAnnotations;
|
|
32
|
+
/**
|
|
33
|
+
* Supported features of the database
|
|
34
|
+
*/
|
|
35
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_FEATURE[];
|
|
31
36
|
/**
|
|
32
37
|
* Put and replace the schema of the database
|
|
33
38
|
* Existing documents will still be kept, and stays unchanged
|
|
34
39
|
*
|
|
40
|
+
* RequireFeature: DATABASE_PUT_SCHEMA
|
|
41
|
+
*
|
|
35
42
|
* @param schema schema of the database
|
|
36
43
|
* @param auditOptions audit options of the database
|
|
37
44
|
*
|
|
38
|
-
* @returns a promise of the
|
|
39
|
-
*
|
|
40
|
-
* If you do not want to add the edit record, set `noEditRecord` to true
|
|
45
|
+
* @returns a promise of the outcome of the put schema
|
|
46
|
+
* Symbol: S_PutSchema_VersionConflict - if the version conflict
|
|
41
47
|
*/
|
|
42
|
-
putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
48
|
+
putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
|
|
43
49
|
/**
|
|
44
50
|
* Create a new document in the database
|
|
45
51
|
* If origin supports Document Edit Record, the edit record will be added by default
|
|
46
52
|
*
|
|
53
|
+
* RequireFeature: DATABASE_CREATE_DOCUMENT
|
|
54
|
+
*
|
|
47
55
|
* @param properties properties of the document
|
|
48
56
|
* @param auditOptions audit options of the document
|
|
49
57
|
*
|
|
50
|
-
* @returns a promise of the
|
|
58
|
+
* @returns a promise of the outcome of the create document
|
|
59
|
+
* Symbol: S_CreateDocument_IdentifierDuplicated - if the identifier is duplicated
|
|
51
60
|
*/
|
|
52
|
-
createDocument(properties: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
61
|
+
createDocument(properties: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
|
|
53
62
|
/**
|
|
54
63
|
* Get one document from the database
|
|
55
64
|
*
|
|
65
|
+
* RequireFeature: DATABASE_GET_DOCUMENT
|
|
66
|
+
*
|
|
56
67
|
* @param uniqueIdentifier unique identifier of the document
|
|
57
68
|
*
|
|
58
|
-
* @returns a promise of the
|
|
69
|
+
* @returns a promise of the outcome of the get document
|
|
70
|
+
* Symbol: S_GetDocument_NotFound - if the document is not found
|
|
59
71
|
*/
|
|
60
|
-
getDocument(uniqueIdentifier: string): PromiseLike<
|
|
72
|
+
getDocument(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseGetDocumentOutcome>;
|
|
61
73
|
/**
|
|
62
74
|
* Query documents from the database
|
|
63
75
|
*
|
|
76
|
+
* RequireFeature: DATABASE_QUERY_DOCUMENT
|
|
77
|
+
*
|
|
64
78
|
* @param query query of the documents
|
|
65
79
|
*
|
|
66
|
-
* @returns a promise of the
|
|
80
|
+
* @returns a promise of the outcome of the query documents
|
|
81
|
+
* Symbol: S_QueryDocuments_Stale - if the documents are stale
|
|
67
82
|
*/
|
|
68
|
-
queryDocuments(query: ImbricateDocumentQuery): PromiseLike<
|
|
83
|
+
queryDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseQueryDocumentsOutcome>;
|
|
69
84
|
/**
|
|
70
85
|
* Count documents in the database
|
|
71
86
|
*
|
|
87
|
+
* RequireFeature: DATABASE_COUNT_DOCUMENT
|
|
88
|
+
*
|
|
72
89
|
* @param query query of the documents
|
|
73
90
|
*
|
|
74
|
-
* @returns a promise of the
|
|
91
|
+
* @returns a promise of the outcome of the count documents
|
|
92
|
+
* Symbol: S_CountDocuments_Stale - if the documents are stale
|
|
75
93
|
*/
|
|
76
|
-
countDocuments(query: ImbricateDocumentQuery): PromiseLike<
|
|
94
|
+
countDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseCountDocumentsOutcome>;
|
|
77
95
|
/**
|
|
78
96
|
* Remove a document from the database
|
|
79
97
|
*
|
|
98
|
+
* RequireFeature: DATABASE_DELETE_DOCUMENT
|
|
99
|
+
*
|
|
80
100
|
* @param uniqueIdentifier unique identifier of the document
|
|
81
101
|
* @param auditOptions audit options of the document
|
|
102
|
+
*
|
|
103
|
+
* @returns a promise of the outcome of the remove document
|
|
104
|
+
* Symbol: S_RemoveDocument_NotFound - if the document is not found
|
|
82
105
|
*/
|
|
83
|
-
removeDocument(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
106
|
+
removeDocument(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
|
|
84
107
|
/**
|
|
85
|
-
*
|
|
108
|
+
* Put annotation to the database
|
|
109
|
+
*
|
|
110
|
+
* RequireFeature: DATABASE_PUT_ANNOTATION
|
|
86
111
|
*
|
|
87
112
|
* @param namespace namespace of the annotation
|
|
88
113
|
* @param identifier identifier of the annotation
|
|
89
114
|
* @param value value of the annotation
|
|
90
115
|
* @param auditOptions audit options of the database
|
|
91
116
|
*
|
|
92
|
-
* @returns a promise of the
|
|
93
|
-
*
|
|
94
|
-
*
|
|
117
|
+
* @returns a promise of the outcome of the put annotation
|
|
118
|
+
* Symbol: S_PutAnnotation_InvalidNamespace - if the namespace is invalid
|
|
119
|
+
* Symbol: S_PutAnnotation_InvalidIdentifier - if the identifier is invalid
|
|
95
120
|
*/
|
|
96
|
-
putAnnotation(namespace: string, identifier: string, value: DatabaseAnnotationValue, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
121
|
+
putAnnotation(namespace: string, identifier: string, value: DatabaseAnnotationValue, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
97
122
|
/**
|
|
98
123
|
* Delete annotation from the database
|
|
99
124
|
*
|
|
125
|
+
* RequireFeature: DATABASE_DELETE_ANNOTATION
|
|
126
|
+
*
|
|
100
127
|
* @param namespace namespace of the annotation
|
|
101
128
|
* @param identifier identifier of the annotation
|
|
102
129
|
* @param auditOptions audit options of the database
|
|
103
130
|
*
|
|
104
|
-
* @returns a promise of the
|
|
105
|
-
*
|
|
106
|
-
* If you do not want to add the edit record, set `noEditRecord` to true in audit options
|
|
131
|
+
* @returns a promise of the outcome of the delete annotation
|
|
132
|
+
* Symbol: S_DeleteAnnotation_NotFound - if the annotation is not found
|
|
107
133
|
*/
|
|
108
|
-
deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
134
|
+
deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
109
135
|
/**
|
|
110
|
-
* Add edit records to the database
|
|
136
|
+
* Add edit records to the database
|
|
111
137
|
* This method is optional, if not implemented, means the origin
|
|
112
138
|
* 1. The origin does not support edit records
|
|
113
139
|
* 2. The origin force to add edit records when put properties
|
|
114
140
|
*
|
|
141
|
+
* RequireFeature: DATABASE_PUT_EDIT_RECORD
|
|
142
|
+
*
|
|
115
143
|
* @param records database edit records
|
|
144
|
+
*
|
|
145
|
+
* @returns a promise of the outcome of the add edit records
|
|
146
|
+
* Symbol: S_AddEditRecords_InvalidEditRecord - if the edit record is invalid
|
|
116
147
|
*/
|
|
117
|
-
addEditRecords
|
|
148
|
+
addEditRecords(records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
118
149
|
/**
|
|
119
|
-
* Get edit records of the database
|
|
150
|
+
* Get edit records of the database
|
|
120
151
|
* This method is optional, if not implemented, means the origin
|
|
121
152
|
* 1. The origin does not support edit records
|
|
122
153
|
* 2. The origin force to add edit records when put properties
|
|
123
154
|
*
|
|
124
|
-
*
|
|
155
|
+
* RequireFeature: DATABASE_GET_EDIT_RECORD
|
|
156
|
+
*
|
|
157
|
+
* @returns a promise of the outcome of the get edit records
|
|
158
|
+
* Symbol: S_GetEditRecords_NotFound - if the edit records are not found
|
|
125
159
|
*/
|
|
126
|
-
getEditRecords
|
|
160
|
+
getEditRecords(): PromiseLike<ImbricateDatabaseGetEditRecordsOutcome>;
|
|
127
161
|
}
|