@effectstream/db 0.100.19 → 0.100.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effectstream/db",
3
- "version": "0.100.19",
3
+ "version": "0.100.20",
4
4
  "license": "MIT",
5
5
  "homepage": "https://effectstream.github.io/docs/",
6
6
  "repository": {
@@ -21,11 +21,11 @@
21
21
  "./version": "./migrations/system-version.ts"
22
22
  },
23
23
  "dependencies": {
24
- "@effectstream/coroutine": "0.100.19",
25
- "@effectstream/log": "0.100.19",
26
- "@effectstream/runtime": "0.100.19",
27
- "@effectstream/sync": "0.100.19",
28
- "@effectstream/utils": "0.100.19",
24
+ "@effectstream/coroutine": "0.100.20",
25
+ "@effectstream/log": "0.100.20",
26
+ "@effectstream/runtime": "0.100.20",
27
+ "@effectstream/sync": "0.100.20",
28
+ "@effectstream/utils": "0.100.20",
29
29
  "@electric-sql/pglite": "^0.3.14",
30
30
  "@pgtyped/runtime": "2.4.2",
31
31
  "@pgtyped/parser": "2.4.2",
@@ -383,6 +383,61 @@ const getFutureGameInputByMaxTimestampIR: any = {"usedParamSet":{"max_timestamp"
383
383
  export const getFutureGameInputByMaxTimestamp = new PreparedQuery<IGetFutureGameInputByMaxTimestampParams,IGetFutureGameInputByMaxTimestampResult>(getFutureGameInputByMaxTimestampIR);
384
384
 
385
385
 
386
+ /** 'GetEarliestScheduledBlockHeight' parameters type */
387
+ export type IGetEarliestScheduledBlockHeightParams = void;
388
+
389
+ /** 'GetEarliestScheduledBlockHeight' return type */
390
+ export interface IGetEarliestScheduledBlockHeightResult {
391
+ min_block_height: number | null;
392
+ }
393
+
394
+ /** 'GetEarliestScheduledBlockHeight' query type */
395
+ export interface IGetEarliestScheduledBlockHeightQuery {
396
+ params: IGetEarliestScheduledBlockHeightParams;
397
+ result: IGetEarliestScheduledBlockHeightResult;
398
+ }
399
+
400
+ const getEarliestScheduledBlockHeightIR: any = {"usedParamSet":{},"params":[],"statement":"SELECT MIN(future_block_height) AS min_block_height\nFROM effectstream.rollup_input_future_block"};
401
+
402
+ /**
403
+ * Query generated from SQL:
404
+ * ```
405
+ * SELECT MIN(future_block_height) AS min_block_height
406
+ * FROM effectstream.rollup_input_future_block
407
+ * ```
408
+ */
409
+ export const getEarliestScheduledBlockHeight = new PreparedQuery<IGetEarliestScheduledBlockHeightParams,IGetEarliestScheduledBlockHeightResult>(getEarliestScheduledBlockHeightIR);
410
+
411
+
412
+ /** 'GetEarliestScheduledTimestamp' parameters type */
413
+ export type IGetEarliestScheduledTimestampParams = void;
414
+
415
+ /** 'GetEarliestScheduledTimestamp' return type */
416
+ export interface IGetEarliestScheduledTimestampResult {
417
+ min_timestamp: Date | null;
418
+ }
419
+
420
+ /** 'GetEarliestScheduledTimestamp' query type */
421
+ export interface IGetEarliestScheduledTimestampQuery {
422
+ params: IGetEarliestScheduledTimestampParams;
423
+ result: IGetEarliestScheduledTimestampResult;
424
+ }
425
+
426
+ const getEarliestScheduledTimestampIR: any = {"usedParamSet":{},"params":[],"statement":"SELECT MIN(rollup_input_future_timestamp.future_ms_timestamp) AS min_timestamp\nFROM effectstream.rollup_input_future_timestamp\nLEFT OUTER JOIN effectstream.rollup_input_result\n ON (effectstream.rollup_input_result.id = effectstream.rollup_input_future_timestamp.id)\nWHERE effectstream.rollup_input_result.id IS NULL"};
427
+
428
+ /**
429
+ * Query generated from SQL:
430
+ * ```
431
+ * SELECT MIN(rollup_input_future_timestamp.future_ms_timestamp) AS min_timestamp
432
+ * FROM effectstream.rollup_input_future_timestamp
433
+ * LEFT OUTER JOIN effectstream.rollup_input_result
434
+ * ON (effectstream.rollup_input_result.id = effectstream.rollup_input_future_timestamp.id)
435
+ * WHERE effectstream.rollup_input_result.id IS NULL
436
+ * ```
437
+ */
438
+ export const getEarliestScheduledTimestamp = new PreparedQuery<IGetEarliestScheduledTimestampParams,IGetEarliestScheduledTimestampResult>(getEarliestScheduledTimestampIR);
439
+
440
+
386
441
  /** 'GetGameInputResultByBlockHeight' parameters type */
387
442
  export interface IGetGameInputResultByBlockHeightParams {
388
443
  block_height: number;
@@ -144,6 +144,17 @@ WHERE rollup_input_future_timestamp.future_ms_timestamp <= :max_timestamp! AND
144
144
  effectstream.rollup_input_result.id IS NULL
145
145
  ORDER BY rollup_input_future_timestamp.future_ms_timestamp ASC;
146
146
 
147
+ /* @name getEarliestScheduledBlockHeight */
148
+ SELECT MIN(future_block_height) AS min_block_height
149
+ FROM effectstream.rollup_input_future_block;
150
+
151
+ /* @name getEarliestScheduledTimestamp */
152
+ SELECT MIN(rollup_input_future_timestamp.future_ms_timestamp) AS min_timestamp
153
+ FROM effectstream.rollup_input_future_timestamp
154
+ LEFT OUTER JOIN effectstream.rollup_input_result
155
+ ON (effectstream.rollup_input_result.id = effectstream.rollup_input_future_timestamp.id)
156
+ WHERE effectstream.rollup_input_result.id IS NULL;
157
+
147
158
  /* @name getGameInputResultByBlockHeight */
148
159
  SELECT
149
160
  rollup_inputs.id,