@undefineds.co/xpod 0.2.43 → 0.2.45
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/components/context.jsonld +45 -0
- package/dist/runtime/configure-drizzle-solid.js +52 -0
- package/dist/runtime/configure-drizzle-solid.js.map +1 -1
- package/dist/storage/quint/BaseQuintStore.jsonld +82 -0
- package/dist/storage/quint/PgQuintStore.d.ts +49 -3
- package/dist/storage/quint/PgQuintStore.js +677 -31
- package/dist/storage/quint/PgQuintStore.js.map +1 -1
- package/dist/storage/quint/PgQuintStore.jsonld +226 -0
- package/dist/storage/quint/SqliteQuintStore.d.ts +1 -0
- package/dist/storage/quint/SqliteQuintStore.js +52 -0
- package/dist/storage/quint/SqliteQuintStore.js.map +1 -1
- package/dist/storage/quint/SqliteQuintStore.jsonld +86 -0
- package/dist/storage/quint/index.d.ts +1 -0
- package/dist/storage/quint/index.js +1 -0
- package/dist/storage/quint/index.js.map +1 -1
- package/dist/storage/quint/types.d.ts +19 -0
- package/dist/storage/quint/types.js.map +1 -1
- package/dist/storage/quint/value-types.d.ts +32 -0
- package/dist/storage/quint/value-types.js +100 -0
- package/dist/storage/quint/value-types.js.map +1 -0
- package/dist/storage/sparql/FilterPushdownExtractor.js +23 -11
- package/dist/storage/sparql/FilterPushdownExtractor.js.map +1 -1
- package/dist/util/identifiers/ClusterIdentifierStrategy.js +29 -1
- package/dist/util/identifiers/ClusterIdentifierStrategy.js.map +1 -1
- package/package.json +1 -1
- package/scripts/patch-jose.js +62 -12
|
@@ -1497,11 +1497,25 @@
|
|
|
1497
1497
|
"options_debug": {
|
|
1498
1498
|
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_debug"
|
|
1499
1499
|
},
|
|
1500
|
+
"options_predicateObjectDataTypes": {
|
|
1501
|
+
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_predicateObjectDataTypes",
|
|
1502
|
+
"@container": "@list"
|
|
1503
|
+
},
|
|
1504
|
+
"options_textMaxBytes": {
|
|
1505
|
+
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_textMaxBytes"
|
|
1506
|
+
},
|
|
1500
1507
|
"path": {
|
|
1501
1508
|
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_path"
|
|
1502
1509
|
},
|
|
1503
1510
|
"debug": {
|
|
1504
1511
|
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_debug"
|
|
1512
|
+
},
|
|
1513
|
+
"predicateObjectDataTypes": {
|
|
1514
|
+
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_predicateObjectDataTypes",
|
|
1515
|
+
"@container": "@list"
|
|
1516
|
+
},
|
|
1517
|
+
"textMaxBytes": {
|
|
1518
|
+
"@id": "undefineds:dist/storage/quint/SqliteQuintStore.jsonld#SqliteQuintStore_options_textMaxBytes"
|
|
1505
1519
|
}
|
|
1506
1520
|
}
|
|
1507
1521
|
},
|
|
@@ -1539,6 +1553,13 @@
|
|
|
1539
1553
|
"options_debug": {
|
|
1540
1554
|
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_debug"
|
|
1541
1555
|
},
|
|
1556
|
+
"options_predicateObjectDataTypes": {
|
|
1557
|
+
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_predicateObjectDataTypes",
|
|
1558
|
+
"@container": "@list"
|
|
1559
|
+
},
|
|
1560
|
+
"options_textMaxBytes": {
|
|
1561
|
+
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_textMaxBytes"
|
|
1562
|
+
},
|
|
1542
1563
|
"driver": {
|
|
1543
1564
|
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_driver"
|
|
1544
1565
|
},
|
|
@@ -1568,6 +1589,13 @@
|
|
|
1568
1589
|
},
|
|
1569
1590
|
"debug": {
|
|
1570
1591
|
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_debug"
|
|
1592
|
+
},
|
|
1593
|
+
"predicateObjectDataTypes": {
|
|
1594
|
+
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_predicateObjectDataTypes",
|
|
1595
|
+
"@container": "@list"
|
|
1596
|
+
},
|
|
1597
|
+
"textMaxBytes": {
|
|
1598
|
+
"@id": "undefineds:dist/storage/quint/PgQuintStore.jsonld#PgQuintStore_options_textMaxBytes"
|
|
1571
1599
|
}
|
|
1572
1600
|
}
|
|
1573
1601
|
},
|
|
@@ -1577,6 +1605,23 @@
|
|
|
1577
1605
|
"@context": {
|
|
1578
1606
|
"options_debug": {
|
|
1579
1607
|
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_debug"
|
|
1608
|
+
},
|
|
1609
|
+
"options_predicateObjectDataTypes": {
|
|
1610
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes",
|
|
1611
|
+
"@container": "@list"
|
|
1612
|
+
},
|
|
1613
|
+
"options_textMaxBytes": {
|
|
1614
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_textMaxBytes"
|
|
1615
|
+
},
|
|
1616
|
+
"debug": {
|
|
1617
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_debug"
|
|
1618
|
+
},
|
|
1619
|
+
"predicateObjectDataTypes": {
|
|
1620
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes",
|
|
1621
|
+
"@container": "@list"
|
|
1622
|
+
},
|
|
1623
|
+
"textMaxBytes": {
|
|
1624
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_textMaxBytes"
|
|
1580
1625
|
}
|
|
1581
1626
|
}
|
|
1582
1627
|
},
|
|
@@ -4,13 +4,65 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ensureDrizzleSolidRuntimeConfigured = ensureDrizzleSolidRuntimeConfigured;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
7
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const node_module_1 = require("node:module");
|
|
8
10
|
const drizzle_solid_1 = require("@undefineds.co/drizzle-solid");
|
|
9
11
|
let configured = false;
|
|
12
|
+
function patchActionObserverModule(mod) {
|
|
13
|
+
const proto = mod.ActionObserverHttp?.prototype;
|
|
14
|
+
const originalOnRun = proto?.onRun;
|
|
15
|
+
if (!proto || !originalOnRun || proto.__xpodObservedActorsPatched) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
proto.onRun = function (actor, action, output) {
|
|
19
|
+
if (!Array.isArray(this.observedActors)) {
|
|
20
|
+
this.observedActors = [];
|
|
21
|
+
}
|
|
22
|
+
return originalOnRun.call(this, actor, action, output);
|
|
23
|
+
};
|
|
24
|
+
proto.__xpodObservedActorsPatched = true;
|
|
25
|
+
}
|
|
26
|
+
function getBunComunicaEntrypoints() {
|
|
27
|
+
const bunDir = node_path_1.default.join(process.cwd(), 'node_modules', '.bun');
|
|
28
|
+
if (!node_fs_1.default.existsSync(bunDir)) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
const packageNames = [
|
|
32
|
+
'actor-query-result-serialize-sparql-json',
|
|
33
|
+
'actor-query-result-serialize-stats',
|
|
34
|
+
];
|
|
35
|
+
const entrypoints = [];
|
|
36
|
+
for (const entry of node_fs_1.default.readdirSync(bunDir)) {
|
|
37
|
+
for (const packageName of packageNames) {
|
|
38
|
+
if (!entry.startsWith(`@comunica+${packageName}@`)) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
entrypoints.push(node_path_1.default.join(bunDir, entry, 'node_modules', '@comunica', packageName, 'lib', 'index.js'));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return entrypoints;
|
|
45
|
+
}
|
|
46
|
+
function patchComunicaActionObserver() {
|
|
47
|
+
const requireFromProject = (0, node_module_1.createRequire)(node_path_1.default.join(process.cwd(), '__xpod_comunica_patch__.cjs'));
|
|
48
|
+
const moduleNames = [
|
|
49
|
+
'@comunica/actor-query-result-serialize-sparql-json',
|
|
50
|
+
'@comunica/actor-query-result-serialize-stats',
|
|
51
|
+
];
|
|
52
|
+
for (const moduleId of [...moduleNames, ...getBunComunicaEntrypoints()]) {
|
|
53
|
+
try {
|
|
54
|
+
patchActionObserverModule(requireFromProject(moduleId));
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Optional Comunica modules are only present when LDP/SPARQL queries run.
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
10
61
|
function ensureDrizzleSolidRuntimeConfigured() {
|
|
11
62
|
if (configured) {
|
|
12
63
|
return;
|
|
13
64
|
}
|
|
65
|
+
patchComunicaActionObserver();
|
|
14
66
|
(0, drizzle_solid_1.configureSparqlEngine)({
|
|
15
67
|
createQueryEngine: (0, drizzle_solid_1.createNodeModuleSparqlEngineFactory)(node_path_1.default.join(process.cwd(), '__xpod_drizzle_sparql_engine__.cjs')),
|
|
16
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-drizzle-solid.js","sourceRoot":"","sources":["../../src/runtime/configure-drizzle-solid.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"configure-drizzle-solid.js","sourceRoot":"","sources":["../../src/runtime/configure-drizzle-solid.ts"],"names":[],"mappings":";;;;;AAoFA,kFAcC;AAlGD,sDAAyB;AACzB,0DAA6B;AAC7B,6CAA4C;AAC5C,gEAGsC;AAEtC,IAAI,UAAU,GAAG,KAAK,CAAC;AAWvB,SAAS,yBAAyB,CAAC,GAAyB;IAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC;IAChD,MAAM,aAAa,GAAG,KAAK,EAAE,KAAK,CAAC;IACnC,IAAI,CAAC,KAAK,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC,2BAA2B,EAAE,CAAC;QAClE,OAAO;IACT,CAAC;IAED,KAAK,CAAC,KAAK,GAAG,UAA8C,KAAK,EAAE,MAAM,EAAE,MAAM;QAC/E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QAC3B,CAAC;QACD,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC,CAAC;IACF,KAAK,CAAC,2BAA2B,GAAG,IAAI,CAAC;AAC3C,CAAC;AAED,SAAS,yBAAyB;IAChC,MAAM,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IAChE,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAG;QACnB,0CAA0C;QAC1C,oCAAoC;KACrC,CAAC;IACF,MAAM,WAAW,GAAa,EAAE,CAAC;IAEjC,KAAK,MAAM,KAAK,IAAI,iBAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3C,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,WAAW,GAAG,CAAC,EAAE,CAAC;gBACnD,SAAS;YACX,CAAC;YAED,WAAW,CAAC,IAAI,CAAC,mBAAI,CAAC,IAAI,CACxB,MAAM,EACN,KAAK,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,KAAK,EACL,UAAU,CACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,2BAA2B;IAClC,MAAM,kBAAkB,GAAG,IAAA,2BAAa,EAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,6BAA6B,CAAC,CAAC,CAAC;IAClG,MAAM,WAAW,GAAG;QAClB,oDAAoD;QACpD,8CAA8C;KAC/C,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,CAAE,GAAG,WAAW,EAAE,GAAG,yBAAyB,EAAE,CAAE,EAAE,CAAC;QAC1E,IAAI,CAAC;YACH,yBAAyB,CAAC,kBAAkB,CAAC,QAAQ,CAAyB,CAAC,CAAC;QAClF,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;QAC5E,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,mCAAmC;IACjD,IAAI,UAAU,EAAE,CAAC;QACf,OAAO;IACT,CAAC;IAED,2BAA2B,EAAE,CAAC;IAE9B,IAAA,qCAAqB,EAAC;QACpB,iBAAiB,EAAE,IAAA,mDAAmC,EACpD,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,oCAAoC,CAAC,CAC/D;KACF,CAAC,CAAC;IAEH,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC;AAED,mCAAmC,EAAE,CAAC","sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { createRequire } from 'node:module';\nimport {\n configureSparqlEngine,\n createNodeModuleSparqlEngineFactory,\n} from '@undefineds.co/drizzle-solid';\n\nlet configured = false;\n\ntype ActionObserverModule = {\n ActionObserverHttp?: {\n prototype: {\n onRun?: (actor: unknown, action: unknown, output: unknown) => unknown;\n __xpodObservedActorsPatched?: boolean;\n };\n };\n};\n\nfunction patchActionObserverModule(mod: ActionObserverModule): void {\n const proto = mod.ActionObserverHttp?.prototype;\n const originalOnRun = proto?.onRun;\n if (!proto || !originalOnRun || proto.__xpodObservedActorsPatched) {\n return;\n }\n\n proto.onRun = function(this: { observedActors?: string[] }, actor, action, output): unknown {\n if (!Array.isArray(this.observedActors)) {\n this.observedActors = [];\n }\n return originalOnRun.call(this, actor, action, output);\n };\n proto.__xpodObservedActorsPatched = true;\n}\n\nfunction getBunComunicaEntrypoints(): string[] {\n const bunDir = path.join(process.cwd(), 'node_modules', '.bun');\n if (!fs.existsSync(bunDir)) {\n return [];\n }\n\n const packageNames = [\n 'actor-query-result-serialize-sparql-json',\n 'actor-query-result-serialize-stats',\n ];\n const entrypoints: string[] = [];\n\n for (const entry of fs.readdirSync(bunDir)) {\n for (const packageName of packageNames) {\n if (!entry.startsWith(`@comunica+${packageName}@`)) {\n continue;\n }\n\n entrypoints.push(path.join(\n bunDir,\n entry,\n 'node_modules',\n '@comunica',\n packageName,\n 'lib',\n 'index.js',\n ));\n }\n }\n\n return entrypoints;\n}\n\nfunction patchComunicaActionObserver(): void {\n const requireFromProject = createRequire(path.join(process.cwd(), '__xpod_comunica_patch__.cjs'));\n const moduleNames = [\n '@comunica/actor-query-result-serialize-sparql-json',\n '@comunica/actor-query-result-serialize-stats',\n ];\n\n for (const moduleId of [ ...moduleNames, ...getBunComunicaEntrypoints() ]) {\n try {\n patchActionObserverModule(requireFromProject(moduleId) as ActionObserverModule);\n } catch {\n // Optional Comunica modules are only present when LDP/SPARQL queries run.\n }\n }\n}\n\nexport function ensureDrizzleSolidRuntimeConfigured(): void {\n if (configured) {\n return;\n }\n\n patchComunicaActionObserver();\n\n configureSparqlEngine({\n createQueryEngine: createNodeModuleSparqlEngineFactory(\n path.join(process.cwd(), '__xpod_drizzle_sparql_engine__.cjs'),\n ),\n });\n\n configured = true;\n}\n\nensureDrizzleSolidRuntimeConfigured();\n"]}
|
|
@@ -23,6 +23,67 @@
|
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes",
|
|
29
|
+
"range": {
|
|
30
|
+
"@type": "ParameterRangeCollectEntries",
|
|
31
|
+
"parameterRangeCollectEntriesParameters": [
|
|
32
|
+
{
|
|
33
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes_key"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes_value",
|
|
37
|
+
"range": {
|
|
38
|
+
"@type": "ParameterRangeUnion",
|
|
39
|
+
"parameterRangeElements": [
|
|
40
|
+
{
|
|
41
|
+
"@type": "ParameterRangeLiteral",
|
|
42
|
+
"parameterRangeValueLiteral": "iri"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"@type": "ParameterRangeLiteral",
|
|
46
|
+
"parameterRangeValueLiteral": "blankNode"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"@type": "ParameterRangeLiteral",
|
|
50
|
+
"parameterRangeValueLiteral": "text"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"@type": "ParameterRangeLiteral",
|
|
54
|
+
"parameterRangeValueLiteral": "longText"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"@type": "ParameterRangeLiteral",
|
|
58
|
+
"parameterRangeValueLiteral": "numeric"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"@type": "ParameterRangeLiteral",
|
|
62
|
+
"parameterRangeValueLiteral": "dateTime"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"@type": "ParameterRangeLiteral",
|
|
66
|
+
"parameterRangeValueLiteral": "literal"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"comment": "Predicate-level RDF object data declarations. This declares schema value types, not query modes. The store derives whether exact/range/prefix/search can be pushed down from the data type."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_textMaxBytes",
|
|
77
|
+
"range": {
|
|
78
|
+
"@type": "ParameterRangeUnion",
|
|
79
|
+
"parameterRangeElements": [
|
|
80
|
+
"xsd:number",
|
|
81
|
+
{
|
|
82
|
+
"@type": "ParameterRangeUndefined"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"comment": "Maximum serialized byte length that can be indexed as text. Longer undeclared text literals are stored as longText."
|
|
26
87
|
}
|
|
27
88
|
],
|
|
28
89
|
"memberFields": [
|
|
@@ -166,6 +227,27 @@
|
|
|
166
227
|
"value": {
|
|
167
228
|
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_debug"
|
|
168
229
|
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"keyRaw": "predicateObjectDataTypes",
|
|
233
|
+
"value": {
|
|
234
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes__constructorArgument",
|
|
235
|
+
"fields": [
|
|
236
|
+
{
|
|
237
|
+
"collectEntries": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes",
|
|
238
|
+
"key": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes_key",
|
|
239
|
+
"value": {
|
|
240
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_predicateObjectDataTypes_value"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"keyRaw": "textMaxBytes",
|
|
248
|
+
"value": {
|
|
249
|
+
"@id": "undefineds:dist/storage/quint/BaseQuintStore.jsonld#BaseQuintStore_options_textMaxBytes"
|
|
250
|
+
}
|
|
169
251
|
}
|
|
170
252
|
]
|
|
171
253
|
}
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* PostgreSQL 不支持 TEXT 字段中的 \0 (null) 字符,
|
|
9
9
|
* 所以我们需要对序列化的字符串进行转换。
|
|
10
10
|
*/
|
|
11
|
+
import type { Term } from '@rdfjs/types';
|
|
11
12
|
import { BaseQuintStore, type SqlExecutor } from './BaseQuintStore';
|
|
12
|
-
import type { QuintStoreOptions, Quint } from './types';
|
|
13
|
+
import type { AttributeMap, CompoundPattern, QuintStoreOptions, Quint, QuintPattern, QueryOptions } from './types';
|
|
13
14
|
/**
|
|
14
15
|
* PostgreSQL 连接配置
|
|
15
16
|
*/
|
|
@@ -43,6 +44,7 @@ export declare class PgQuintStore extends BaseQuintStore {
|
|
|
43
44
|
private pglite;
|
|
44
45
|
private pgPool;
|
|
45
46
|
private pgOptions;
|
|
47
|
+
private sharedPoolConfig;
|
|
46
48
|
constructor(options: PgQuintStoreOptions);
|
|
47
49
|
protected createExecutor(): Promise<SqlExecutor>;
|
|
48
50
|
protected closeExecutor(): Promise<void>;
|
|
@@ -51,11 +53,55 @@ export declare class PgQuintStore extends BaseQuintStore {
|
|
|
51
53
|
*/
|
|
52
54
|
open(): Promise<void>;
|
|
53
55
|
/**
|
|
54
|
-
* 重写 put
|
|
56
|
+
* 重写 put 方法,避免长文本对象进入 PostgreSQL btree 唯一键
|
|
55
57
|
*/
|
|
56
58
|
put(quint: Quint): Promise<void>;
|
|
57
59
|
/**
|
|
58
|
-
* 重写 multiPut
|
|
60
|
+
* 重写 multiPut 方法,使用同一事务保持批量写入幂等
|
|
59
61
|
*/
|
|
60
62
|
multiPut(quintList: Quint[]): Promise<void>;
|
|
63
|
+
multiDel(quintList: Quint[]): Promise<void>;
|
|
64
|
+
getAttributes(subjects: string[], predicates: string[], graph?: Term): Promise<AttributeMap>;
|
|
65
|
+
protected buildWhereClause(pattern: QuintPattern): {
|
|
66
|
+
whereClause: string;
|
|
67
|
+
params: any[];
|
|
68
|
+
};
|
|
69
|
+
private addPgCondition;
|
|
70
|
+
protected addAliasedConditions(conditions: string[], params: any[], alias: string, pattern: any): void;
|
|
71
|
+
protected buildCompoundQuery(compound: CompoundPattern, options?: QueryOptions): {
|
|
72
|
+
sql: string;
|
|
73
|
+
params: any[];
|
|
74
|
+
};
|
|
75
|
+
protected buildSelectQuery(pattern: QuintPattern, options?: QueryOptions): {
|
|
76
|
+
sql: string;
|
|
77
|
+
params: any[];
|
|
78
|
+
};
|
|
79
|
+
count(pattern: QuintPattern): Promise<number>;
|
|
80
|
+
stats(): Promise<import('./types').StoreStats>;
|
|
81
|
+
private ensureTypedObjectSchema;
|
|
82
|
+
private backfillMissingObjectIndexFields;
|
|
83
|
+
private quintToPgRow;
|
|
84
|
+
private objectIndexForTerm;
|
|
85
|
+
private objectIndexForSerialized;
|
|
86
|
+
private objectDigestForIndex;
|
|
87
|
+
private writeStatementsForRow;
|
|
88
|
+
private addObjectConditions;
|
|
89
|
+
private addObjectExactCondition;
|
|
90
|
+
private addObjectExactValueCondition;
|
|
91
|
+
private addObjectExactSerializedCondition;
|
|
92
|
+
private addObjectComparableCondition;
|
|
93
|
+
private addObjectTextCondition;
|
|
94
|
+
private addObjectLexicalStringCondition;
|
|
95
|
+
private objectLexicalSql;
|
|
96
|
+
private addObjectLanguageCondition;
|
|
97
|
+
private objectPredicateForOperatorValue;
|
|
98
|
+
private objectFieldsForTerm;
|
|
99
|
+
private objectFieldsForSerialized;
|
|
100
|
+
private objectFieldsForPrefix;
|
|
101
|
+
private assertComparableObject;
|
|
102
|
+
private addAliasedObjectConditions;
|
|
103
|
+
private extractExactPredicate;
|
|
104
|
+
private resolveObjectDataTypeForPattern;
|
|
105
|
+
private addAliasedPgCondition;
|
|
106
|
+
private addFallbackAliasedCondition;
|
|
61
107
|
}
|