@undefineds.co/xpod 0.3.25 → 0.3.27
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/config/cloud.json +6 -5
- package/config/main.json +0 -3
- package/config/xpod.base.json +0 -32
- package/dist/api/container/index.js +3 -0
- package/dist/api/container/index.js.map +1 -1
- package/dist/api/container/routes.js +2 -0
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +5 -0
- package/dist/api/container/types.js.map +1 -1
- package/dist/authorization/AuthMode.d.ts +8 -0
- package/dist/authorization/AuthMode.js +51 -0
- package/dist/authorization/AuthMode.js.map +1 -0
- package/dist/authorization/PodAuthorizationResources.d.ts +18 -0
- package/dist/authorization/PodAuthorizationResources.js +108 -0
- package/dist/authorization/PodAuthorizationResources.js.map +1 -0
- package/dist/cli/commands/start.js +11 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/components/components.jsonld +3 -2
- package/dist/components/context.jsonld +115 -14
- package/dist/index.d.ts +5 -3
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/main.js +11 -2
- package/dist/main.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.d.ts +6 -2
- package/dist/provision/LocalPodProvisioningService.js +36 -33
- package/dist/provision/LocalPodProvisioningService.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.jsonld +65 -8
- package/dist/runtime/XpodRuntime.js +0 -1
- package/dist/runtime/XpodRuntime.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +4 -2
- package/dist/runtime/bootstrap.js +43 -11
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/css-process.d.ts +6 -1
- package/dist/runtime/css-process.js +18 -6
- package/dist/runtime/css-process.js.map +1 -1
- package/dist/runtime/lifecycle.d.ts +2 -3
- package/dist/runtime/lifecycle.js +2 -2
- package/dist/runtime/lifecycle.js.map +1 -1
- package/dist/runtime/runtime-types.d.ts +2 -1
- package/dist/runtime/runtime-types.js.map +1 -1
- package/dist/storage/accessors/SolidRdfDataAccessor.d.ts +2 -3
- package/dist/storage/accessors/SolidRdfDataAccessor.js +48 -42
- package/dist/storage/accessors/SolidRdfDataAccessor.js.map +1 -1
- package/dist/storage/accessors/SolidRdfDataAccessor.jsonld +1 -1
- package/dist/storage/keyvalue/BaseKeyValueStorage.d.ts +33 -0
- package/dist/storage/keyvalue/BaseKeyValueStorage.js +106 -0
- package/dist/storage/keyvalue/BaseKeyValueStorage.js.map +1 -0
- package/dist/storage/keyvalue/BaseKeyValueStorage.jsonld +177 -0
- package/dist/storage/keyvalue/PostgresKeyValueStorage.d.ts +9 -18
- package/dist/storage/keyvalue/PostgresKeyValueStorage.js +24 -96
- package/dist/storage/keyvalue/PostgresKeyValueStorage.js.map +1 -1
- package/dist/storage/keyvalue/PostgresKeyValueStorage.jsonld +15 -58
- package/dist/storage/keyvalue/SqliteKeyValueStorage.d.ts +9 -15
- package/dist/storage/keyvalue/SqliteKeyValueStorage.js +36 -104
- package/dist/storage/keyvalue/SqliteKeyValueStorage.js.map +1 -1
- package/dist/storage/keyvalue/SqliteKeyValueStorage.jsonld +21 -52
- package/dist/storage/quint/BaseQuintStore.d.ts +4 -1
- package/dist/storage/quint/BaseQuintStore.js +41 -52
- package/dist/storage/quint/BaseQuintStore.js.map +1 -1
- package/dist/storage/quint/PgQuintStore.d.ts +4 -3
- package/dist/storage/quint/PgQuintStore.js.map +1 -1
- package/dist/storage/quint/SqliteQuintStore.d.ts +43 -54
- package/dist/storage/quint/SqliteQuintStore.js +197 -520
- package/dist/storage/quint/SqliteQuintStore.js.map +1 -1
- package/dist/storage/quint/SqliteQuintStore.jsonld +38 -86
- package/dist/storage/rdf/PostgresRdfEngine.d.ts +118 -0
- package/dist/storage/rdf/PostgresRdfEngine.js +2609 -0
- package/dist/storage/rdf/PostgresRdfEngine.js.map +1 -0
- package/dist/storage/rdf/PostgresRdfEngine.jsonld +657 -0
- package/dist/storage/rdf/SolidRdfEngine.d.ts +2 -2
- package/dist/storage/rdf/SolidRdfEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.jsonld +3 -0
- package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +3 -3
- package/dist/storage/rdf/SolidRdfSparqlEngine.js +20 -20
- package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +1 -1
- package/dist/storage/rdf/index.d.ts +2 -1
- package/dist/storage/rdf/index.js +3 -1
- package/dist/storage/rdf/index.js.map +1 -1
- package/dist/storage/rdf/types.d.ts +19 -0
- package/dist/storage/rdf/types.js.map +1 -1
- package/dist/storage/rdf/types.jsonld +115 -0
- package/package.json +2 -2
- package/config/runtime-open.json +0 -22
- package/dist/authorization/AuthModeSelector.d.ts +0 -10
- package/dist/authorization/AuthModeSelector.js +0 -27
- package/dist/authorization/AuthModeSelector.js.map +0 -1
- package/dist/authorization/AuthModeSelector.jsonld +0 -81
|
@@ -1,67 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SqliteQuintStore - SQLite implementation of QuintStore using Drizzle ORM
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
4
|
+
import { BaseQuintStore, type QuintRow, type SqlExecutor } from './BaseQuintStore';
|
|
5
|
+
import type { NewQuintRow } from './schema';
|
|
6
|
+
import type { QuintStoreOptions, StoreStats, QuintPattern, QueryOptions, Quint, TermMatch } from './types';
|
|
7
|
+
import { type PredicateObjectDataType } from './value-types';
|
|
8
|
+
interface SqliteIndexedQuintRow extends NewQuintRow {
|
|
9
|
+
graph: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
predicate: string;
|
|
12
|
+
object: string;
|
|
13
|
+
vector: string | null;
|
|
14
|
+
objectKind: PredicateObjectDataType;
|
|
15
|
+
objectKey: string | null;
|
|
16
|
+
objectText: string | null;
|
|
17
|
+
objectDigest: string | null;
|
|
18
|
+
}
|
|
7
19
|
export interface SqliteQuintStoreOptions extends QuintStoreOptions {
|
|
8
20
|
/** SQLite database file path, use ':memory:' for in-memory database */
|
|
9
21
|
path: string;
|
|
10
22
|
}
|
|
11
|
-
export declare class SqliteQuintStore {
|
|
23
|
+
export declare class SqliteQuintStore extends BaseQuintStore {
|
|
12
24
|
private sqlite;
|
|
13
|
-
private db;
|
|
14
|
-
private options;
|
|
15
25
|
private readonly sqliteRuntime;
|
|
26
|
+
private readonly path;
|
|
16
27
|
constructor(options: SqliteQuintStoreOptions);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* Compound query - multiple patterns JOINed by a common field
|
|
25
|
-
* This executes a single SQL query with JOINs, letting SQLite optimize the execution plan
|
|
26
|
-
*/
|
|
27
|
-
getCompound(compound: CompoundPattern, options?: QueryOptions): Promise<CompoundResult[]>;
|
|
28
|
-
/**
|
|
29
|
-
* 批量获取多个 subject 的多个属性
|
|
30
|
-
*
|
|
31
|
-
* 用于优化 OPTIONAL 查询:避免每个 OPTIONAL 变成一次 LEFT JOIN
|
|
32
|
-
*
|
|
33
|
-
* SQL: SELECT subject, predicate, object FROM quints
|
|
34
|
-
* WHERE subject IN (...) AND predicate IN (...)
|
|
35
|
-
*/
|
|
36
|
-
getAttributes(subjects: string[], predicates: string[], graph?: Term): Promise<Map<string, Map<string, Term[]>>>;
|
|
37
|
-
/**
|
|
38
|
-
* Build SQL for compound query with JOINs
|
|
39
|
-
*/
|
|
40
|
-
private buildCompoundSQL;
|
|
41
|
-
/**
|
|
42
|
-
* Build WHERE conditions for a specific table alias
|
|
43
|
-
*/
|
|
44
|
-
private buildConditionsForAlias;
|
|
45
|
-
put(quint: Quint): Promise<void>;
|
|
46
|
-
multiPut(quintList: Quint[]): Promise<void>;
|
|
47
|
-
updateEmbedding(pattern: QuintPattern, embedding: number[]): Promise<number>;
|
|
48
|
-
del(pattern: QuintPattern): Promise<number>;
|
|
49
|
-
multiDel(quintList: Quint[]): Promise<void>;
|
|
28
|
+
protected createExecutor(): Promise<SqlExecutor>;
|
|
29
|
+
protected closeExecutor(): Promise<void>;
|
|
30
|
+
protected openOnce(): Promise<void>;
|
|
31
|
+
protected buildSelectQuery(pattern: QuintPattern, options?: QueryOptions): {
|
|
32
|
+
sql: string;
|
|
33
|
+
params: any[];
|
|
34
|
+
};
|
|
50
35
|
stats(): Promise<StoreStats>;
|
|
36
|
+
clear(): Promise<void>;
|
|
37
|
+
private ensureTypedObjectSchema;
|
|
38
|
+
private addColumnIfMissing;
|
|
39
|
+
private createTypedObjectIndexes;
|
|
40
|
+
private backfillMissingObjectIndexFields;
|
|
51
41
|
private sqliteSpaceStats;
|
|
52
42
|
private estimateDatabaseBytes;
|
|
53
43
|
private collectSpaceObjects;
|
|
54
44
|
private estimateSpaceObjectsFromSchema;
|
|
55
45
|
private estimatePageSize;
|
|
56
|
-
|
|
57
|
-
private
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
private objectIndexForSerialized;
|
|
47
|
+
private objectDigestForIndex;
|
|
48
|
+
protected resolveObjectDataTypeForPattern(pattern: QuintPattern): PredicateObjectDataType | undefined;
|
|
49
|
+
protected buildWhereClause(pattern: QuintPattern): {
|
|
50
|
+
whereClause: string;
|
|
51
|
+
params: any[];
|
|
52
|
+
};
|
|
53
|
+
protected addTermConditions(conditions: string[], params: any[], column: string, match: TermMatch | undefined, isObject: boolean): void;
|
|
54
|
+
protected addAliasedConditions(conditions: string[], params: any[], alias: string, pattern: QuintPattern): void;
|
|
65
55
|
private addObjectConditions;
|
|
66
56
|
private addObjectExactCondition;
|
|
67
57
|
private addObjectExactValueCondition;
|
|
@@ -74,14 +64,13 @@ export declare class SqliteQuintStore {
|
|
|
74
64
|
private objectPredicateForOperatorValue;
|
|
75
65
|
private objectFieldsForOperatorValue;
|
|
76
66
|
private objectIndexForTerm;
|
|
77
|
-
private objectIndexForSerialized;
|
|
78
67
|
private objectFieldsForPrefix;
|
|
79
|
-
private objectDigestForIndex;
|
|
80
68
|
private assertComparableObject;
|
|
81
|
-
private extractExactPredicate;
|
|
82
|
-
private resolveObjectDataTypeForPattern;
|
|
83
69
|
private predicateForIndex;
|
|
70
|
+
put(quint: Quint): Promise<void>;
|
|
71
|
+
multiPut(quintList: Quint[]): Promise<void>;
|
|
84
72
|
private writeStatementForRow;
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
protected quintToRow(quint: Quint): SqliteIndexedQuintRow;
|
|
74
|
+
protected rowToQuint(row: QuintRow): Quint;
|
|
87
75
|
}
|
|
76
|
+
export {};
|