@cobol-ts/cursor-file 0.0.14 → 0.0.16
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 +39 -5
- package/dist/src/cursor.file.d.ts +33 -1
- package/dist/src/cursor.file.js +118 -0
- package/dist/src/cursor.file.js.map +1 -1
- package/dist/src/cursor.file.leased.spec.d.ts +1 -0
- package/dist/src/cursor.file.leased.spec.js +53 -0
- package/dist/src/cursor.file.leased.spec.js.map +1 -0
- package/dist/src/cursor.file.node.d.ts +3 -0
- package/dist/src/cursor.file.node.js +14 -0
- package/dist/src/cursor.file.node.js.map +1 -1
- package/dist/src/cursor.file.node.spec.js +23 -0
- package/dist/src/cursor.file.node.spec.js.map +1 -1
- package/dist/src/cursor.file.result.d.ts +6 -0
- package/dist/src/cursor.file.result.js +8 -0
- package/dist/src/cursor.file.result.js.map +1 -1
- package/dist/src/cursor.file.sync.spec.d.ts +1 -0
- package/dist/src/cursor.file.sync.spec.js +17 -0
- package/dist/src/cursor.file.sync.spec.js.map +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -14,6 +14,20 @@ This package now owns the normal end-to-end source-opening path. Given a file de
|
|
|
14
14
|
- applies the selected row-error policy;
|
|
15
15
|
- manages successful result/projection lifetime.
|
|
16
16
|
|
|
17
|
+
## Quick orientation
|
|
18
|
+
|
|
19
|
+
**In this README:** [Position in the pipeline](#position-in-the-pipeline) · [File definitions](#file-definitions) · [Infrastructure](#infrastructure) · [Parser registry](#parser-registry) · [Source setup](#source-setup) · [The normal application model](#the-normal-application-model) · [Cursor variants](#cursor-variants) · [`FileCursorResult`](#filecursorresult) · [Result and projection pooling](#result-and-projection-pooling) · [Why `close()` is explicit](#why-close-is-explicit) · …
|
|
20
|
+
|
|
21
|
+
**Responsibility.** Prepare parser-backed file readers, physical byte buffers and reusable leased record/projection views.
|
|
22
|
+
|
|
23
|
+
**Boundary.** Use callback scanning for the production hot path; the older iterable cursor interfaces remain compatibility APIs.
|
|
24
|
+
|
|
25
|
+
**Public modules.** [cursor.file.ts](./src/cursor.file.ts), [cursor.file.node.ts](./src/cursor.file.node.ts), [cursor.file.result.ts](./src/cursor.file.result.ts).
|
|
26
|
+
|
|
27
|
+
**Tests.** [cursor.file.callback.spec.ts](src/cursor.file.callback.spec.ts), [cursor.file.leased.spec.ts](src/cursor.file.leased.spec.ts), [cursor.file.node.spec.ts](src/cursor.file.node.spec.ts) (+2 more)
|
|
28
|
+
|
|
29
|
+
**Related packages.** [@cobol-ts/cursor-record](../cursor-record/README.md) · [@cobol-ts/cursor-loader-types](../cursor-loader-types/README.md).
|
|
30
|
+
|
|
17
31
|
## Position in the pipeline
|
|
18
32
|
|
|
19
33
|
```text
|
|
@@ -99,7 +113,7 @@ After runtime file-type lookup, generic cursor orchestration deliberately erases
|
|
|
99
113
|
|
|
100
114
|
## Source setup
|
|
101
115
|
|
|
102
|
-
Before
|
|
116
|
+
Before the first data-row callback (or legacy iterator yield), `cursor-file`:
|
|
103
117
|
|
|
104
118
|
1. looks up the parser;
|
|
105
119
|
2. obtains parser configuration;
|
|
@@ -114,7 +128,9 @@ This is intentional: setup failures are not recoverable row data errors.
|
|
|
114
128
|
|
|
115
129
|
## The normal application model
|
|
116
130
|
|
|
117
|
-
|
|
131
|
+
For new execution code, use `scanThrowingFileCursor()` to borrow a projection within a synchronous callback. If another owner must retain a record, use `scanLeasedFileCursor()` and transfer/close the lease explicitly. Both return one completion Promise and process buffered records without per-record iterator Promises.
|
|
132
|
+
|
|
133
|
+
The following illustrates the **legacy `createFileCursor()` async-iterator API**, which remains supported for consumers that require it. Applications using this API consume only the values required by a calculation and close every successful result:
|
|
118
134
|
|
|
119
135
|
```ts
|
|
120
136
|
for await (const row of cursor) {
|
|
@@ -257,7 +273,9 @@ If successful parser output cannot be bound into a result, the physical record i
|
|
|
257
273
|
|
|
258
274
|
Lazy projection accessor errors happen later while a successful result is open. They propagate as exceptions enriched by the projection layer with the currently bound source, record number, logical **indexed application** path (when selection context exists), COBOL declaration/controller path when applicable, and parser-specific physical rendering. Constructing the indexed path is deferred to the error path.
|
|
259
275
|
|
|
260
|
-
##
|
|
276
|
+
## Compatibility example: iterable cursor
|
|
277
|
+
|
|
278
|
+
The following uses `createFileCursor()` rather than the callback scanner. It is retained for clients of the legacy API, not as the recommended hot path.
|
|
261
279
|
|
|
262
280
|
```ts
|
|
263
281
|
interface Customer {
|
|
@@ -353,8 +371,13 @@ callback throws. A Promise-returning callback is rejected.
|
|
|
353
371
|
|
|
354
372
|
Parsers supporting synchronous framing of already-buffered bytes can supply
|
|
355
373
|
`parseBuffered`; a result of `undefined` means another buffer must be read.
|
|
356
|
-
|
|
357
|
-
|
|
374
|
+
The batch cursor pairs `parseBuffered` with the synchronous Node buffer-fill
|
|
375
|
+
adapter (`fillNodeFileBufferSync`) and checks that `take()` never returns a
|
|
376
|
+
Promise, including at refills. This is the path used for COBOL, CSV, JSONL and
|
|
377
|
+
indexed history in composed execution. Parsers without `parseBuffered` retain
|
|
378
|
+
their legacy asynchronous APIs, but cannot be used through the strict batch
|
|
379
|
+
cursor without an appropriate synchronous parser. The final pooled buffer may
|
|
380
|
+
be only partly filled.
|
|
358
381
|
|
|
359
382
|
### Record-object pool injection
|
|
360
383
|
|
|
@@ -375,3 +398,14 @@ The existing iterator API retains its original reference-counted default.
|
|
|
375
398
|
## Optional operation metrics
|
|
376
399
|
|
|
377
400
|
Supply one `metrics?: IPutMetrics` in `FileCursorInfrastructure` (for instance a `MemoryMetrics` from `@cobol-ts/metrics`). The reader forwards that instance to pooled physical-record resources and the projection factory; the callback scanner additionally records completed callback-row visits. Omitting the option uses the allocation-free `NullMetrics`. No global mutable state is introduced. Counters are operation counts rather than execution times. See `@cobol-ts/metrics` and the benchmark's `README.metrics.md`.
|
|
401
|
+
|
|
402
|
+
### Leased callback scanning
|
|
403
|
+
|
|
404
|
+
`scanLeasedFileCursor()` is the synchronous-callback alternative when a
|
|
405
|
+
*downstream result* must own the input record. It transfers a
|
|
406
|
+
`FileCursorResult` lease to each callback. The callback must either close it or
|
|
407
|
+
transfer it to an owning downstream result; the scanner does **not** close a
|
|
408
|
+
successfully transferred physical record after the callback. Projection and
|
|
409
|
+
buffer release occurs when the final owner closes. Errors before transfer are
|
|
410
|
+
closed during failure cleanup. The original `scanThrowingFileCursor()` remains
|
|
411
|
+
a borrowed callback API and continues to close records automatically.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Errors, type ErrorsOr } from "@cobol-ts/errors";
|
|
2
2
|
import { type CanonicalProjection, type FillFileBuffer, type ParserRegistry, type ProjectionDefinition } from "@cobol-ts/cursor-loader-types";
|
|
3
3
|
import { type RecordObjectPool } from "@cobol-ts/cursor-record";
|
|
4
|
-
import { type FileCursorResult } from "./cursor.file.result";
|
|
4
|
+
import { type FileCursorResult, type PreparedFileCursorResult } from "./cursor.file.result";
|
|
5
5
|
import { type IPutMetrics } from "@cobol-ts/metrics";
|
|
6
6
|
export interface CursorFileDefinition<TProjection, TFileType extends string> {
|
|
7
7
|
readonly filename: string;
|
|
@@ -30,6 +30,15 @@ export interface FileCursorInfrastructure<TFile, TFileType extends string> {
|
|
|
30
30
|
* physical-record objects are pooled/reused throughout the scan.
|
|
31
31
|
*/
|
|
32
32
|
export declare function scanThrowingFileCursor<TProjection, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>, onRecord: (record: TProjection, parsed: unknown) => void | boolean): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* High-throughput record scanning with explicit lease ownership.
|
|
35
|
+
*
|
|
36
|
+
* The callback owns the returned FileCursorResult. The scanner never closes
|
|
37
|
+
* successful records after handing them off. A graph result may retain this
|
|
38
|
+
* lease and close it in its own final-release cleanup. Callbacks must be
|
|
39
|
+
* synchronous; a thrown callback is cleaned up before propagation.
|
|
40
|
+
*/
|
|
41
|
+
export declare function scanLeasedFileCursor<TProjection, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>, onRecord: (lease: FileCursorResult<TProjection>, parsed: unknown) => void | boolean): Promise<void>;
|
|
33
42
|
/**
|
|
34
43
|
* Return successful projected rows directly.
|
|
35
44
|
*
|
|
@@ -51,6 +60,29 @@ export declare function createErrorsOrFileCursor<TProjection, TFile, TFileType e
|
|
|
51
60
|
* Configuration/preparation failures also throw.
|
|
52
61
|
*/
|
|
53
62
|
export declare function createThrowingFileCursor<TProjection, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>): AsyncGenerator<FileCursorResult<TProjection>, void, void>;
|
|
63
|
+
/** A resumable cursor. take() is synchronous for buffered rows; a Promise
|
|
64
|
+
* is returned only for physical input. The caller closes every returned lease. */
|
|
65
|
+
export interface CallbackLeaseCursor<T> {
|
|
66
|
+
take(): T | undefined | Promise<T | undefined>;
|
|
67
|
+
close(): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
/** A batch cursor never suspends while advancing a record, even at a physical
|
|
70
|
+
* buffer boundary. Setup and close may remain asynchronous. */
|
|
71
|
+
export interface SynchronousCallbackLeaseCursor<T> {
|
|
72
|
+
take(): T | undefined;
|
|
73
|
+
close(): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
/** Prepared cursor whose next record may be asynchronous for non-batch readers. */
|
|
76
|
+
export declare function openPreparedFileCursor<TProjection, TRepresentation, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>): Promise<CallbackLeaseCursor<PreparedFileCursorResult<TProjection, TRepresentation>>>;
|
|
77
|
+
/** Strict synchronous read contract for batch cursors. All physical refills
|
|
78
|
+
* must use a synchronous adapter. Only opening and closing return Promises. */
|
|
79
|
+
export declare function openPreparedFileCursorSync<TProjection, TRepresentation, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>): Promise<SynchronousCallbackLeaseCursor<PreparedFileCursorResult<TProjection, TRepresentation>>>;
|
|
80
|
+
/**
|
|
81
|
+
* Prepared row stream for source-backed compiled access. The returned lease
|
|
82
|
+
* owns both a stable projection and the parser representation; neither is
|
|
83
|
+
* valid after close(). No per-row wrapper is introduced.
|
|
84
|
+
*/
|
|
85
|
+
export declare function createPreparedFileCursor<TProjection, TRepresentation, TFile, TFileType extends string>(definition: CursorFileDefinition<TProjection, TFileType>, file: TFile, infrastructure: FileCursorInfrastructure<TFile, TFileType>): AsyncGenerator<PreparedFileCursorResult<TProjection, TRepresentation>, void, void>;
|
|
54
86
|
/**
|
|
55
87
|
* Ignore recoverable row parser errors and continue.
|
|
56
88
|
*
|
package/dist/src/cursor.file.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.scanThrowingFileCursor = scanThrowingFileCursor;
|
|
4
|
+
exports.scanLeasedFileCursor = scanLeasedFileCursor;
|
|
4
5
|
exports.createFileCursor = createFileCursor;
|
|
5
6
|
exports.createErrorsOrFileCursor = createErrorsOrFileCursor;
|
|
6
7
|
exports.createThrowingFileCursor = createThrowingFileCursor;
|
|
8
|
+
exports.openPreparedFileCursor = openPreparedFileCursor;
|
|
9
|
+
exports.openPreparedFileCursorSync = openPreparedFileCursorSync;
|
|
10
|
+
exports.createPreparedFileCursor = createPreparedFileCursor;
|
|
7
11
|
exports.createIgnoringFileCursor = createIgnoringFileCursor;
|
|
8
12
|
const errors_1 = require("@cobol-ts/errors");
|
|
9
13
|
const cursor_record_1 = require("@cobol-ts/cursor-record");
|
|
@@ -47,6 +51,52 @@ async function scanThrowingFileCursor(definition, file, infrastructure, onRecord
|
|
|
47
51
|
opened.close();
|
|
48
52
|
}
|
|
49
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* High-throughput record scanning with explicit lease ownership.
|
|
56
|
+
*
|
|
57
|
+
* The callback owns the returned FileCursorResult. The scanner never closes
|
|
58
|
+
* successful records after handing them off. A graph result may retain this
|
|
59
|
+
* lease and close it in its own final-release cleanup. Callbacks must be
|
|
60
|
+
* synchronous; a thrown callback is cleaned up before propagation.
|
|
61
|
+
*/
|
|
62
|
+
async function scanLeasedFileCursor(definition, file, infrastructure, onRecord) {
|
|
63
|
+
const opened = await openFileCursor(definition, file, {
|
|
64
|
+
...infrastructure,
|
|
65
|
+
recordPool: infrastructure.recordPool ?? (0, cursor_record_1.createReferenceCountedRecordPool)()
|
|
66
|
+
});
|
|
67
|
+
const resultPool = (0, cursor_file_result_1.createFileCursorResultPool)(opened.projection);
|
|
68
|
+
try {
|
|
69
|
+
await opened.scanLeasedRecords((parsed, physicalRecord) => {
|
|
70
|
+
if ((0, errors_1.isErrors)(parsed)) {
|
|
71
|
+
physicalRecord.close();
|
|
72
|
+
throw new errors_1.ErrorsException(parsed.errors, parsed.reference);
|
|
73
|
+
}
|
|
74
|
+
// createFileCursorResult transfers ownership. If projection binding
|
|
75
|
+
// fails it must close the acquired record, not the scanner.
|
|
76
|
+
let lease;
|
|
77
|
+
try {
|
|
78
|
+
lease = (0, cursor_file_result_1.createFileCursorResult)(parsed, physicalRecord, resultPool);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
physicalRecord.close();
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
return onRecord(lease, parsed);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
// Callback failure before graph ownership is established.
|
|
89
|
+
// A successful graph close has already set this to undefined.
|
|
90
|
+
if (lease.physicalRecord !== undefined)
|
|
91
|
+
lease.close();
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
opened.close();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
50
100
|
/**
|
|
51
101
|
* Return successful projected rows directly.
|
|
52
102
|
*
|
|
@@ -111,6 +161,72 @@ async function* createThrowingFileCursor(definition, file, infrastructure) {
|
|
|
111
161
|
opened.close();
|
|
112
162
|
}
|
|
113
163
|
}
|
|
164
|
+
/** Shared setup for ordinary (possibly asynchronous) and batch cursors. */
|
|
165
|
+
async function openPreparedCursorMode(definition, file, infrastructure, synchronous) {
|
|
166
|
+
const opened = await openFileCursor(definition, file, infrastructure);
|
|
167
|
+
const pool = (0, cursor_file_result_1.createFileCursorResultPool)(opened.projection);
|
|
168
|
+
let pending;
|
|
169
|
+
const receive = (parsed, physical) => {
|
|
170
|
+
if ((0, errors_1.isErrors)(parsed))
|
|
171
|
+
throw new errors_1.ErrorsException(parsed.errors, parsed.reference);
|
|
172
|
+
pending = (0, cursor_file_result_1.createFileCursorResult)(parsed, physical, pool);
|
|
173
|
+
};
|
|
174
|
+
return {
|
|
175
|
+
take() {
|
|
176
|
+
pending = undefined;
|
|
177
|
+
const result = opened.takeRecord(receive);
|
|
178
|
+
if (result instanceof Promise) {
|
|
179
|
+
if (synchronous) {
|
|
180
|
+
// A wrongly configured parser/refill is a contract violation,
|
|
181
|
+
// never silently fall back to async processing in a batch.
|
|
182
|
+
void result.then(() => pending?.close(), () => { });
|
|
183
|
+
throw new Error(`Batch cursor ${definition.filename}: take() returned a Promise; check parser and file-buffer refill`);
|
|
184
|
+
}
|
|
185
|
+
return result.then(hasRow => hasRow ? pending : undefined);
|
|
186
|
+
}
|
|
187
|
+
return result ? pending : undefined;
|
|
188
|
+
},
|
|
189
|
+
async close() { opened.close(); }
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/** Prepared cursor whose next record may be asynchronous for non-batch readers. */
|
|
193
|
+
function openPreparedFileCursor(definition, file, infrastructure) {
|
|
194
|
+
return openPreparedCursorMode(definition, file, infrastructure, false);
|
|
195
|
+
}
|
|
196
|
+
/** Strict synchronous read contract for batch cursors. All physical refills
|
|
197
|
+
* must use a synchronous adapter. Only opening and closing return Promises. */
|
|
198
|
+
function openPreparedFileCursorSync(definition, file, infrastructure) {
|
|
199
|
+
return openPreparedCursorMode(definition, file, infrastructure, true);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Prepared row stream for source-backed compiled access. The returned lease
|
|
203
|
+
* owns both a stable projection and the parser representation; neither is
|
|
204
|
+
* valid after close(). No per-row wrapper is introduced.
|
|
205
|
+
*/
|
|
206
|
+
async function* createPreparedFileCursor(definition, file, infrastructure) {
|
|
207
|
+
const opened = await openFileCursor(definition, file, infrastructure);
|
|
208
|
+
const pool = (0, cursor_file_result_1.createFileCursorResultPool)(opened.projection);
|
|
209
|
+
try {
|
|
210
|
+
for await (const record of opened.recordCursor) {
|
|
211
|
+
if ((0, errors_1.isErrors)(record.result)) {
|
|
212
|
+
record.physicalRecord.close();
|
|
213
|
+
throw new errors_1.ErrorsException(record.result.errors, record.result.reference);
|
|
214
|
+
}
|
|
215
|
+
let lease;
|
|
216
|
+
try {
|
|
217
|
+
lease = (0, cursor_file_result_1.createFileCursorResult)(record.result, record.physicalRecord, pool);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
record.physicalRecord.close();
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
yield lease;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
finally {
|
|
227
|
+
opened.close();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
114
230
|
/**
|
|
115
231
|
* Ignore recoverable row parser errors and continue.
|
|
116
232
|
*
|
|
@@ -166,7 +282,9 @@ async function openFileCursor(definition, file, infrastructure) {
|
|
|
166
282
|
return {
|
|
167
283
|
recordCursor: opened.recordCursor,
|
|
168
284
|
projection,
|
|
285
|
+
takeRecord: opened.takeRecord,
|
|
169
286
|
scanRecords: opened.scanRecords,
|
|
287
|
+
scanLeasedRecords: opened.scanLeasedRecords,
|
|
170
288
|
close: opened.close
|
|
171
289
|
};
|
|
172
290
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.file.js","sourceRoot":"","sources":["../../src/cursor.file.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cursor.file.js","sourceRoot":"","sources":["../../src/cursor.file.ts"],"names":[],"mappings":";;AAiGA,wDA8BC;AAWD,oDAyCC;AAUD,4CAoCC;AAQD,4DAoCC;AAQD,4DAyCC;AAqDD,wDAQC;AAID,gEASC;AAOD,4DAwBC;AAOD,4DAwCC;AAtdD,6CAM0B;AAa1B,2DAMiC;AAEjC,mEAEqC;AAErC,6DAO8B;AAC9B,+CAAuE;AA+CvE;;;;;;;;;;GAUG;AACI,KAAK,UAAU,sBAAsB,CAGxC,UAAuD,EACvD,IAAW,EACX,cAAyD,EACzD,QAAgE;IAEhE,MAAM,OAAO,GAAC,cAAc,CAAC,OAAO,IAAE,sBAAY,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,UAAU,EAAC,IAAI,EAAC;QAChD,GAAG,cAAc;QACjB,UAAU,EAAE,cAAc,CAAC,UAAU,IAAI,IAAA,gDAAgC,GAAE;KAC9E,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7C,IAAI,CAAC;QACD,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,EAAC,cAAc,EAAE,EAAE;YAC/C,OAAO,CAAC,GAAG,CAAC,gBAAM,CAAC,gBAAgB,CAAC,CAAC;YACrC,IAAI,IAAA,iBAAQ,EAAC,MAAM,CAAC,EAAE,CAAC;gBACnB,MAAM,IAAI,wBAAe,CAAC,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC9D,CAAC;YACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAC,MAAM,EAAC,cAAc,CAAC,CAAC;YACxD,IAAI,CAAC;gBACD,OAAO,QAAQ,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@@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cursor_file_1 = require("./cursor.file");
|
|
4
|
+
const cursor_file_fixture_1 = require("./cursor.file.fixture");
|
|
5
|
+
it('transfers each physical record to a result that owns the file lease', async () => {
|
|
6
|
+
const names = [];
|
|
7
|
+
const owners = [];
|
|
8
|
+
await (0, cursor_file_1.scanLeasedFileCursor)(cursor_file_fixture_1.customerFileDefinition, (0, cursor_file_fixture_1.createTestFile)('ABA'), (0, cursor_file_fixture_1.createTestInfrastructure)(), lease => {
|
|
9
|
+
names.push(lease.result.name());
|
|
10
|
+
const result = { close: () => lease.close() };
|
|
11
|
+
owners.push(result);
|
|
12
|
+
result.close();
|
|
13
|
+
});
|
|
14
|
+
expect(names).toEqual(['Alice', 'Bob', 'Alice']);
|
|
15
|
+
expect(owners.length).toEqual(3);
|
|
16
|
+
});
|
|
17
|
+
it('can keep two upstream leases alive while processing subsequent records', async () => {
|
|
18
|
+
const names = [];
|
|
19
|
+
const owned = [];
|
|
20
|
+
await (0, cursor_file_1.scanLeasedFileCursor)(cursor_file_fixture_1.customerFileDefinition, (0, cursor_file_fixture_1.createTestFile)('ABA'), (0, cursor_file_fixture_1.createTestInfrastructure)(), lease => {
|
|
21
|
+
owned.push(lease);
|
|
22
|
+
names.push(lease.result.name());
|
|
23
|
+
});
|
|
24
|
+
expect(names).toEqual(['Alice', 'Bob', 'Alice']);
|
|
25
|
+
expect(owned.map(lease => lease.result.name())).toEqual(['Alice', 'Bob', 'Alice']);
|
|
26
|
+
for (const lease of owned)
|
|
27
|
+
lease.close();
|
|
28
|
+
for (const lease of owned)
|
|
29
|
+
expect(() => lease.result.name()).toThrow('Projection is not bound to a record');
|
|
30
|
+
});
|
|
31
|
+
it('cleans a leased record if the callback fails before transferring it', async () => {
|
|
32
|
+
let failed;
|
|
33
|
+
await expect((0, cursor_file_1.scanLeasedFileCursor)(cursor_file_fixture_1.customerFileDefinition, (0, cursor_file_fixture_1.createTestFile)('AB'), (0, cursor_file_fixture_1.createTestInfrastructure)(), lease => {
|
|
34
|
+
failed = lease;
|
|
35
|
+
throw new Error('evaluation failed');
|
|
36
|
+
})).rejects.toThrow('evaluation failed');
|
|
37
|
+
expect(() => failed.result.name()).toThrow('Projection is not bound to a record');
|
|
38
|
+
});
|
|
39
|
+
it('propagates downstream failure without closing a previously released lease again', async () => {
|
|
40
|
+
let upstream;
|
|
41
|
+
await expect((0, cursor_file_1.scanLeasedFileCursor)(cursor_file_fixture_1.customerFileDefinition, (0, cursor_file_fixture_1.createTestFile)('AB'), (0, cursor_file_fixture_1.createTestInfrastructure)(), lease => {
|
|
42
|
+
upstream = lease;
|
|
43
|
+
const result = { close: () => lease.close() };
|
|
44
|
+
try {
|
|
45
|
+
throw new Error('Downstream evaluation failed');
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
result.close();
|
|
49
|
+
}
|
|
50
|
+
})).rejects.toThrow('Downstream evaluation failed');
|
|
51
|
+
expect(() => upstream.result.name()).toThrow('Projection is not bound to a record');
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=cursor.file.leased.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.file.leased.spec.js","sourceRoot":"","sources":["../../src/cursor.file.leased.spec.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,+DAAoG;AAEpG,EAAE,CAAC,qEAAqE,EAAE,KAAK,IAAI,EAAE;IACjF,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,MAAM,MAAM,GAAsB,EAAE,CAAA;IACpC,MAAM,IAAA,kCAAoB,EAAC,4CAAsB,EAAC,IAAA,oCAAc,EAAC,KAAK,CAAC,EAAC,IAAA,8CAAwB,GAAE,EAAC,KAAK,CAAC,EAAE;QACvG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;QAC/B,MAAM,MAAM,GA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AC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAA;AACxF,CAAC,CAAC,CAAA"}
|
|
@@ -10,3 +10,6 @@ import type { FileHandle } from 'node:fs/promises';
|
|
|
10
10
|
* associated cursor is completed, cancelled, or fails.
|
|
11
11
|
*/
|
|
12
12
|
export declare function fillNodeFileBuffer(handle: FileHandle, destination: Uint8Array): Promise<number>;
|
|
13
|
+
/** Synchronous adapter for batch cursors. Uses the supplied pooled buffer and
|
|
14
|
+
* returns only at EOF or after filling it; it allocates no Promise at refills. */
|
|
15
|
+
export declare function fillNodeFileBufferSync(fd: number, destination: Uint8Array): number;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fillNodeFileBuffer = fillNodeFileBuffer;
|
|
4
|
+
exports.fillNodeFileBufferSync = fillNodeFileBufferSync;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
4
6
|
/**
|
|
5
7
|
* Fill an existing pooled buffer directly from a Node FileHandle.
|
|
6
8
|
*
|
|
@@ -21,4 +23,16 @@ async function fillNodeFileBuffer(handle, destination) {
|
|
|
21
23
|
}
|
|
22
24
|
return filled;
|
|
23
25
|
}
|
|
26
|
+
/** Synchronous adapter for batch cursors. Uses the supplied pooled buffer and
|
|
27
|
+
* returns only at EOF or after filling it; it allocates no Promise at refills. */
|
|
28
|
+
function fillNodeFileBufferSync(fd, destination) {
|
|
29
|
+
let filled = 0;
|
|
30
|
+
while (filled < destination.length) {
|
|
31
|
+
const count = (0, node_fs_1.readSync)(fd, destination, filled, destination.length - filled, null);
|
|
32
|
+
if (count === 0)
|
|
33
|
+
break;
|
|
34
|
+
filled += count;
|
|
35
|
+
}
|
|
36
|
+
return filled;
|
|
37
|
+
}
|
|
24
38
|
//# sourceMappingURL=cursor.file.node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.file.node.js","sourceRoot":"","sources":["../../src/cursor.file.node.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cursor.file.node.js","sourceRoot":"","sources":["../../src/cursor.file.node.ts"],"names":[],"mappings":";;AAaA,gDAQC;AAID,wDAQC;AAjCD,qCAAiC;AAGjC;;;;;;;;;GASG;AACI,KAAK,UAAU,kBAAkB,CAAC,MAAkB,EAAE,WAAuB;IAChF,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,OAAO,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,EAAC,SAAS,EAAC,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9F,IAAI,SAAS,KAAK,CAAC;YAAE,MAAM;QAC3B,MAAM,IAAI,SAAS,CAAC;IACxB,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;kFACkF;AAClF,SAAgB,sBAAsB,CAAC,EAAS,EAAC,WAAsB;IACnE,IAAI,MAAM,GAAC,CAAC,CAAC;IACb,OAAM,MAAM,GAAC,WAAW,CAAC,MAAM,EAAC,CAAC;QAC7B,MAAM,KAAK,GAAC,IAAA,kBAAQ,EAAC,EAAE,EAAC,WAAW,EAAC,MAAM,EAAC,WAAW,CAAC,MAAM,GAAC,MAAM,EAAC,IAAI,CAAC,CAAC;QAC3E,IAAG,KAAK,KAAG,CAAC;YAAC,MAAM;QACnB,MAAM,IAAE,KAAK,CAAC;IAClB,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cursor_file_node_1 = require("./cursor.file.node");
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_os_1 = require("node:os");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
4
7
|
test('short positive Node reads fill the existing destination until full or true EOF', async () => {
|
|
5
8
|
const bytes = Uint8Array.from([1, 2, 3, 4, 5]);
|
|
6
9
|
let offset = 0;
|
|
@@ -20,4 +23,24 @@ test('short positive Node reads fill the existing destination until full or true
|
|
|
20
23
|
expect(calls).toBe(4); // three short reads, then the *actual* EOF
|
|
21
24
|
expect(await (0, cursor_file_node_1.fillNodeFileBuffer)(file, target)).toBe(0);
|
|
22
25
|
});
|
|
26
|
+
test('synchronous Node adapter fills a reused buffer and stops only at EOF', () => {
|
|
27
|
+
const dir = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-sync-fill-'));
|
|
28
|
+
const name = (0, node_path_1.join)(dir, 'data.bin');
|
|
29
|
+
(0, node_fs_1.writeFileSync)(name, Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9]));
|
|
30
|
+
const fd = (0, node_fs_1.openSync)(name, 'r');
|
|
31
|
+
try {
|
|
32
|
+
const buffer = new Uint8Array(4);
|
|
33
|
+
expect((0, cursor_file_node_1.fillNodeFileBufferSync)(fd, buffer)).toBe(4);
|
|
34
|
+
expect([...buffer]).toStrictEqual([1, 2, 3, 4]);
|
|
35
|
+
expect((0, cursor_file_node_1.fillNodeFileBufferSync)(fd, buffer)).toBe(4);
|
|
36
|
+
expect([...buffer]).toStrictEqual([5, 6, 7, 8]);
|
|
37
|
+
expect((0, cursor_file_node_1.fillNodeFileBufferSync)(fd, buffer)).toBe(1);
|
|
38
|
+
expect(buffer[0]).toBe(9);
|
|
39
|
+
expect((0, cursor_file_node_1.fillNodeFileBufferSync)(fd, buffer)).toBe(0);
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
(0, node_fs_1.closeSync)(fd);
|
|
43
|
+
(0, node_fs_1.rmSync)(dir, { recursive: true, force: true });
|
|
44
|
+
}
|
|
45
|
+
});
|
|
23
46
|
//# sourceMappingURL=cursor.file.node.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.file.node.spec.js","sourceRoot":"","sources":["../../src/cursor.file.node.spec.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"cursor.file.node.spec.js","sourceRoot":"","sources":["../../src/cursor.file.node.spec.ts"],"names":[],"mappings":";;AACA,yDAA6E;AAC7E,qCAA4E;AAC5E,qCAA+B;AAC/B,yCAA+B;AAE/B,IAAI,CAAC,gFAAgF,EAAE,KAAK,IAAI,EAAE;IAC9F,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG;QACT,KAAK,CAAC,IAAI,CAAC,WAAuB,EAAE,QAAgB,EAAE,MAAc;YAChE,KAAK,EAAE,CAAC;YACR,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;YACzD,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC;YAChB,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;QAC9B,CAAC;KACqB,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,CAAC,MAAM,IAAA,qCAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAC,CAAC,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AAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,CAAC,IAAA,yCAAsB,EAAC,EAAE,EAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,IAAA,yCAAsB,EAAC,EAAE,EAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;YAAO,CAAC;QAAA,IAAA,mBAAS,EAAC,EAAE,CAAC,CAAC;QAAA,IAAA,gBAAM,EAAC,GAAG,EAAC,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,CAAC;IAAA,CAAC;AACpE,CAAC,CAAC,CAAC"}
|
|
@@ -32,11 +32,17 @@ export interface FileCursorResult<TResult> {
|
|
|
32
32
|
* Releasing the lease clears the projection binding and restores
|
|
33
33
|
* physicalRecord to undefined.
|
|
34
34
|
*/
|
|
35
|
+
/** A prepared result exposes the parser representation used by compiled accessors. */
|
|
36
|
+
export interface PreparedFileCursorResult<TProjection, TRepresentation> extends FileCursorResult<TProjection> {
|
|
37
|
+
readonly representation: TRepresentation;
|
|
38
|
+
}
|
|
35
39
|
export interface PooledFileCursorResult<TProjection, TRepresentation> {
|
|
36
40
|
readonly resultPool: FileCursorResultPool<TProjection, TRepresentation>;
|
|
37
41
|
readonly projection: ProjectionFactory<TProjection, TRepresentation>;
|
|
38
42
|
readonly result: TProjection;
|
|
39
43
|
physicalRecord: PhysicalRecordLifetime | undefined;
|
|
44
|
+
recordRepresentation: TRepresentation | undefined;
|
|
45
|
+
readonly representation: TRepresentation;
|
|
40
46
|
close(): void;
|
|
41
47
|
}
|
|
42
48
|
/**
|
|
@@ -28,6 +28,12 @@ function createFileCursorResultPool(projection) {
|
|
|
28
28
|
projection,
|
|
29
29
|
result: projection.create(),
|
|
30
30
|
physicalRecord: undefined,
|
|
31
|
+
recordRepresentation: undefined,
|
|
32
|
+
get representation() {
|
|
33
|
+
if (this.physicalRecord === undefined)
|
|
34
|
+
throw new Error("File cursor result is not active");
|
|
35
|
+
return this.recordRepresentation;
|
|
36
|
+
},
|
|
31
37
|
close: closeFileCursorResult
|
|
32
38
|
}));
|
|
33
39
|
return resultPool;
|
|
@@ -46,6 +52,7 @@ function createFileCursorResult(representation, physicalRecord, resultPool) {
|
|
|
46
52
|
const pooled = resultPool.acquire();
|
|
47
53
|
try {
|
|
48
54
|
pooled.projection.bind(pooled.result, representation, physicalRecord);
|
|
55
|
+
pooled.recordRepresentation = representation;
|
|
49
56
|
pooled.physicalRecord =
|
|
50
57
|
physicalRecord;
|
|
51
58
|
return pooled;
|
|
@@ -76,6 +83,7 @@ function closeFileCursorResult() {
|
|
|
76
83
|
this.projection.clear(this.result);
|
|
77
84
|
this.physicalRecord =
|
|
78
85
|
undefined;
|
|
86
|
+
this.recordRepresentation = undefined;
|
|
79
87
|
physicalRecord.close();
|
|
80
88
|
this.resultPool.release(this);
|
|
81
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.file.result.js","sourceRoot":"","sources":["../../src/cursor.file.result.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cursor.file.result.js","sourceRoot":"","sources":["../../src/cursor.file.result.ts"],"names":[],"mappings":";;AA0HA,gEAoDC;AAaD,wDAkDC;AA7OD,iEAGoC;AAsGpC;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,0BAA0B,CAItC,UAIC;IAMD,IAAI,UAIC,CAAC;IAGN,UAAU;QACN,IAAA,uCAAoB,EAMhB,GAAG,EAAE,CAAC,CAAC;YACH,UAAU;YAEV,UAAU;YAEV,MAAM,EACF,UAAU,CAAC,MAAM,EAAE;Y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EAAE,CAAC;IAGvB,IAAI,CAAC,UAAU,CAAC,OAAO,CACnB,IAAI,CACP,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cursor_file_1 = require("./cursor.file");
|
|
4
|
+
const cursor_file_fixture_1 = require("./cursor.file.fixture");
|
|
5
|
+
test('synchronous batch cursors reject any parser that returns a Promise', async () => {
|
|
6
|
+
const cursor = await (0, cursor_file_1.openPreparedFileCursorSync)(cursor_file_fixture_1.customerFileDefinition, (0, cursor_file_fixture_1.createTestFile)('AB'), (0, cursor_file_fixture_1.createTestInfrastructure)());
|
|
7
|
+
try {
|
|
8
|
+
expect(() => cursor.take()).toThrow('Batch cursor test.customer: take() returned a Promise; check parser and file-buffer refill');
|
|
9
|
+
// Allow the deliberately asynchronous test parser to finish before closing.
|
|
10
|
+
await Promise.resolve();
|
|
11
|
+
await Promise.resolve();
|
|
12
|
+
}
|
|
13
|
+
finally {
|
|
14
|
+
await cursor.close();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=cursor.file.sync.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.file.sync.spec.js","sourceRoot":"","sources":["../../src/cursor.file.sync.spec.ts"],"names":[],"mappings":";;AAAA,+CAAwD;AACxD,+DAAoG;AAEpG,IAAI,CAAC,oEAAoE,EAAC,KAAK,IAAE,EAAE;IAC/E,MAAM,MAAM,GAAC,MAAM,IAAA,wCAA0B,EAAC,4CAAsB,EAChE,IAAA,oCAAc,EAAC,IAAI,CAAC,EAAC,IAAA,8CAAwB,GAAE,CAAC,CAAA;IACpD,IAAG,CAAC;QACA,MAAM,CAAC,GAAE,EAAE,CAAA,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAC7B,4FAA4F,CAAC,CAAA;QACjG,4EAA4E;QAC5E,MAAM,OAAO,CAAC,OAAO,EAAE,CAAA;QACvB,MAAM,OAAO,CAAC,OAAO,EAAE,CAAA;IAC3B,CAAC;YAAO,CAAC;QAAA,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;IAAA,CAAC;AAClC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobol-ts/cursor-file",
|
|
3
3
|
"description": "the cursor that physically reads the file and returns the byte arrays to the cursor loader",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"types": "dist/index",
|
|
7
7
|
"browserslist": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cobol-ts/cursor-loader-types": "0.0.
|
|
21
|
-
"@cobol-ts/cursor-record": "0.0.
|
|
22
|
-
"@cobol-ts/metrics": "0.0.
|
|
20
|
+
"@cobol-ts/cursor-loader-types": "0.0.16",
|
|
21
|
+
"@cobol-ts/cursor-record": "0.0.16",
|
|
22
|
+
"@cobol-ts/metrics": "0.0.16"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"typescript": "^5.2.2",
|