@haverstack/record-adapter-do-sqlite 0.27.0 → 0.28.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/dist/index.d.ts +13 -7
- package/dist/index.js +543 -427
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StackCapabilities, StackRecord,
|
|
2
|
-
import { StackRecordAdapter, JournalOptions, MutateOptions,
|
|
1
|
+
import { StackCapabilities, StackRecord, TypeId, QueryResult, FileId, BaseId, VersionsQuery, RecordVersion, JournalQuery, RecordJournalEntry, StackType, AssociationEdit, DataAssociation, AuthorityAssociation } from '@haverstack/core';
|
|
2
|
+
import { StackRecordAdapter, JournalOptions, MutateOptions, AspectWriteOptions, AdapterQuery, Reach, ElementWriteOptions } from '@haverstack/core/adapter';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Normalizes a SQLite binding's call convention (array-bind-then-step,
|
|
@@ -39,7 +39,7 @@ type StackConfig = {
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* The engine-independent half of a SQLite-backed StackRecordAdapter: the
|
|
42
|
-
* capability declaration and the delegation of all
|
|
42
|
+
* capability declaration and the delegation of all twenty-three
|
|
43
43
|
* StackRecordAdapter methods onto SharedSqlRecordLogic. Every method here
|
|
44
44
|
* is a forward with no engine-specific content, so an adapter that owns a
|
|
45
45
|
* SqlExecutor already knows how to answer all of them.
|
|
@@ -62,15 +62,18 @@ declare abstract class SharedSqlRecordAdapter implements StackRecordAdapter {
|
|
|
62
62
|
protected constructor(exec: SqlExecutor, config: StackConfig);
|
|
63
63
|
createRecord(record: StackRecord, opts?: JournalOptions): Promise<StackRecord>;
|
|
64
64
|
getRecord(id: string): Promise<StackRecord | null>;
|
|
65
|
-
|
|
65
|
+
patchContent(id: string, patch: Record<string, unknown | null>, opts?: MutateOptions): Promise<StackRecord>;
|
|
66
|
+
setParent(id: string, parentId: string | null, opts?: AspectWriteOptions): Promise<StackRecord>;
|
|
67
|
+
setUnlisted(id: string, unlisted: boolean, opts?: AspectWriteOptions): Promise<StackRecord>;
|
|
66
68
|
deleteRecord(id: string, opts?: {
|
|
67
69
|
purge?: boolean;
|
|
68
70
|
} & MutateOptions): Promise<StackRecord | null>;
|
|
69
71
|
undeleteRecord(id: string, opts?: MutateOptions): Promise<StackRecord>;
|
|
70
72
|
restoreVersion(id: string, version: number, opts?: MutateOptions): Promise<StackRecord>;
|
|
71
73
|
commitMigration(id: string, toTypeId: TypeId, content: Record<string, unknown>, opts?: MutateOptions): Promise<StackRecord>;
|
|
72
|
-
queryRecords(query:
|
|
73
|
-
|
|
74
|
+
queryRecords(query: AdapterQuery): Promise<QueryResult>;
|
|
75
|
+
queryReadable(query: AdapterQuery, reach: Reach): Promise<QueryResult>;
|
|
76
|
+
deleteUnreferencedAttachmentRecords(fileId: FileId, metadataBaseId: BaseId): Promise<StackRecord[]>;
|
|
74
77
|
getVersions(id: string, query?: VersionsQuery): Promise<RecordVersion[]>;
|
|
75
78
|
getVersion(id: string, version: number): Promise<RecordVersion | null>;
|
|
76
79
|
saveVersion(id: string, version: RecordVersion): Promise<void>;
|
|
@@ -78,7 +81,10 @@ declare abstract class SharedSqlRecordAdapter implements StackRecordAdapter {
|
|
|
78
81
|
saveType(type: StackType): Promise<void>;
|
|
79
82
|
getType(id: TypeId): Promise<StackType | null>;
|
|
80
83
|
listTypes(): Promise<StackType[]>;
|
|
81
|
-
|
|
84
|
+
editAssociations(id: string, edits: AssociationEdit[], opts?: ElementWriteOptions<DataAssociation>): Promise<StackRecord>;
|
|
85
|
+
setAssociations(id: string, associations: DataAssociation[], opts?: ElementWriteOptions<DataAssociation>): Promise<StackRecord>;
|
|
86
|
+
editAccess(id: string, edits: AssociationEdit[], opts?: ElementWriteOptions<AuthorityAssociation>): Promise<StackRecord>;
|
|
87
|
+
setAccess(id: string, permissions: AuthorityAssociation[], opts?: ElementWriteOptions<AuthorityAssociation>): Promise<StackRecord>;
|
|
82
88
|
abstract flush(): Promise<void>;
|
|
83
89
|
abstract close(): Promise<void>;
|
|
84
90
|
}
|