@cobol-ts/cursor-loader-indexed-graph-state 0.0.0-stage → 0.0.17

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.
Files changed (41) hide show
  1. package/README.md +452 -3
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.js +23 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/src/indexed.state.codec.d.ts +16 -0
  6. package/dist/src/indexed.state.codec.js +427 -0
  7. package/dist/src/indexed.state.codec.js.map +1 -0
  8. package/dist/src/indexed.state.configuration.d.ts +12 -0
  9. package/dist/src/indexed.state.configuration.js +45 -0
  10. package/dist/src/indexed.state.configuration.js.map +1 -0
  11. package/dist/src/indexed.state.exports.spec.d.ts +1 -0
  12. package/dist/src/indexed.state.exports.spec.js +23 -0
  13. package/dist/src/indexed.state.exports.spec.js.map +1 -0
  14. package/dist/src/indexed.state.file.d.ts +20 -0
  15. package/dist/src/indexed.state.file.js +147 -0
  16. package/dist/src/indexed.state.file.js.map +1 -0
  17. package/dist/src/indexed.state.file.spec.d.ts +1 -0
  18. package/dist/src/indexed.state.file.spec.js +345 -0
  19. package/dist/src/indexed.state.file.spec.js.map +1 -0
  20. package/dist/src/indexed.state.join.d.ts +36 -0
  21. package/dist/src/indexed.state.join.js +222 -0
  22. package/dist/src/indexed.state.join.js.map +1 -0
  23. package/dist/src/indexed.state.join.spec.d.ts +1 -0
  24. package/dist/src/indexed.state.join.spec.js +270 -0
  25. package/dist/src/indexed.state.join.spec.js.map +1 -0
  26. package/dist/src/indexed.state.number.spec.d.ts +1 -0
  27. package/dist/src/indexed.state.number.spec.js +102 -0
  28. package/dist/src/indexed.state.number.spec.js.map +1 -0
  29. package/dist/src/indexed.state.optional.spec.d.ts +1 -0
  30. package/dist/src/indexed.state.optional.spec.js +63 -0
  31. package/dist/src/indexed.state.optional.spec.js.map +1 -0
  32. package/dist/src/indexed.state.parser.d.ts +34 -0
  33. package/dist/src/indexed.state.parser.js +237 -0
  34. package/dist/src/indexed.state.parser.js.map +1 -0
  35. package/dist/src/indexed.state.rolling.spec.d.ts +1 -0
  36. package/dist/src/indexed.state.rolling.spec.js +176 -0
  37. package/dist/src/indexed.state.rolling.spec.js.map +1 -0
  38. package/dist/src/indexed.state.schema.d.ts +48 -0
  39. package/dist/src/indexed.state.schema.js +118 -0
  40. package/dist/src/indexed.state.schema.js.map +1 -0
  41. package/package.json +64 -3
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const indexed_state_schema_1 = require("./indexed.state.schema");
4
+ const indexed_state_codec_1 = require("./indexed.state.codec");
5
+ describe('number-backed indexed accumulator', () => {
6
+ it.each([-Number.MAX_SAFE_INTEGER, -4294967297, -1, 0, 1, 4294967296, Number.MAX_SAFE_INTEGER])('round trips signed integer %s as a JavaScript number, using the same int64 bytes as bigint', value => {
7
+ const active = (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'amount', type: 'int', javascriptType: 'number' }]);
8
+ const wide = (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'amount', type: 'int' }]);
9
+ const numberRecord = (0, indexed_state_schema_1.createIndexedGraphRecord)(1);
10
+ numberRecord.customerId = 17n;
11
+ numberRecord.values[0] = value;
12
+ const bigRecord = (0, indexed_state_schema_1.createIndexedGraphRecord)(1);
13
+ bigRecord.customerId = 17n;
14
+ bigRecord.values[0] = BigInt(value);
15
+ const numberCodec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(active), bigCodec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(wide);
16
+ const a = new Uint8Array(16), b = new Uint8Array(16);
17
+ expect(numberCodec.encodeInto(numberRecord, a, 0)).toEqual(16);
18
+ expect(bigCodec.encodeInto(bigRecord, b, 0)).toEqual(16);
19
+ expect(a).toEqual(b);
20
+ const decoded = (0, indexed_state_schema_1.createIndexedGraphRecord)(1);
21
+ numberCodec.decodeInto(b, decoded);
22
+ expect(decoded.values).toEqual([value]);
23
+ expect(typeof decoded.values[0]).toEqual('number');
24
+ });
25
+ it('decodes a bounded span in a larger reused buffer without allocating a subarray', () => {
26
+ const schema = (0, indexed_state_schema_1.indexedGraphSchema)([
27
+ { name: 'amount', type: 'int', javascriptType: 'number' },
28
+ { name: 'positive', type: 'uint', javascriptType: 'number' },
29
+ { name: 'flag', type: 'bool' },
30
+ { name: 'score', type: 'double' }
31
+ ]);
32
+ const codec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(schema);
33
+ const input = (0, indexed_state_schema_1.createIndexedGraphRecord)(4);
34
+ input.customerId = 42n;
35
+ input.values[0] = -4294967297;
36
+ input.values[1] = Number.MAX_SAFE_INTEGER;
37
+ input.values[2] = true;
38
+ input.values[3] = -7.25;
39
+ const length = codec.encodedLength(input);
40
+ const buffer = new Uint8Array(length + 19);
41
+ buffer.fill(0xa5);
42
+ expect(codec.encodeInto(input, buffer, 7)).toBe(length);
43
+ const decoded = (0, indexed_state_schema_1.createIndexedGraphRecord)(4);
44
+ const slices = jest.spyOn(Uint8Array.prototype, 'subarray');
45
+ try {
46
+ codec.decodeInto(buffer, decoded, 7, length);
47
+ expect(slices).not.toHaveBeenCalled();
48
+ expect(decoded.customerId).toBe(42n);
49
+ expect(decoded.values).toStrictEqual([-4294967297, Number.MAX_SAFE_INTEGER, true, -7.25]);
50
+ expect(() => codec.decodeInto(buffer, decoded, 7, length - 1)).toThrow('Truncated double field score');
51
+ expect(() => codec.decodeInto(buffer, decoded, 7, length + 1)).toThrow('Trailing indexed graph data: 1 bytes');
52
+ expect(() => codec.decodeInto(buffer, decoded, 7, buffer.length)).toThrow('Invalid indexed state payload span');
53
+ }
54
+ finally {
55
+ slices.mockRestore();
56
+ }
57
+ });
58
+ it('keeps JavaScript representation out of the persisted schema', () => {
59
+ const active = (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'amount', type: 'int', javascriptType: 'number' }]);
60
+ const stored = (0, indexed_state_codec_1.decodeIndexedGraphSchema)((0, indexed_state_codec_1.encodeIndexedGraphSchema)(active));
61
+ expect(stored.nodes).toEqual([{ name: 'amount', type: 'int' }]);
62
+ expect((0, indexed_state_codec_1.prepareIndexedGraphCodec)(stored, active).storedToCurrent).toEqual([0]);
63
+ });
64
+ it('rejects unsafe stored numbers on read and write', () => {
65
+ const active = (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'amount', type: 'int', javascriptType: 'number' }]);
66
+ const codec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(active);
67
+ const record = (0, indexed_state_schema_1.createIndexedGraphRecord)(1);
68
+ record.values[0] = Number.MAX_SAFE_INTEGER + 1;
69
+ expect(() => codec.encodedLength(record)).toThrow('safe integer');
70
+ const raw = new Uint8Array(16);
71
+ new DataView(raw.buffer).setBigInt64(8, BigInt(Number.MAX_SAFE_INTEGER) + 1n, true);
72
+ expect(() => codec.decodeInto(raw, record)).toThrow('safe integer');
73
+ });
74
+ });
75
+ describe('indexed format shares canonical value types', () => {
76
+ it('derives the active type without persisting a local execution representation', () => {
77
+ expect((0, indexed_state_schema_1.indexedFieldValueType)({ name: 'amount', type: 'int', javascriptType: 'number' }))
78
+ .toEqual({ kind: 'scalar', semanticType: 'integer', javascriptType: 'number' });
79
+ expect((0, indexed_state_schema_1.indexedFieldValueType)({ name: 'amount', type: 'int' }))
80
+ .toEqual({ kind: 'scalar', semanticType: 'integer', javascriptType: 'bigint' });
81
+ expect((0, indexed_state_schema_1.indexedFieldValueType)({ name: 'quantity', type: 'uint', javascriptType: 'number' }))
82
+ .toEqual({ kind: 'scalar', semanticType: 'unsignedInteger', javascriptType: 'number' });
83
+ });
84
+ });
85
+ describe('active indexed schema from canonical types', () => {
86
+ it('preserves Number and BigInt choices without an active default', () => {
87
+ const active = (0, indexed_state_schema_1.indexedGraphSchemaFromValueTypes)([
88
+ { name: 'small', valueType: { kind: 'scalar', semanticType: 'integer', javascriptType: 'number' } },
89
+ { name: 'large', valueType: { kind: 'scalar', semanticType: 'integer', javascriptType: 'bigint' } },
90
+ { name: 'price', valueType: { kind: 'scalar', semanticType: 'float', javascriptType: 'number' } }
91
+ ]);
92
+ expect(active.nodes).toEqual([
93
+ { name: 'small', type: 'int', javascriptType: 'number' },
94
+ { name: 'large', type: 'int', javascriptType: 'bigint' },
95
+ { name: 'price', type: 'double' }
96
+ ]);
97
+ expect((0, indexed_state_codec_1.decodeIndexedGraphSchema)((0, indexed_state_codec_1.encodeIndexedGraphSchema)(active)).nodes).toEqual([
98
+ { name: 'small', type: 'int' }, { name: 'large', type: 'int' }, { name: 'price', type: 'double' }
99
+ ]);
100
+ });
101
+ });
102
+ //# sourceMappingURL=indexed.state.number.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexed.state.number.spec.js","sourceRoot":"","sources":["../../src/indexed.state.number.spec.ts"],"names":[],"mappings":";;AAAA,iEAA0I;AAC1I,+DAAiH;AAEjH,QAAQ,CAAC,mCAAmC,EAAC,GAAE,EAAE;IAC7C,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAC,CAAC,UAAU,EAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,UAAU,EAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CACrF,4FAA4F,EAAC,KAAK,CAAA,EAAE;QAChG,MAAM,MAAM,GAAC,IAAA,yCAAkB,EAAC,CAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;QACtF,MAAM,IAAI,GAAC,IAAA,yCAAkB,EAAC,CAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,YAAY,GAAC,IAAA,+CAAwB,EAAC,CAAC,CAAC,CAAC;QAC/C,YAAY,CAAC,UAAU,GAAC,GAAG,CAAC;QAC5B,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,GAAC,KAAK,C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AQ,EAAC,YAAY,EAAC,OAAO,EAAC,cAAc,EAAC,QAAQ,EAAC,EAAC;SACxF,CAAC,CAAA;QACF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACzB,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC;YACjD,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC;YACjD,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC;SAC/B,CAAC,CAAA;QACF,MAAM,CAAC,IAAA,8CAAwB,EAAC,IAAA,8CAAwB,EAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YAC7E,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,EAAC,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,EAAC,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC;SACnF,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const indexed_state_schema_1 = require("./indexed.state.schema");
4
+ const indexed_state_codec_1 = require("./indexed.state.codec");
5
+ describe('optional indexed scalar fields', () => {
6
+ const schema = (0, indexed_state_schema_1.indexedGraphSchema)([
7
+ { name: 'required', type: 'int', javascriptType: 'number' },
8
+ { name: 'minimum', type: 'int', javascriptType: 'number', optional: true },
9
+ { name: 'maximum', type: 'int', javascriptType: 'number', optional: true }
10
+ ]);
11
+ const codec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(schema);
12
+ const roundTrip = (values) => {
13
+ const record = (0, indexed_state_schema_1.createIndexedGraphRecord)(schema.nodes.length);
14
+ record.customerId = 4;
15
+ record.values.splice(0, record.values.length, ...values);
16
+ const bytes = new Uint8Array(codec.encodedLength(record));
17
+ expect(codec.encodeInto(record, bytes, 0)).toBe(bytes.length);
18
+ const decoded = (0, indexed_state_schema_1.createIndexedGraphRecord)(schema.nodes.length);
19
+ codec.decodeInto(bytes, decoded);
20
+ expect(decoded.values).toStrictEqual(values);
21
+ return bytes;
22
+ };
23
+ it('preserves the distinction between missing, zero, and negative extrema', () => {
24
+ expect(roundTrip([0, undefined, undefined]).length).toBe(8 + 8 + 1 + 1);
25
+ expect(roundTrip([0, 0, -3]).length).toBe(8 + 8 + 1 + 8 + 1 + 8);
26
+ expect(roundTrip([7, 1, -7]).length).toBe(8 + 8 + 1 + 8 + 1 + 8);
27
+ });
28
+ it('clears a reused decode slot when the next record has an absent optional value', () => {
29
+ const populated = roundTrip([5, 1, 9]);
30
+ const empty = roundTrip([5, undefined, undefined]);
31
+ const destination = (0, indexed_state_schema_1.createIndexedGraphRecord)(3);
32
+ codec.decodeInto(populated, destination);
33
+ codec.decodeInto(empty, destination);
34
+ expect(destination.values).toStrictEqual([5, undefined, undefined]);
35
+ });
36
+ it('round-trips the optional declaration in the stored schema', () => {
37
+ const decoded = (0, indexed_state_codec_1.decodeIndexedGraphSchema)((0, indexed_state_codec_1.encodeIndexedGraphSchema)(schema));
38
+ expect(decoded).toStrictEqual((0, indexed_state_schema_1.indexedGraphSchema)([
39
+ { name: 'required', type: 'int' },
40
+ { name: 'minimum', type: 'int', optional: true },
41
+ { name: 'maximum', type: 'int', optional: true }
42
+ ]));
43
+ expect(() => (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'bad', type: 'int', optional: false }])).toThrow('Invalid indexed state optional flag for bad');
44
+ });
45
+ it('preserves unchanged legacy scalar layout and refuses to persist missing required values', () => {
46
+ const old = (0, indexed_state_schema_1.indexedGraphSchema)([{ name: 'required', type: 'int', javascriptType: 'number' }]);
47
+ const legacy = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(old);
48
+ const record = (0, indexed_state_schema_1.createIndexedGraphRecord)(1);
49
+ record.values[0] = 7;
50
+ expect(legacy.encodedLength(record)).toBe(16);
51
+ record.values[0] = undefined;
52
+ expect(() => legacy.encodedLength(record)).toThrow('Cannot persist missing indexed state field required');
53
+ });
54
+ it('rejects removing presence encoding from a persisted optional field', () => {
55
+ const required = (0, indexed_state_schema_1.indexedGraphSchema)([
56
+ { name: 'required', type: 'int', javascriptType: 'number' },
57
+ { name: 'minimum', type: 'int', javascriptType: 'number' },
58
+ { name: 'maximum', type: 'int', javascriptType: 'number' }
59
+ ]);
60
+ expect(() => (0, indexed_state_codec_1.prepareIndexedGraphCodec)(schema, required)).toThrow('Indexed state optional field mismatch for minimum');
61
+ });
62
+ });
63
+ //# sourceMappingURL=indexed.state.optional.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexed.state.optional.spec.js","sourceRoot":"","sources":["../../src/indexed.state.optional.spec.ts"],"names":[],"mappings":";;AAAA,iEAAkF;AAClF,+DAAgH;AAEhH,QAAQ,CAAC,gCAAgC,EAAC,GAAE,EAAE;IAC1C,MAAM,MAAM,GAAC,IAAA,yCAAkB,EAAC;QAC5B,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC;QACpD,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC,QAAQ,EAAC,IAAI,EAAC;QACjE,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC,QAAQ,EAAC,IAAI,EAAC;KACpE,CAAC,CAAA;IACF,MAAM,KAAK,GAAC,IAAA,8CAAwB,EAAC,MAAM,CAAC,CAAA;IAE5C,MAAM,SAAS,GAAC,CAAC,MAAoC,EAAC,EAAE;QACpD,MAAM,MAAM,GAAC,IAAA,+CAAwB,EAAC,MAAM,C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AAO,CACzD,mDAAmD,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,34 @@
1
+ import type { Parser, ProjectionRecordState } from '@cobol-ts/cursor-loader-types';
2
+ import { type IndexedGraphRecord, type IndexedGraphSchema } from './indexed.state.schema';
3
+ import { type PreparedIndexedGraphCodec, type RemovedNodePolicy } from './indexed.state.codec';
4
+ /** Reused with the pooled physical record. A span is consumed before the next take(). */
5
+ interface IndexedPayloadSpan {
6
+ bytes: Uint8Array;
7
+ offset: number;
8
+ length: number;
9
+ }
10
+ export interface IndexedGraphParserConfig {
11
+ readonly activeSchema?: IndexedGraphSchema;
12
+ readonly removed?: RemovedNodePolicy;
13
+ readonly customerIdType?: 'number' | 'bigint';
14
+ readonly maxRecordBytes?: number;
15
+ scratch?: Uint8Array;
16
+ }
17
+ export interface IndexedGraphDetails extends IndexedGraphParserConfig {
18
+ readonly storedSchema: IndexedGraphSchema;
19
+ readonly codec: PreparedIndexedGraphCodec;
20
+ readonly indexByName: ReadonlyMap<string, number>;
21
+ }
22
+ export interface IndexedGraphRecordState extends ProjectionRecordState {
23
+ readonly data: IndexedGraphRecord;
24
+ readonly payload: IndexedPayloadSpan;
25
+ }
26
+ export declare function createIndexedGraphRecordState(): IndexedGraphRecordState;
27
+ export type IndexedGraphFieldPlan = {
28
+ readonly kind: 'entity-key';
29
+ } | {
30
+ readonly kind: 'node';
31
+ readonly index: number;
32
+ };
33
+ export declare const indexedGraphParser: Parser<IndexedGraphRecord, IndexedGraphParserConfig, IndexedGraphDetails, IndexedGraphRecordState, IndexedGraphFieldPlan>;
34
+ export {};
@@ -0,0 +1,237 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.indexedGraphParser = void 0;
4
+ exports.createIndexedGraphRecordState = createIndexedGraphRecordState;
5
+ const cursor_loader_types_1 = require("@cobol-ts/cursor-loader-types");
6
+ const indexed_state_schema_1 = require("./indexed.state.schema");
7
+ const indexed_state_codec_1 = require("./indexed.state.codec");
8
+ const RDW = 4;
9
+ const EMPTY = new Uint8Array(0);
10
+ function createIndexedGraphRecordState() {
11
+ return { projectionViews: new Map(), data: (0, indexed_state_schema_1.createIndexedGraphRecord)(0), payload: { bytes: EMPTY, offset: 0, length: 0 } };
12
+ }
13
+ function checkMax(config) {
14
+ const max = config.maxRecordBytes ?? 65535;
15
+ if (!Number.isSafeInteger(max) || max < RDW || max > 65535)
16
+ throw new Error('Indexed graph maximum record size must be from 4 to 65535');
17
+ return max;
18
+ }
19
+ /** Return undefined until a full RDW record exists, without constructing a per-record payload. */
20
+ function payloadBuffered(record, config) {
21
+ const start = record.startByte;
22
+ const span = record.recordState.payload;
23
+ if (record.lastValidByte - start < RDW) {
24
+ if (!record.fileFinished)
25
+ return undefined;
26
+ record.endByte = record.lastValidByte;
27
+ if (record.lastValidByte === start) {
28
+ span.bytes = EMPTY;
29
+ span.offset = 0;
30
+ span.length = 0;
31
+ return span;
32
+ } // Generic cursor detects EOF.
33
+ return { errors: [`Truncated indexed graph RDW header: ${record.lastValidByte - start} bytes`] };
34
+ }
35
+ let offset = 0, got = 0, length = 0, controlA = 0, controlB = 0;
36
+ for (let bufferIndex = 0; bufferIndex < record.buffers.length; bufferIndex++) {
37
+ const buffer = record.buffers[bufferIndex];
38
+ const end = offset + buffer.length;
39
+ if (end <= start) {
40
+ offset = end;
41
+ continue;
42
+ }
43
+ for (let i = Math.max(0, start - offset); i < buffer.length && got < RDW; i++) {
44
+ const b = buffer[i];
45
+ if (got < 2)
46
+ length = length * 256 + b;
47
+ else if (got === 2)
48
+ controlA = b;
49
+ else
50
+ controlB = b;
51
+ got++;
52
+ }
53
+ if (got === RDW)
54
+ break;
55
+ offset = end;
56
+ }
57
+ if (got !== RDW)
58
+ throw new Error('Indexed graph RDW header outside available buffers');
59
+ if (controlA !== 0 || controlB !== 0) {
60
+ record.endByte = start + RDW;
61
+ return { errors: [`Unsupported indexed graph RDW control bytes ${controlA}, ${controlB}`] };
62
+ }
63
+ if (length < RDW || length > checkMax(config)) {
64
+ record.endByte = start + RDW;
65
+ return { errors: [`Invalid indexed graph RDW length ${length}`] };
66
+ }
67
+ if (record.lastValidByte < start + length) {
68
+ if (!record.fileFinished)
69
+ return undefined;
70
+ record.endByte = record.lastValidByte;
71
+ return { errors: [`Truncated indexed graph record: expected ${length} bytes`] };
72
+ }
73
+ record.endByte = start + length;
74
+ const from = start + RDW, to = start + length;
75
+ if (from === to) {
76
+ span.bytes = EMPTY;
77
+ span.offset = 0;
78
+ span.length = 0;
79
+ return span;
80
+ }
81
+ offset = 0;
82
+ let written = 0;
83
+ let result;
84
+ for (let bufferIndex = 0; bufferIndex < record.buffers.length; bufferIndex++) {
85
+ const buffer = record.buffers[bufferIndex];
86
+ const end = offset + buffer.length;
87
+ if (end <= from) {
88
+ offset = end;
89
+ continue;
90
+ }
91
+ if (offset >= to)
92
+ break;
93
+ const a = Math.max(0, from - offset), b = Math.min(buffer.length, to - offset);
94
+ if (a < b) {
95
+ if (written === 0 && offset + b >= to) {
96
+ span.bytes = buffer;
97
+ span.offset = a;
98
+ span.length = b - a;
99
+ return span;
100
+ }
101
+ if (result === undefined) {
102
+ if (config.scratch === undefined || config.scratch.length < to - from)
103
+ config.scratch = new Uint8Array(checkMax(config) - RDW);
104
+ result = config.scratch;
105
+ }
106
+ // Split records are uncommon. Copy directly instead of allocating
107
+ // one subarray view for each fragment.
108
+ for (let i = a; i < b; i++)
109
+ result[written++] = buffer[i];
110
+ }
111
+ offset = end;
112
+ }
113
+ if (written !== to - from)
114
+ throw new Error('Indexed graph record payload outside available buffers');
115
+ span.bytes = result;
116
+ span.offset = 0;
117
+ span.length = to - from;
118
+ return span;
119
+ }
120
+ async function payload(record, config) {
121
+ let result = payloadBuffered(record, config);
122
+ while (result === undefined) {
123
+ await record.readMore();
124
+ result = payloadBuffered(record, config);
125
+ }
126
+ return result;
127
+ }
128
+ function errors(value) { return 'errors' in value; }
129
+ function readAt(record, index) {
130
+ if (index < 0 || index >= record.values.length)
131
+ throw new Error(`Invalid indexed graph field ${index}`);
132
+ return record.values[index];
133
+ }
134
+ function toNumber(record, index) {
135
+ const value = readAt(record, index);
136
+ if (typeof value === 'number')
137
+ return value;
138
+ if (typeof value === 'bigint') {
139
+ const n = Number(value);
140
+ if (Number.isSafeInteger(n))
141
+ return n;
142
+ }
143
+ throw new Error(`Indexed graph field ${index} is not a safe number`);
144
+ }
145
+ function indexOf(plan) {
146
+ if (plan.kind !== 'node')
147
+ throw new Error('customerId can only be accessed as an integer');
148
+ return plan.index;
149
+ }
150
+ function integer(record, _details, plan) {
151
+ if (plan.kind === 'entity-key') {
152
+ const value = Number(record.customerId);
153
+ if (!Number.isSafeInteger(value))
154
+ throw new Error('Indexed graph customerId exceeds safe integer range');
155
+ return value;
156
+ }
157
+ const value = toNumber(record, plan.index);
158
+ if (!Number.isSafeInteger(value))
159
+ throw new Error(`Indexed graph field ${plan.index} is not an integer`);
160
+ return value;
161
+ }
162
+ function float(record, _details, plan) { return toNumber(record, indexOf(plan)); }
163
+ function string(record, _details, plan) {
164
+ const index = indexOf(plan), value = readAt(record, index);
165
+ if (typeof value !== 'string')
166
+ throw new Error(`Indexed graph field ${index} is not a string`);
167
+ return value;
168
+ }
169
+ function character(record, details, plan) {
170
+ const value = string(record, details, plan);
171
+ if (value.length !== 1)
172
+ throw new Error('Indexed graph field is not a character');
173
+ return value;
174
+ }
175
+ /** Decode in-place when the entire RDW record is already buffered.
176
+ * A synchronous result is essential for the prepared cursor's Promise-free hot path. */
177
+ function decodeRecord(record, details, span) {
178
+ if (errors(span))
179
+ return span;
180
+ if (record.endByte === record.startByte)
181
+ return {}; // Generic cursor detects EOF.
182
+ const target = record.recordState.data;
183
+ if (target.values.length !== details.codec.activeSchema.nodes.length) {
184
+ target.values.length = details.codec.activeSchema.nodes.length;
185
+ target.values.fill(undefined);
186
+ }
187
+ try {
188
+ details.codec.decodeInto(span.bytes, target, span.offset, span.length);
189
+ return target;
190
+ }
191
+ catch (error) {
192
+ return { errors: [`${record.source}: record ${record.recordNumber}: indexed graph decode: ${error instanceof Error ? error.message : String(error)}`] };
193
+ }
194
+ }
195
+ function parseBuffered(record, details) {
196
+ const bytes = payloadBuffered(record, details);
197
+ return bytes === undefined ? undefined : decodeRecord(record, details, bytes);
198
+ }
199
+ exports.indexedGraphParser = {
200
+ toDebugString: cursor_loader_types_1.bytesToDebugString,
201
+ compileProjectionPath(details, _context, path) {
202
+ if (path.length !== 1 || typeof path[0] !== 'string')
203
+ throw new Error(`Indexed graph projection requires a scalar field name`);
204
+ if (path[0] === 'customerId')
205
+ return { kind: 'entity-key' };
206
+ const index = details.indexByName.get(path[0]);
207
+ if (index === undefined)
208
+ throw new Error(`Unknown indexed graph field ${path[0]}`);
209
+ return { kind: 'node', index };
210
+ },
211
+ integer, float, string, character,
212
+ indexedScalars: {
213
+ integer: (r, d, i) => integer(r, d, i), float: (r, d, i) => float(r, d, i),
214
+ string: (r, d, i) => string(r, d, i), character: (r, d, i) => character(r, d, i)
215
+ },
216
+ async prepare(record, config) {
217
+ const bytes = await payload(record, config);
218
+ if (errors(bytes))
219
+ return bytes;
220
+ if (record.endByte === record.startByte)
221
+ return { errors: ['Indexed graph file is missing its schema record'] };
222
+ try {
223
+ const storedSchema = (0, indexed_state_codec_1.decodeIndexedGraphSchema)(bytes.bytes.subarray(bytes.offset, bytes.offset + bytes.length));
224
+ const activeSchema = config.activeSchema ?? storedSchema;
225
+ const codec = (0, indexed_state_codec_1.prepareIndexedGraphCodec)(storedSchema, activeSchema, config.removed, config.customerIdType);
226
+ return { ...config, storedSchema, codec, indexByName: new Map(codec.activeSchema.nodes.map((n, i) => [n.name, i])) };
227
+ }
228
+ catch (error) {
229
+ return { errors: [`Invalid indexed graph schema: ${error instanceof Error ? error.message : String(error)}`] };
230
+ }
231
+ },
232
+ parseBuffered,
233
+ async parse(record, details) {
234
+ return decodeRecord(record, details, await payload(record, details));
235
+ }
236
+ };
237
+ //# sourceMappingURL=indexed.state.parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexed.state.parser.js","sourceRoot":"","sources":["../../src/indexed.state.parser.ts"],"names":[],"mappings":";;;AA+BA,sEAEC;AAhCD,uEAAiE;AACjE,iEAAgH;AAChH,+DAA8I;AAE9I,MAAM,GAAG,GAAC,CAAC,CAAC;AACZ,MAAM,KAAK,GAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAyB9B,SAAgB,6BAA6B;IACzC,OAAO,EAAC,eAAe,EAAC,IAAI,GAAG,EAAE,EAAC,IAAI,EAAC,IAAA,+CAAwB,EAAC,CAAC,CAAC,EAAC,OAAO,EAAC,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,EAAC,CAAC;AAChH,CAAC;AAED,SAAS,QAAQ,CAAC,MAA+B;IAC7C,MAAM,GAAG,GAAC,MAAM,CAAC,cAAc,IAAE,KAAK,CAAC;IACvC,IAAG,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,IAAE,GAAG,GAAC,GAAG,IAAE,GAAG,GAAC,KAAK;QAAC,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/H,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kGAAkG;AAClG,SAAS,eAAe,CAAC,MAA2D,EAAC,MAA+B;IAChH,MAAM,KAAK,GAAC,MAAM,CAAC,SAAS,CAAC;IAC7B,MAAM,IAAI,GAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC;IACtC,IAAG,MAAM,CAAC,aAAa,GAAC,KAAK,GAAC,GAAG,EAAE,CAAC;QAChC,IAAG,CAAC,MAAM,CAAC,YAAY;YAAC,OAAO,SAAS,CAAC;QACzC,MAAM,CAAC,OAAO,GAAC,MAAM,CAAC,aAAa,CAAC;QACpC,IAAG,MAAM,CAAC,aAAa,KAAG,KAAK,EAAC,CAAC;YAAA,IAAI,CAAC,KAAK,G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