@tinyshed/tinystore 0.8.0 → 0.9.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/backup.d.ts +2 -0
- package/dist/backup.js +1 -0
- package/dist/blobs.d.ts +18 -1
- package/dist/blobs.js +52 -45
- package/dist/directory.d.ts +72 -0
- package/dist/directory.js +121 -0
- package/dist/index.d.ts +2 -1
- package/dist/jobs.d.ts +33 -9
- package/dist/jobs.js +137 -34
- package/dist/metrics.d.ts +5 -1
- package/dist/metrics.js +2 -0
- package/dist/query.d.ts +8 -1
- package/dist/query.js +25 -4
- package/dist/search.d.ts +6 -1
- package/dist/search.js +4 -2
- package/dist/sql.d.ts +26 -2
- package/dist/sql.js +18 -5
- package/dist/store.d.ts +9 -0
- package/dist/store.js +11 -0
- package/dist/wire/protocol.d.ts +200 -7
- package/dist/wire/protocol.js +602 -13
- package/package.json +8 -8
- package/src/backup.ts +3 -0
- package/src/blobs.ts +66 -45
- package/src/directory.ts +235 -0
- package/src/index.ts +9 -0
- package/src/jobs.ts +178 -41
- package/src/metrics.ts +7 -1
- package/src/query.ts +28 -6
- package/src/search.ts +10 -5
- package/src/sql.ts +35 -5
- package/src/store.ts +12 -0
- package/src/wire/protocol.ts +637 -13
package/dist/wire/protocol.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare const methods: {
|
|
|
14
14
|
readonly 'blobs.usage': 1035;
|
|
15
15
|
readonly 'blobs.clear': 1036;
|
|
16
16
|
readonly 'blobs.read': 1037;
|
|
17
|
+
readonly 'blobs.directory': 1038;
|
|
18
|
+
readonly 'blobs.scan': 1039;
|
|
19
|
+
readonly 'blobs.changes': 1040;
|
|
20
|
+
readonly 'blobs.forget': 1041;
|
|
17
21
|
/**
|
|
18
22
|
* Answers once the store has the message, not once anyone handled it; in a
|
|
19
23
|
* database's transaction, it is handed over once the transaction commits.
|
|
@@ -46,6 +50,7 @@ export declare const methods: {
|
|
|
46
50
|
readonly 'jobs.keep': 523;
|
|
47
51
|
readonly 'jobs.watch': 524;
|
|
48
52
|
readonly 'jobs.tx': 525;
|
|
53
|
+
readonly 'jobs.counts': 526;
|
|
49
54
|
readonly 'kv.bucket.open': 257;
|
|
50
55
|
readonly 'kv.get': 258;
|
|
51
56
|
readonly 'kv.has': 259;
|
|
@@ -176,6 +181,8 @@ export declare const BackupWritten: import("./codec.ts").Message<{
|
|
|
176
181
|
readonly bytes: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
177
182
|
/** the store seals values with a key the backup does not hold */
|
|
178
183
|
readonly keyLeftOut: readonly [3, import("./codec.ts").Codec<boolean, boolean>];
|
|
184
|
+
/** the databases opened with backup false, which it holds nothing of */
|
|
185
|
+
readonly excluded: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
|
|
179
186
|
}>;
|
|
180
187
|
/**
|
|
181
188
|
* Opens a set of files by name, made the first time.
|
|
@@ -251,10 +258,13 @@ export declare const BlobsWritten: import("./codec.ts").Message<{
|
|
|
251
258
|
}>;
|
|
252
259
|
/**
|
|
253
260
|
* A piece of a file's bytes: an upload's DATA from the client, a read's from
|
|
254
|
-
* the server.
|
|
261
|
+
* the server. A piece of a growing directory's file brings the file's size
|
|
262
|
+
* and time as it was read, so that the reader sees it moved.
|
|
255
263
|
*/
|
|
256
264
|
export declare const BlobsPiece: import("./codec.ts").Message<{
|
|
257
265
|
readonly bytes: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
|
|
266
|
+
readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
267
|
+
readonly lastModified: readonly [3, import("./codec.ts").Codec<number, number>];
|
|
258
268
|
}>;
|
|
259
269
|
/**
|
|
260
270
|
* A get's answer: what the file carries, none when there is no file, and all
|
|
@@ -376,6 +386,108 @@ export declare const BlobsUsage: import("./codec.ts").Message<{
|
|
|
376
386
|
readonly count: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
377
387
|
readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
378
388
|
}>;
|
|
389
|
+
/**
|
|
390
|
+
* Opens a directory by name: a folder of the server's machine, which the
|
|
391
|
+
* store lists and reads and never writes. Its handle takes get, head, list,
|
|
392
|
+
* usage and read as a set of files' does, each answered from the list the
|
|
393
|
+
* last scan wrote but a get's and a read's bytes, which come from the disk;
|
|
394
|
+
* every call that writes a file is invalid. A connection that came with a
|
|
395
|
+
* token names no path: it opens the directory the server was given under the
|
|
396
|
+
* name, and one the server was not given is invalid.
|
|
397
|
+
*/
|
|
398
|
+
export declare const BlobsDirectory: import("./codec.ts").Message<{
|
|
399
|
+
/** [a-z0-9][a-z0-9_-]{0,63}, never a set of files' name too */
|
|
400
|
+
readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
401
|
+
/** the folder on the server's machine; the server's own when absent */
|
|
402
|
+
readonly path: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
403
|
+
/** a scan on the store's background work, a period apart */
|
|
404
|
+
readonly every: readonly [3, import("./codec.ts").Codec<number, number>];
|
|
405
|
+
/** names a scan passes over, * for any run of a name's characters */
|
|
406
|
+
readonly ignore: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
|
|
407
|
+
/** a read holds to no version and goes up to the size now */
|
|
408
|
+
readonly growing: readonly [5, import("./codec.ts").Codec<boolean, boolean>];
|
|
409
|
+
}>;
|
|
410
|
+
/**
|
|
411
|
+
* What a scan found, and what the list holds once it ended.
|
|
412
|
+
*/
|
|
413
|
+
export declare const BlobsScanned: import("./codec.ts").Message<{
|
|
414
|
+
readonly added: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
415
|
+
readonly changed: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
416
|
+
readonly removed: readonly [3, import("./codec.ts").Codec<number, number>];
|
|
417
|
+
/** what it met and could not list: a link, a folder it cannot read, another disk */
|
|
418
|
+
readonly skipped: readonly [4, import("./codec.ts").Codec<number, number>];
|
|
419
|
+
readonly count: readonly [5, import("./codec.ts").Codec<number, number>];
|
|
420
|
+
readonly size: readonly [6, import("./codec.ts").Codec<number, number>];
|
|
421
|
+
}>;
|
|
422
|
+
/**
|
|
423
|
+
* The changes of a directory past a cursor, from the first file it listed
|
|
424
|
+
* when absent.
|
|
425
|
+
*/
|
|
426
|
+
export declare const BlobsSince: import("./codec.ts").Message<{
|
|
427
|
+
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
428
|
+
/** a page's next */
|
|
429
|
+
readonly after: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
430
|
+
}>;
|
|
431
|
+
export declare const BlobsChange: import("./codec.ts").Message<{
|
|
432
|
+
/** the whole path in the directory */
|
|
433
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
434
|
+
/** added, changed or removed */
|
|
435
|
+
readonly change: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
436
|
+
/** none once removed */
|
|
437
|
+
readonly info: readonly [3, import("./codec.ts").Message<{
|
|
438
|
+
/** within the folder the call stood in */
|
|
439
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
440
|
+
readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
441
|
+
/** the SHA-256 of its bytes in hex, quoted */
|
|
442
|
+
readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
443
|
+
readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
|
|
444
|
+
readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
|
|
445
|
+
readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
|
|
446
|
+
readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
447
|
+
}>];
|
|
448
|
+
}>;
|
|
449
|
+
/**
|
|
450
|
+
* A page of changes in the order the scans wrote them, 1000 at most; next is
|
|
451
|
+
* always there, with no items the cursor to ask from after the next scan.
|
|
452
|
+
*/
|
|
453
|
+
export declare const BlobsChanges: import("./codec.ts").Message<{
|
|
454
|
+
readonly items: readonly [1, import("./codec.ts").Codec<Read<{
|
|
455
|
+
/** the whole path in the directory */
|
|
456
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
457
|
+
/** added, changed or removed */
|
|
458
|
+
readonly change: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
459
|
+
/** none once removed */
|
|
460
|
+
readonly info: readonly [3, import("./codec.ts").Message<{
|
|
461
|
+
/** within the folder the call stood in */
|
|
462
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
463
|
+
readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
464
|
+
/** the SHA-256 of its bytes in hex, quoted */
|
|
465
|
+
readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
466
|
+
readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
|
|
467
|
+
readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
|
|
468
|
+
readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
|
|
469
|
+
readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
470
|
+
}>];
|
|
471
|
+
}>[], readonly import("./codec.ts").Written<{
|
|
472
|
+
/** the whole path in the directory */
|
|
473
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
474
|
+
/** added, changed or removed */
|
|
475
|
+
readonly change: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
476
|
+
/** none once removed */
|
|
477
|
+
readonly info: readonly [3, import("./codec.ts").Message<{
|
|
478
|
+
/** within the folder the call stood in */
|
|
479
|
+
readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
480
|
+
readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
481
|
+
/** the SHA-256 of its bytes in hex, quoted */
|
|
482
|
+
readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
483
|
+
readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
|
|
484
|
+
readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
|
|
485
|
+
readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
|
|
486
|
+
readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
487
|
+
}>];
|
|
488
|
+
}>[]>];
|
|
489
|
+
readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
490
|
+
}>;
|
|
379
491
|
/**
|
|
380
492
|
* A message published on a channel's branch, as docs/guides/channels/README.md has
|
|
381
493
|
* it: every subscription listening there now receives it.
|
|
@@ -663,11 +775,13 @@ export declare const JobsCall: import("./codec.ts").Message<{
|
|
|
663
775
|
readonly timeZone: readonly [9, import("./codec.ts").Codec<string, string>];
|
|
664
776
|
}>;
|
|
665
777
|
/**
|
|
666
|
-
* The job under an id
|
|
778
|
+
* The job under an id; or, for a cancel, a job without one by the row a page
|
|
779
|
+
* gave, its id left out.
|
|
667
780
|
*/
|
|
668
781
|
export declare const JobsId: import("./codec.ts").Message<{
|
|
669
782
|
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
670
783
|
readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
784
|
+
readonly row: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
671
785
|
}>;
|
|
672
786
|
/**
|
|
673
787
|
* Whether a call did what it asked: an add added, an update changed, a cancel
|
|
@@ -698,6 +812,14 @@ export declare const JobsJob: import("./codec.ts").Message<{
|
|
|
698
812
|
/** the last run a handler finished */
|
|
699
813
|
readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
|
|
700
814
|
readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
|
|
815
|
+
/** where a job without an id lies, which a cancel names it by */
|
|
816
|
+
readonly row: readonly [14, import("./codec.ts").Codec<string, string>];
|
|
817
|
+
/** a walk's: why the job's value no longer reads, the job left out */
|
|
818
|
+
readonly failure: readonly [15, import("./codec.ts").Message<{
|
|
819
|
+
readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
820
|
+
readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
821
|
+
readonly what: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
822
|
+
}>];
|
|
701
823
|
}>;
|
|
702
824
|
/**
|
|
703
825
|
* A page of a queue's jobs: those whose ids start with a prefix, in the byte
|
|
@@ -714,6 +836,8 @@ export declare const JobsList: import("./codec.ts").Message<{
|
|
|
714
836
|
readonly after: readonly [4, import("./codec.ts").Codec<string, string>];
|
|
715
837
|
/** 100 when absent, 1000 at most */
|
|
716
838
|
readonly limit: readonly [5, import("./codec.ts").Codec<number, number>];
|
|
839
|
+
/** a job whose value no longer reads comes as its failure in its place, not the page's */
|
|
840
|
+
readonly walk: readonly [6, import("./codec.ts").Codec<boolean, boolean>];
|
|
717
841
|
}>;
|
|
718
842
|
export declare const JobsPage: import("./codec.ts").Message<{
|
|
719
843
|
readonly jobs: readonly [1, import("./codec.ts").Codec<Read<{
|
|
@@ -735,6 +859,14 @@ export declare const JobsPage: import("./codec.ts").Message<{
|
|
|
735
859
|
/** the last run a handler finished */
|
|
736
860
|
readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
|
|
737
861
|
readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
|
|
862
|
+
/** where a job without an id lies, which a cancel names it by */
|
|
863
|
+
readonly row: readonly [14, import("./codec.ts").Codec<string, string>];
|
|
864
|
+
/** a walk's: why the job's value no longer reads, the job left out */
|
|
865
|
+
readonly failure: readonly [15, import("./codec.ts").Message<{
|
|
866
|
+
readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
867
|
+
readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
868
|
+
readonly what: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
869
|
+
}>];
|
|
738
870
|
}>[], readonly import("./codec.ts").Written<{
|
|
739
871
|
readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
|
|
740
872
|
readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
@@ -754,9 +886,30 @@ export declare const JobsPage: import("./codec.ts").Message<{
|
|
|
754
886
|
/** the last run a handler finished */
|
|
755
887
|
readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
|
|
756
888
|
readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
|
|
889
|
+
/** where a job without an id lies, which a cancel names it by */
|
|
890
|
+
readonly row: readonly [14, import("./codec.ts").Codec<string, string>];
|
|
891
|
+
/** a walk's: why the job's value no longer reads, the job left out */
|
|
892
|
+
readonly failure: readonly [15, import("./codec.ts").Message<{
|
|
893
|
+
readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
894
|
+
readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
895
|
+
readonly what: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
|
|
896
|
+
}>];
|
|
757
897
|
}>[]>];
|
|
758
898
|
readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
759
899
|
}>;
|
|
900
|
+
/**
|
|
901
|
+
* How many jobs a queue holds in each state, from one snapshot; a done job
|
|
902
|
+
* has left it.
|
|
903
|
+
*/
|
|
904
|
+
export declare const JobsCounts: import("./codec.ts").Message<{
|
|
905
|
+
/** due later */
|
|
906
|
+
readonly scheduled: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
907
|
+
/** due, and no handler runs it yet */
|
|
908
|
+
readonly waiting: readonly [2, import("./codec.ts").Codec<number, number>];
|
|
909
|
+
readonly running: readonly [3, import("./codec.ts").Codec<number, number>];
|
|
910
|
+
/** kept for the queue's keep */
|
|
911
|
+
readonly failed: readonly [4, import("./codec.ts").Codec<number, number>];
|
|
912
|
+
}>;
|
|
760
913
|
/**
|
|
761
914
|
* Starts the queue's worker for the client: the server claims its jobs as they
|
|
762
915
|
* fall due and hands each over as a held job, no more at once than the
|
|
@@ -823,7 +976,7 @@ export declare const JobsKept: import("./codec.ts").Message<{
|
|
|
823
976
|
}>;
|
|
824
977
|
/**
|
|
825
978
|
* One write of a transaction: an add, a set or an update with its call, or a
|
|
826
|
-
* cancel with its id.
|
|
979
|
+
* cancel with its id or its row.
|
|
827
980
|
*/
|
|
828
981
|
export declare const JobsOp: import("./codec.ts").Message<{
|
|
829
982
|
/** jobs.add, jobs.set, jobs.update or jobs.cancel */
|
|
@@ -845,6 +998,7 @@ export declare const JobsOp: import("./codec.ts").Message<{
|
|
|
845
998
|
readonly id: readonly [3, import("./codec.ts").Message<{
|
|
846
999
|
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
847
1000
|
readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
1001
|
+
readonly row: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
848
1002
|
}>];
|
|
849
1003
|
}>;
|
|
850
1004
|
/**
|
|
@@ -872,6 +1026,7 @@ export declare const JobsTx: import("./codec.ts").Message<{
|
|
|
872
1026
|
readonly id: readonly [3, import("./codec.ts").Message<{
|
|
873
1027
|
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
874
1028
|
readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
1029
|
+
readonly row: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
875
1030
|
}>];
|
|
876
1031
|
}>[], readonly import("./codec.ts").Written<{
|
|
877
1032
|
/** jobs.add, jobs.set, jobs.update or jobs.cancel */
|
|
@@ -893,6 +1048,7 @@ export declare const JobsTx: import("./codec.ts").Message<{
|
|
|
893
1048
|
readonly id: readonly [3, import("./codec.ts").Message<{
|
|
894
1049
|
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
895
1050
|
readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
1051
|
+
readonly row: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
896
1052
|
}>];
|
|
897
1053
|
}>[]>];
|
|
898
1054
|
}>;
|
|
@@ -1425,6 +1581,8 @@ export declare const MetricsAggregateAsked: import("./codec.ts").Message<{
|
|
|
1425
1581
|
readonly calendar: readonly [7, import("./codec.ts").Codec<string, string>];
|
|
1426
1582
|
/** an IANA name, UTC among them, which calendar takes */
|
|
1427
1583
|
readonly timeZone: readonly [8, import("./codec.ts").Codec<string, string>];
|
|
1584
|
+
/** a NaN sample counts in no bucket, which says how many it passed over: skipped */
|
|
1585
|
+
readonly skipNan: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1428
1586
|
}>;
|
|
1429
1587
|
/**
|
|
1430
1588
|
* A bucket of an aggregate: its value, or a timer's percentile's bounds.
|
|
@@ -1444,6 +1602,8 @@ export declare const MetricsBucket: import("./codec.ts").Message<{
|
|
|
1444
1602
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1445
1603
|
/** its first step began before the bucket before it */
|
|
1446
1604
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1605
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1606
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1447
1607
|
}>;
|
|
1448
1608
|
/**
|
|
1449
1609
|
* A group's buckets, or a part of them: a group longer than a body goes on
|
|
@@ -1467,6 +1627,8 @@ export declare const MetricsGroup: import("./codec.ts").Message<{
|
|
|
1467
1627
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1468
1628
|
/** its first step began before the bucket before it */
|
|
1469
1629
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1630
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1631
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1470
1632
|
}>[], readonly import("./codec.ts").Written<{
|
|
1471
1633
|
/** where it begins */
|
|
1472
1634
|
readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
@@ -1482,6 +1644,8 @@ export declare const MetricsGroup: import("./codec.ts").Message<{
|
|
|
1482
1644
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1483
1645
|
/** its first step began before the bucket before it */
|
|
1484
1646
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1647
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1648
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1485
1649
|
}>[]>];
|
|
1486
1650
|
/** the next part goes on with this group; on a page's last, the next page's first */
|
|
1487
1651
|
readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
|
|
@@ -1505,6 +1669,8 @@ export declare const MetricsAggregates: import("./codec.ts").Message<{
|
|
|
1505
1669
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1506
1670
|
/** its first step began before the bucket before it */
|
|
1507
1671
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1672
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1673
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1508
1674
|
}>[], readonly import("./codec.ts").Written<{
|
|
1509
1675
|
/** where it begins */
|
|
1510
1676
|
readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
@@ -1520,6 +1686,8 @@ export declare const MetricsAggregates: import("./codec.ts").Message<{
|
|
|
1520
1686
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1521
1687
|
/** its first step began before the bucket before it */
|
|
1522
1688
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1689
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1690
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1523
1691
|
}>[]>];
|
|
1524
1692
|
/** the next part goes on with this group; on a page's last, the next page's first */
|
|
1525
1693
|
readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
|
|
@@ -1541,6 +1709,8 @@ export declare const MetricsAggregates: import("./codec.ts").Message<{
|
|
|
1541
1709
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1542
1710
|
/** its first step began before the bucket before it */
|
|
1543
1711
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1712
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1713
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1544
1714
|
}>[], readonly import("./codec.ts").Written<{
|
|
1545
1715
|
/** where it begins */
|
|
1546
1716
|
readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
@@ -1556,6 +1726,8 @@ export declare const MetricsAggregates: import("./codec.ts").Message<{
|
|
|
1556
1726
|
readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
|
|
1557
1727
|
/** its first step began before the bucket before it */
|
|
1558
1728
|
readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
|
|
1729
|
+
/** the NaN samples it passed over, with skipNan */
|
|
1730
|
+
readonly skipped: readonly [10, import("./codec.ts").Codec<number, number>];
|
|
1559
1731
|
}>[]>];
|
|
1560
1732
|
/** the next part goes on with this group; on a page's last, the next page's first */
|
|
1561
1733
|
readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
|
|
@@ -2587,7 +2759,8 @@ export declare const SqlMigration: import("./codec.ts").Message<{
|
|
|
2587
2759
|
}>;
|
|
2588
2760
|
/**
|
|
2589
2761
|
* Opens a database. Migrations, when given, are applied and checked; without
|
|
2590
|
-
* them the file opens as it is.
|
|
2762
|
+
* them the file opens as it is. One that backups leave out lies in local/
|
|
2763
|
+
* rather than sql/, and a name whose file lies in the other folder is invalid.
|
|
2591
2764
|
*/
|
|
2592
2765
|
export declare const SqlOpen: import("./codec.ts").Message<{
|
|
2593
2766
|
/** [a-z0-9][a-z0-9_-]{0,63} */
|
|
@@ -2603,6 +2776,8 @@ export declare const SqlOpen: import("./codec.ts").Message<{
|
|
|
2603
2776
|
}>[]>];
|
|
2604
2777
|
/** full or os: how far its commits go before they return; the store's own when absent */
|
|
2605
2778
|
readonly durability: readonly [3, import("./codec.ts").Codec<string, string>];
|
|
2779
|
+
/** false: no backup takes it, nor any node; true when absent */
|
|
2780
|
+
readonly backup: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
|
|
2606
2781
|
}>;
|
|
2607
2782
|
/**
|
|
2608
2783
|
* A statement's text and the values of its ?s, in order. In a batch it may
|
|
@@ -2627,15 +2802,33 @@ export declare const SqlStatement: import("./codec.ts").Message<{
|
|
|
2627
2802
|
readonly values: readonly [3, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
|
|
2628
2803
|
}>;
|
|
2629
2804
|
/**
|
|
2630
|
-
*
|
|
2631
|
-
|
|
2805
|
+
* A column a statement's rows are ordered by, named as its rows name it.
|
|
2806
|
+
*/
|
|
2807
|
+
export declare const SqlOrder: import("./codec.ts").Message<{
|
|
2808
|
+
readonly column: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
2809
|
+
readonly descending: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
|
|
2810
|
+
}>;
|
|
2811
|
+
/**
|
|
2812
|
+
* What a statement gives back: its rows, one row or none, one value, or each
|
|
2813
|
+
* row as the reader reads it. A write with returning runs on the writer, its
|
|
2814
|
+
* rows given once it is durable. Each reads one snapshot of five seconds at
|
|
2815
|
+
* most; with order, the columns its text orders its rows by, a unique one
|
|
2816
|
+
* last, it reads on past that after the last row it sent, and without it
|
|
2817
|
+
* fails limit there.
|
|
2632
2818
|
*/
|
|
2633
2819
|
export declare const SqlQuery: import("./codec.ts").Message<{
|
|
2634
2820
|
readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
|
|
2635
2821
|
readonly text: readonly [2, import("./codec.ts").Codec<string, string>];
|
|
2636
2822
|
readonly values: readonly [3, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
|
|
2637
|
-
/** all, one or
|
|
2823
|
+
/** all, one, scalar or each */
|
|
2638
2824
|
readonly want: readonly [4, import("./codec.ts").Codec<string, string>];
|
|
2825
|
+
readonly order: readonly [5, import("./codec.ts").Codec<Read<{
|
|
2826
|
+
readonly column: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
2827
|
+
readonly descending: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
|
|
2828
|
+
}>[], readonly import("./codec.ts").Written<{
|
|
2829
|
+
readonly column: readonly [1, import("./codec.ts").Codec<string, string>];
|
|
2830
|
+
readonly descending: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
|
|
2831
|
+
}>[]>];
|
|
2639
2832
|
}>;
|
|
2640
2833
|
/**
|
|
2641
2834
|
* Rows a statement gave, a part of them a message: the first part names the
|