litedbmodel 1.2.10 → 2.0.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/README.md +1 -1
- package/dist/DBModel.d.ts.map +1 -1
- package/dist/DBModel.js +6 -0
- package/dist/DBModel.js.map +1 -1
- package/dist/scp/authoring-sql.d.ts +56 -0
- package/dist/scp/authoring-sql.d.ts.map +1 -0
- package/dist/scp/authoring-sql.js +83 -0
- package/dist/scp/authoring-sql.js.map +1 -0
- package/dist/scp/authoring.d.ts +155 -0
- package/dist/scp/authoring.d.ts.map +1 -0
- package/dist/scp/authoring.js +162 -0
- package/dist/scp/authoring.js.map +1 -0
- package/dist/scp/bridge.d.ts +64 -0
- package/dist/scp/bridge.d.ts.map +1 -0
- package/dist/scp/bridge.js +329 -0
- package/dist/scp/bridge.js.map +1 -0
- package/dist/scp/catalog.d.ts +91 -0
- package/dist/scp/catalog.d.ts.map +1 -0
- package/dist/scp/catalog.js +203 -0
- package/dist/scp/catalog.js.map +1 -0
- package/dist/scp/codegen.d.ts +131 -0
- package/dist/scp/codegen.d.ts.map +1 -0
- package/dist/scp/codegen.js +137 -0
- package/dist/scp/codegen.js.map +1 -0
- package/dist/scp/compile-dialect.d.ts +39 -0
- package/dist/scp/compile-dialect.d.ts.map +1 -0
- package/dist/scp/compile-dialect.js +62 -0
- package/dist/scp/compile-dialect.js.map +1 -0
- package/dist/scp/compile-sqlite.d.ts +114 -0
- package/dist/scp/compile-sqlite.d.ts.map +1 -0
- package/dist/scp/compile-sqlite.js +149 -0
- package/dist/scp/compile-sqlite.js.map +1 -0
- package/dist/scp/dialect.d.ts +141 -0
- package/dist/scp/dialect.d.ts.map +1 -0
- package/dist/scp/dialect.js +194 -0
- package/dist/scp/dialect.js.map +1 -0
- package/dist/scp/errors.d.ts +36 -0
- package/dist/scp/errors.d.ts.map +1 -0
- package/dist/scp/errors.js +72 -0
- package/dist/scp/errors.js.map +1 -0
- package/dist/scp/guard.d.ts +47 -0
- package/dist/scp/guard.d.ts.map +1 -0
- package/dist/scp/guard.js +137 -0
- package/dist/scp/guard.js.map +1 -0
- package/dist/scp/index.cjs +4744 -0
- package/dist/scp/index.d.ts +49 -0
- package/dist/scp/index.d.ts.map +1 -0
- package/dist/scp/index.js +164 -0
- package/dist/scp/index.js.map +1 -0
- package/dist/scp/index.mjs +2000 -0
- package/dist/scp/ir.d.ts +92 -0
- package/dist/scp/ir.d.ts.map +1 -0
- package/dist/scp/ir.js +28 -0
- package/dist/scp/ir.js.map +1 -0
- package/dist/scp/relation.d.ts +136 -0
- package/dist/scp/relation.d.ts.map +1 -0
- package/dist/scp/relation.js +191 -0
- package/dist/scp/relation.js.map +1 -0
- package/dist/scp/render.d.ts +40 -0
- package/dist/scp/render.d.ts.map +1 -0
- package/dist/scp/render.js +170 -0
- package/dist/scp/render.js.map +1 -0
- package/dist/scp/runtime.d.ts +295 -0
- package/dist/scp/runtime.d.ts.map +1 -0
- package/dist/scp/runtime.js +665 -0
- package/dist/scp/runtime.js.map +1 -0
- package/dist/scp/typed-object.d.ts +88 -0
- package/dist/scp/typed-object.d.ts.map +1 -0
- package/dist/scp/typed-object.js +163 -0
- package/dist/scp/typed-object.js.map +1 -0
- package/dist/scp/write-plan.d.ts +161 -0
- package/dist/scp/write-plan.d.ts.map +1 -0
- package/dist/scp/write-plan.js +528 -0
- package/dist/scp/write-plan.js.map +1 -0
- package/dist/scp/write-runtime.d.ts +80 -0
- package/dist/scp/write-runtime.d.ts.map +1 -0
- package/dist/scp/write-runtime.js +167 -0
- package/dist/scp/write-runtime.js.map +1 -0
- package/dist/scp/writes.d.ts +251 -0
- package/dist/scp/writes.d.ts.map +1 -0
- package/dist/scp/writes.js +176 -0
- package/dist/scp/writes.js.map +1 -0
- package/docs/proposal/contracts-architecture-feasibility.md +328 -0
- package/docs/proposal/contracts-architecture.md +579 -0
- package/docs/proposal/litedbmodel-v2-scp-architecture.md +382 -0
- package/docs/proposal/sql-dynamic-expansion-spec.md +175 -0
- package/package.json +27 -5
- package/docs/README_REVIEW.md +0 -23
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* litedbmodel v2 SCP — public surface (WS1, #21).
|
|
3
|
+
*
|
|
4
|
+
* The SQL-backend consumer layer over behavior-contracts (spec §1). WS1 delivers the
|
|
5
|
+
* Catalog definition and the SQLite Backend Compile + dynamic-expansion render; WS2
|
|
6
|
+
* delivers the Authoring Parse (SemanticBehavior declaration + eager public-API path →
|
|
7
|
+
* one internal Component-graph IR). WS3 (runtime execution / handlers), WS4/5 (relations)
|
|
8
|
+
* and the other dialects (PG/MySQL) are out of scope here.
|
|
9
|
+
*/
|
|
10
|
+
export { LITEDBMODEL_CATALOG, catalogEntry, CATALOG_NAMES, WRITE_CATALOG_NAMES, WRITE_PORT_FAMILIES, assertComponentsInCatalog, deriveContractEffect, } from './catalog';
|
|
11
|
+
export type { CatalogName, ContractEffect } from './catalog';
|
|
12
|
+
export { WHERE_SLOT } from './ir';
|
|
13
|
+
export type { ExprNode, Fragment, FragmentTree, AssemblySpec, CompiledOperation, } from './ir';
|
|
14
|
+
export { compileSelect, compileInsert, compileUpdate, compileDelete, } from './compile-sqlite';
|
|
15
|
+
export type { Ref, Condition, SelectDesc, InsertDesc, UpdateDesc, DeleteDesc, } from './compile-sqlite';
|
|
16
|
+
export { renderOperation } from './render';
|
|
17
|
+
export type { RenderedSql } from './render';
|
|
18
|
+
export { dialectFor, toDollarPlaceholders, SQLITE, POSTGRES, MYSQL } from './dialect';
|
|
19
|
+
export type { Dialect, DialectName, ConflictAction } from './dialect';
|
|
20
|
+
export { compileInsertFor } from './compile-dialect';
|
|
21
|
+
export type { InsertShape } from './compile-dialect';
|
|
22
|
+
export { assertExprPortable, assertOperationPortable, assertComponentPortable, assertComponentGraphPortable, } from './guard';
|
|
23
|
+
export { components, publishBehaviors, compileEager, } from './authoring';
|
|
24
|
+
export type { ComponentFns, BehaviorMethodSpec, BehaviorModelContract, PublishBehaviorsOptions, EagerBehavior, Component, ComponentGraphIR, MapNode, ComponentRefNode, } from './authoring';
|
|
25
|
+
export { compileNode, compileComponentNodes, IN_SENTINEL } from './bridge';
|
|
26
|
+
export { whereEq, whereNe, whereLt, whereLe, whereGt, whereGe, whereIsNull, whereIn, inColumn, } from './authoring-sql';
|
|
27
|
+
export { mapSqliteError, SqlFailure } from './errors';
|
|
28
|
+
export type { SqlFailureKind } from './errors';
|
|
29
|
+
export { executeBehavior, compileBundle, executeBundle, read, readBundle, resolveRelationViaPlan } from './runtime';
|
|
30
|
+
export type { SqliteDb, ExecuteOptions, SqlBundle, ReadRuntimeOptions } from './runtime';
|
|
31
|
+
export { entityWrites, edgeWrites, lifecycleFor, parseEffectPath, ENTITY_ROOT, } from './writes';
|
|
32
|
+
export type { PathRoot, EffectPath, RequiresEffect, UniqueEffect, DeriveEffect, EdgeEffect, EmitEffect, IdempotencyEffect, LifecycleEffects, LifecycleContract, WriteLifecyclePhase, EntityWritesDefinition, EntityWritesShape, WriteRecorder, } from './writes';
|
|
33
|
+
export { deriveTransactionPlan } from './write-plan';
|
|
34
|
+
export type { StatementRole, GateRule, TxStatement, TransactionPlan, IdempotentHitPolicy, BaseWrite, } from './write-plan';
|
|
35
|
+
export { executeTransaction, countingDriver } from './write-runtime';
|
|
36
|
+
export type { TransactionResult, ShortCircuitReason } from './write-runtime';
|
|
37
|
+
export { compileWriteBundle, executeCommand, executeTransactionBundle } from './runtime';
|
|
38
|
+
export { compileCompositeWriteBundle, executeCompositeCommand } from './runtime';
|
|
39
|
+
export type { CompositeWriteEntry } from './runtime';
|
|
40
|
+
export { buildHandlers, normalizeInput } from './runtime';
|
|
41
|
+
export { CODEGEN_LANGUAGES, generateCodegenArtifact, bundleToPortableIR, assertLanguageSupported, codegenExecuteBundleForTest, } from './codegen';
|
|
42
|
+
export type { CodegenLanguage, SqlCatalogCompanion, CodegenArtifact, } from './codegen';
|
|
43
|
+
export { compileRelationOp, runRelationOp, distributeToParent, RELATION_KEYS_HEAD, } from './relation';
|
|
44
|
+
export type { RelationKind, RelationDecl, RelationOp, RelationBatch, RelationDriver, } from './relation';
|
|
45
|
+
export { buildResultSet, readRelationContext, RelationContext, RELATION_CONTEXT, } from './typed-object';
|
|
46
|
+
export type { HydrateFactory, ReadOptions } from './typed-object';
|
|
47
|
+
export { SemanticBehavior, behavior, when, concat, add, sub, mul, div, mod, neg, eq, ne, lt, le, gt, ge, and, or, not, coalesce, len, opt, } from 'behavior-contracts';
|
|
48
|
+
export type { In, Recorded, BehaviorClass } from 'behavior-contracts';
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG7D,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,iBAAiB,GAClB,MAAM,MAAM,CAAC;AAGd,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,GAAG,EACH,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACtF,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,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,QAAQ,EACR,GAAG,EACH,GAAG,GACJ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* litedbmodel v2 SCP — public surface (WS1, #21).
|
|
4
|
+
*
|
|
5
|
+
* The SQL-backend consumer layer over behavior-contracts (spec §1). WS1 delivers the
|
|
6
|
+
* Catalog definition and the SQLite Backend Compile + dynamic-expansion render; WS2
|
|
7
|
+
* delivers the Authoring Parse (SemanticBehavior declaration + eager public-API path →
|
|
8
|
+
* one internal Component-graph IR). WS3 (runtime execution / handlers), WS4/5 (relations)
|
|
9
|
+
* and the other dialects (PG/MySQL) are out of scope here.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.parseEffectPath = exports.lifecycleFor = exports.edgeWrites = exports.entityWrites = exports.resolveRelationViaPlan = exports.readBundle = exports.read = exports.executeBundle = exports.compileBundle = exports.executeBehavior = exports.SqlFailure = exports.mapSqliteError = exports.inColumn = exports.whereIn = exports.whereIsNull = exports.whereGe = exports.whereGt = exports.whereLe = exports.whereLt = exports.whereNe = exports.whereEq = exports.IN_SENTINEL = exports.compileComponentNodes = exports.compileNode = exports.compileEager = exports.publishBehaviors = exports.components = exports.assertComponentGraphPortable = exports.assertComponentPortable = exports.assertOperationPortable = exports.assertExprPortable = exports.compileInsertFor = exports.MYSQL = exports.POSTGRES = exports.SQLITE = exports.toDollarPlaceholders = exports.dialectFor = exports.renderOperation = exports.compileDelete = exports.compileUpdate = exports.compileInsert = exports.compileSelect = exports.WHERE_SLOT = exports.deriveContractEffect = exports.assertComponentsInCatalog = exports.WRITE_PORT_FAMILIES = exports.WRITE_CATALOG_NAMES = exports.CATALOG_NAMES = exports.catalogEntry = exports.LITEDBMODEL_CATALOG = void 0;
|
|
13
|
+
exports.opt = exports.len = exports.coalesce = exports.not = exports.or = exports.and = exports.ge = exports.gt = exports.le = exports.lt = exports.ne = exports.eq = exports.neg = exports.mod = exports.div = exports.mul = exports.sub = exports.add = exports.concat = exports.when = exports.behavior = exports.SemanticBehavior = exports.RELATION_CONTEXT = exports.RelationContext = exports.readRelationContext = exports.buildResultSet = exports.RELATION_KEYS_HEAD = exports.distributeToParent = exports.runRelationOp = exports.compileRelationOp = exports.codegenExecuteBundleForTest = exports.assertLanguageSupported = exports.bundleToPortableIR = exports.generateCodegenArtifact = exports.CODEGEN_LANGUAGES = exports.normalizeInput = exports.buildHandlers = exports.executeCompositeCommand = exports.compileCompositeWriteBundle = exports.executeTransactionBundle = exports.executeCommand = exports.compileWriteBundle = exports.countingDriver = exports.executeTransaction = exports.deriveTransactionPlan = exports.ENTITY_ROOT = void 0;
|
|
14
|
+
// Catalog (spec §11 item 1)
|
|
15
|
+
var catalog_1 = require("./catalog");
|
|
16
|
+
Object.defineProperty(exports, "LITEDBMODEL_CATALOG", { enumerable: true, get: function () { return catalog_1.LITEDBMODEL_CATALOG; } });
|
|
17
|
+
Object.defineProperty(exports, "catalogEntry", { enumerable: true, get: function () { return catalog_1.catalogEntry; } });
|
|
18
|
+
Object.defineProperty(exports, "CATALOG_NAMES", { enumerable: true, get: function () { return catalog_1.CATALOG_NAMES; } });
|
|
19
|
+
Object.defineProperty(exports, "WRITE_CATALOG_NAMES", { enumerable: true, get: function () { return catalog_1.WRITE_CATALOG_NAMES; } });
|
|
20
|
+
Object.defineProperty(exports, "WRITE_PORT_FAMILIES", { enumerable: true, get: function () { return catalog_1.WRITE_PORT_FAMILIES; } });
|
|
21
|
+
Object.defineProperty(exports, "assertComponentsInCatalog", { enumerable: true, get: function () { return catalog_1.assertComponentsInCatalog; } });
|
|
22
|
+
Object.defineProperty(exports, "deriveContractEffect", { enumerable: true, get: function () { return catalog_1.deriveContractEffect; } });
|
|
23
|
+
// SQL IR shapes (spec §8)
|
|
24
|
+
var ir_1 = require("./ir");
|
|
25
|
+
Object.defineProperty(exports, "WHERE_SLOT", { enumerable: true, get: function () { return ir_1.WHERE_SLOT; } });
|
|
26
|
+
// SQLite Backend Compile (spec §11 item 3)
|
|
27
|
+
var compile_sqlite_1 = require("./compile-sqlite");
|
|
28
|
+
Object.defineProperty(exports, "compileSelect", { enumerable: true, get: function () { return compile_sqlite_1.compileSelect; } });
|
|
29
|
+
Object.defineProperty(exports, "compileInsert", { enumerable: true, get: function () { return compile_sqlite_1.compileInsert; } });
|
|
30
|
+
Object.defineProperty(exports, "compileUpdate", { enumerable: true, get: function () { return compile_sqlite_1.compileUpdate; } });
|
|
31
|
+
Object.defineProperty(exports, "compileDelete", { enumerable: true, get: function () { return compile_sqlite_1.compileDelete; } });
|
|
32
|
+
// Dynamic-expansion render (normative reference for byte-identical output)
|
|
33
|
+
var render_1 = require("./render");
|
|
34
|
+
Object.defineProperty(exports, "renderOperation", { enumerable: true, get: function () { return render_1.renderOperation; } });
|
|
35
|
+
// Dialect strategy table (WS6, #26 — the SSoT for PG/MySQL/SQLite SQL divergences + `?`→`$N`).
|
|
36
|
+
var dialect_1 = require("./dialect");
|
|
37
|
+
Object.defineProperty(exports, "dialectFor", { enumerable: true, get: function () { return dialect_1.dialectFor; } });
|
|
38
|
+
Object.defineProperty(exports, "toDollarPlaceholders", { enumerable: true, get: function () { return dialect_1.toDollarPlaceholders; } });
|
|
39
|
+
Object.defineProperty(exports, "SQLITE", { enumerable: true, get: function () { return dialect_1.SQLITE; } });
|
|
40
|
+
Object.defineProperty(exports, "POSTGRES", { enumerable: true, get: function () { return dialect_1.POSTGRES; } });
|
|
41
|
+
Object.defineProperty(exports, "MYSQL", { enumerable: true, get: function () { return dialect_1.MYSQL; } });
|
|
42
|
+
// Dialect-parameterized Backend Compile (WS6, #26 — shared IR→structure, per-dialect SQL text).
|
|
43
|
+
var compile_dialect_1 = require("./compile-dialect");
|
|
44
|
+
Object.defineProperty(exports, "compileInsertFor", { enumerable: true, get: function () { return compile_dialect_1.compileInsertFor; } });
|
|
45
|
+
// Portability guard (closed Expression IR set only)
|
|
46
|
+
var guard_1 = require("./guard");
|
|
47
|
+
Object.defineProperty(exports, "assertExprPortable", { enumerable: true, get: function () { return guard_1.assertExprPortable; } });
|
|
48
|
+
Object.defineProperty(exports, "assertOperationPortable", { enumerable: true, get: function () { return guard_1.assertOperationPortable; } });
|
|
49
|
+
Object.defineProperty(exports, "assertComponentPortable", { enumerable: true, get: function () { return guard_1.assertComponentPortable; } });
|
|
50
|
+
Object.defineProperty(exports, "assertComponentGraphPortable", { enumerable: true, get: function () { return guard_1.assertComponentGraphPortable; } });
|
|
51
|
+
// Authoring Parse (spec §2.4 / §7 / §9) — SemanticBehavior declaration + eager public-API
|
|
52
|
+
// path → one internal Component-graph IR.
|
|
53
|
+
var authoring_1 = require("./authoring");
|
|
54
|
+
Object.defineProperty(exports, "components", { enumerable: true, get: function () { return authoring_1.components; } });
|
|
55
|
+
Object.defineProperty(exports, "publishBehaviors", { enumerable: true, get: function () { return authoring_1.publishBehaviors; } });
|
|
56
|
+
Object.defineProperty(exports, "compileEager", { enumerable: true, get: function () { return authoring_1.compileEager; } });
|
|
57
|
+
// Backend-Compile bridge (WS1↔WS3): real bc ComponentGraphIR port shape → WS1 CompiledOperation.
|
|
58
|
+
var bridge_1 = require("./bridge");
|
|
59
|
+
Object.defineProperty(exports, "compileNode", { enumerable: true, get: function () { return bridge_1.compileNode; } });
|
|
60
|
+
Object.defineProperty(exports, "compileComponentNodes", { enumerable: true, get: function () { return bridge_1.compileComponentNodes; } });
|
|
61
|
+
Object.defineProperty(exports, "IN_SENTINEL", { enumerable: true, get: function () { return bridge_1.IN_SENTINEL; } });
|
|
62
|
+
// SQL WHERE authoring helpers (closed-set encodings the bridge decodes).
|
|
63
|
+
var authoring_sql_1 = require("./authoring-sql");
|
|
64
|
+
Object.defineProperty(exports, "whereEq", { enumerable: true, get: function () { return authoring_sql_1.whereEq; } });
|
|
65
|
+
Object.defineProperty(exports, "whereNe", { enumerable: true, get: function () { return authoring_sql_1.whereNe; } });
|
|
66
|
+
Object.defineProperty(exports, "whereLt", { enumerable: true, get: function () { return authoring_sql_1.whereLt; } });
|
|
67
|
+
Object.defineProperty(exports, "whereLe", { enumerable: true, get: function () { return authoring_sql_1.whereLe; } });
|
|
68
|
+
Object.defineProperty(exports, "whereGt", { enumerable: true, get: function () { return authoring_sql_1.whereGt; } });
|
|
69
|
+
Object.defineProperty(exports, "whereGe", { enumerable: true, get: function () { return authoring_sql_1.whereGe; } });
|
|
70
|
+
Object.defineProperty(exports, "whereIsNull", { enumerable: true, get: function () { return authoring_sql_1.whereIsNull; } });
|
|
71
|
+
Object.defineProperty(exports, "whereIn", { enumerable: true, get: function () { return authoring_sql_1.whereIn; } });
|
|
72
|
+
Object.defineProperty(exports, "inColumn", { enumerable: true, get: function () { return authoring_sql_1.inColumn; } });
|
|
73
|
+
// Error Mapping (spec §11 item 5): driver error → SCP Failure + Policy Kind.
|
|
74
|
+
var errors_1 = require("./errors");
|
|
75
|
+
Object.defineProperty(exports, "mapSqliteError", { enumerable: true, get: function () { return errors_1.mapSqliteError; } });
|
|
76
|
+
Object.defineProperty(exports, "SqlFailure", { enumerable: true, get: function () { return errors_1.SqlFailure; } });
|
|
77
|
+
// Thin TS runtime (spec §3 / §10 / §11): validate → SKIP → expand → eval → bind → execute → assembly.
|
|
78
|
+
// `compileBundle` emits the §8 published artifact (Backend-Compiled once, TS-side);
|
|
79
|
+
// `executeBundle` runs that artifact via bc runtime-core alone (the multi-language target).
|
|
80
|
+
var runtime_1 = require("./runtime");
|
|
81
|
+
Object.defineProperty(exports, "executeBehavior", { enumerable: true, get: function () { return runtime_1.executeBehavior; } });
|
|
82
|
+
Object.defineProperty(exports, "compileBundle", { enumerable: true, get: function () { return runtime_1.compileBundle; } });
|
|
83
|
+
Object.defineProperty(exports, "executeBundle", { enumerable: true, get: function () { return runtime_1.executeBundle; } });
|
|
84
|
+
Object.defineProperty(exports, "read", { enumerable: true, get: function () { return runtime_1.read; } });
|
|
85
|
+
Object.defineProperty(exports, "readBundle", { enumerable: true, get: function () { return runtime_1.readBundle; } });
|
|
86
|
+
Object.defineProperty(exports, "resolveRelationViaPlan", { enumerable: true, get: function () { return runtime_1.resolveRelationViaPlan; } });
|
|
87
|
+
// Write-time relations (WS5, #25 — spec §6): entityWrites/edgeWrites declaration vocabulary,
|
|
88
|
+
// the gate-first transaction-plan derivation, and the 1-tx real-SQLite runtime.
|
|
89
|
+
var writes_1 = require("./writes");
|
|
90
|
+
Object.defineProperty(exports, "entityWrites", { enumerable: true, get: function () { return writes_1.entityWrites; } });
|
|
91
|
+
Object.defineProperty(exports, "edgeWrites", { enumerable: true, get: function () { return writes_1.edgeWrites; } });
|
|
92
|
+
Object.defineProperty(exports, "lifecycleFor", { enumerable: true, get: function () { return writes_1.lifecycleFor; } });
|
|
93
|
+
Object.defineProperty(exports, "parseEffectPath", { enumerable: true, get: function () { return writes_1.parseEffectPath; } });
|
|
94
|
+
Object.defineProperty(exports, "ENTITY_ROOT", { enumerable: true, get: function () { return writes_1.ENTITY_ROOT; } });
|
|
95
|
+
var write_plan_1 = require("./write-plan");
|
|
96
|
+
Object.defineProperty(exports, "deriveTransactionPlan", { enumerable: true, get: function () { return write_plan_1.deriveTransactionPlan; } });
|
|
97
|
+
var write_runtime_1 = require("./write-runtime");
|
|
98
|
+
Object.defineProperty(exports, "executeTransaction", { enumerable: true, get: function () { return write_runtime_1.executeTransaction; } });
|
|
99
|
+
Object.defineProperty(exports, "countingDriver", { enumerable: true, get: function () { return write_runtime_1.countingDriver; } });
|
|
100
|
+
// The Command bundle + 1-tx execution surface (WS5 — the write path of §2.3 / §6).
|
|
101
|
+
var runtime_2 = require("./runtime");
|
|
102
|
+
Object.defineProperty(exports, "compileWriteBundle", { enumerable: true, get: function () { return runtime_2.compileWriteBundle; } });
|
|
103
|
+
Object.defineProperty(exports, "executeCommand", { enumerable: true, get: function () { return runtime_2.executeCommand; } });
|
|
104
|
+
Object.defineProperty(exports, "executeTransactionBundle", { enumerable: true, get: function () { return runtime_2.executeTransactionBundle; } });
|
|
105
|
+
// Composite (multi-write) Command surface (WS8a, #28 — spec §6 nested write / §14 tx-DAG derivation):
|
|
106
|
+
// several named base writes with data dependencies → ONE topologically-ordered gate-first tx plan.
|
|
107
|
+
var runtime_3 = require("./runtime");
|
|
108
|
+
Object.defineProperty(exports, "compileCompositeWriteBundle", { enumerable: true, get: function () { return runtime_3.compileCompositeWriteBundle; } });
|
|
109
|
+
Object.defineProperty(exports, "executeCompositeCommand", { enumerable: true, get: function () { return runtime_3.executeCompositeCommand; } });
|
|
110
|
+
// Reusable handler/normalization seams (WS3) — exported so the mode-3 codegen path binds the
|
|
111
|
+
// IDENTICAL SQL handlers into bc's generated `bind()` (byte-identity by construction).
|
|
112
|
+
var runtime_4 = require("./runtime");
|
|
113
|
+
Object.defineProperty(exports, "buildHandlers", { enumerable: true, get: function () { return runtime_4.buildHandlers; } });
|
|
114
|
+
Object.defineProperty(exports, "normalizeInput", { enumerable: true, get: function () { return runtime_4.normalizeInput; } });
|
|
115
|
+
// Mode-3 codegen (WS7f, #35 — spec §9 exec-mode 3): supply the litedbmodel SQL catalog to bc's
|
|
116
|
+
// shared generator; emit per-language source (IR baked as a native literal) + the SQL catalog
|
|
117
|
+
// companion. Generated code output is byte-identical to the mode-2 thin-runtime (proven by the
|
|
118
|
+
// codegen conformance leg).
|
|
119
|
+
var codegen_1 = require("./codegen");
|
|
120
|
+
Object.defineProperty(exports, "CODEGEN_LANGUAGES", { enumerable: true, get: function () { return codegen_1.CODEGEN_LANGUAGES; } });
|
|
121
|
+
Object.defineProperty(exports, "generateCodegenArtifact", { enumerable: true, get: function () { return codegen_1.generateCodegenArtifact; } });
|
|
122
|
+
Object.defineProperty(exports, "bundleToPortableIR", { enumerable: true, get: function () { return codegen_1.bundleToPortableIR; } });
|
|
123
|
+
Object.defineProperty(exports, "assertLanguageSupported", { enumerable: true, get: function () { return codegen_1.assertLanguageSupported; } });
|
|
124
|
+
Object.defineProperty(exports, "codegenExecuteBundleForTest", { enumerable: true, get: function () { return codegen_1.codegenExecuteBundleForTest; } });
|
|
125
|
+
// Read relations (WS4, #24): pre-compiled batch relation ops + staged batch resolution.
|
|
126
|
+
// BOTH the declarative-select and the lazy surface resolve through the SAME compiled op.
|
|
127
|
+
var relation_1 = require("./relation");
|
|
128
|
+
Object.defineProperty(exports, "compileRelationOp", { enumerable: true, get: function () { return relation_1.compileRelationOp; } });
|
|
129
|
+
Object.defineProperty(exports, "runRelationOp", { enumerable: true, get: function () { return relation_1.runRelationOp; } });
|
|
130
|
+
Object.defineProperty(exports, "distributeToParent", { enumerable: true, get: function () { return relation_1.distributeToParent; } });
|
|
131
|
+
Object.defineProperty(exports, "RELATION_KEYS_HEAD", { enumerable: true, get: function () { return relation_1.RELATION_KEYS_HEAD; } });
|
|
132
|
+
// typed-object result + hydrate factory + lazy relation context (WS4, #24).
|
|
133
|
+
var typed_object_1 = require("./typed-object");
|
|
134
|
+
Object.defineProperty(exports, "buildResultSet", { enumerable: true, get: function () { return typed_object_1.buildResultSet; } });
|
|
135
|
+
Object.defineProperty(exports, "readRelationContext", { enumerable: true, get: function () { return typed_object_1.readRelationContext; } });
|
|
136
|
+
Object.defineProperty(exports, "RelationContext", { enumerable: true, get: function () { return typed_object_1.RelationContext; } });
|
|
137
|
+
Object.defineProperty(exports, "RELATION_CONTEXT", { enumerable: true, get: function () { return typed_object_1.RELATION_CONTEXT; } });
|
|
138
|
+
// Re-export bc's shared authoring vocabulary so authors import the whole surface from
|
|
139
|
+
// litedbmodel (leaf vocabulary is the Catalog; expressions/structured control are bc's —
|
|
140
|
+
// C2). There is NO litedbmodel-local authoring opcode beyond the Catalog.
|
|
141
|
+
var behavior_contracts_1 = require("behavior-contracts");
|
|
142
|
+
Object.defineProperty(exports, "SemanticBehavior", { enumerable: true, get: function () { return behavior_contracts_1.SemanticBehavior; } });
|
|
143
|
+
Object.defineProperty(exports, "behavior", { enumerable: true, get: function () { return behavior_contracts_1.behavior; } });
|
|
144
|
+
Object.defineProperty(exports, "when", { enumerable: true, get: function () { return behavior_contracts_1.when; } });
|
|
145
|
+
Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return behavior_contracts_1.concat; } });
|
|
146
|
+
Object.defineProperty(exports, "add", { enumerable: true, get: function () { return behavior_contracts_1.add; } });
|
|
147
|
+
Object.defineProperty(exports, "sub", { enumerable: true, get: function () { return behavior_contracts_1.sub; } });
|
|
148
|
+
Object.defineProperty(exports, "mul", { enumerable: true, get: function () { return behavior_contracts_1.mul; } });
|
|
149
|
+
Object.defineProperty(exports, "div", { enumerable: true, get: function () { return behavior_contracts_1.div; } });
|
|
150
|
+
Object.defineProperty(exports, "mod", { enumerable: true, get: function () { return behavior_contracts_1.mod; } });
|
|
151
|
+
Object.defineProperty(exports, "neg", { enumerable: true, get: function () { return behavior_contracts_1.neg; } });
|
|
152
|
+
Object.defineProperty(exports, "eq", { enumerable: true, get: function () { return behavior_contracts_1.eq; } });
|
|
153
|
+
Object.defineProperty(exports, "ne", { enumerable: true, get: function () { return behavior_contracts_1.ne; } });
|
|
154
|
+
Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return behavior_contracts_1.lt; } });
|
|
155
|
+
Object.defineProperty(exports, "le", { enumerable: true, get: function () { return behavior_contracts_1.le; } });
|
|
156
|
+
Object.defineProperty(exports, "gt", { enumerable: true, get: function () { return behavior_contracts_1.gt; } });
|
|
157
|
+
Object.defineProperty(exports, "ge", { enumerable: true, get: function () { return behavior_contracts_1.ge; } });
|
|
158
|
+
Object.defineProperty(exports, "and", { enumerable: true, get: function () { return behavior_contracts_1.and; } });
|
|
159
|
+
Object.defineProperty(exports, "or", { enumerable: true, get: function () { return behavior_contracts_1.or; } });
|
|
160
|
+
Object.defineProperty(exports, "not", { enumerable: true, get: function () { return behavior_contracts_1.not; } });
|
|
161
|
+
Object.defineProperty(exports, "coalesce", { enumerable: true, get: function () { return behavior_contracts_1.coalesce; } });
|
|
162
|
+
Object.defineProperty(exports, "len", { enumerable: true, get: function () { return behavior_contracts_1.len; } });
|
|
163
|
+
Object.defineProperty(exports, "opt", { enumerable: true, get: function () { return behavior_contracts_1.opt; } });
|
|
164
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scp/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;AAEH,4BAA4B;AAC5B,qCAQmB;AAPjB,8GAAA,mBAAmB,OAAA;AACnB,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA;AACnB,oHAAA,yBAAyB,OAAA;AACzB,+GAAA,oBAAoB,OAAA;AAItB,0BAA0B;AAC1B,2BAAkC;AAAzB,gGAAA,UAAU,OAAA;AASnB,2CAA2C;AAC3C,mDAK0B;AAJxB,+GAAA,aAAa,OAAA;AACb,+GAAA,aAAa,OAAA;AACb,+GAAA,aAAa,OAAA;AACb,+GAAA,aAAa,OAAA;AAWf,2EAA2E;AAC3E,mCAA2C;AAAlC,yGAAA,eAAe,OAAA;AAGxB,+FAA+F;AAC/F,qCAAsF;AAA7E,qGAAA,UAAU,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,iGAAA,MAAM,OAAA;AAAE,mGAAA,QAAQ,OAAA;AAAE,gGAAA,KAAK,OAAA;AAGlE,gGAAgG;AAChG,qDAAqD;AAA5C,mHAAA,gBAAgB,OAAA;AAGzB,oDAAoD;AACpD,iCAKiB;AAJf,2GAAA,kBAAkB,OAAA;AAClB,gHAAA,uBAAuB,OAAA;AACvB,gHAAA,uBAAuB,OAAA;A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