@restatedev/sessions 0.11.1 → 0.12.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.
Files changed (96) hide show
  1. package/README.md +330 -178
  2. package/dist/addon.d.ts +1 -0
  3. package/dist/addon.d.ts.map +1 -1
  4. package/dist/addon.js.map +1 -1
  5. package/dist/calls.d.ts +28 -28
  6. package/dist/calls.d.ts.map +1 -1
  7. package/dist/calls.js +25 -25
  8. package/dist/calls.js.map +1 -1
  9. package/dist/database.d.ts +90 -166
  10. package/dist/database.d.ts.map +1 -1
  11. package/dist/database.js +137 -249
  12. package/dist/database.js.map +1 -1
  13. package/dist/driver.d.ts +129 -126
  14. package/dist/driver.d.ts.map +1 -1
  15. package/dist/driver.js +337 -276
  16. package/dist/driver.js.map +1 -1
  17. package/dist/endpoint.d.ts +47 -5
  18. package/dist/endpoint.d.ts.map +1 -1
  19. package/dist/endpoint.js +175 -60
  20. package/dist/endpoint.js.map +1 -1
  21. package/dist/handler.d.ts +20 -17
  22. package/dist/handler.d.ts.map +1 -1
  23. package/dist/handler.js +161 -127
  24. package/dist/handler.js.map +1 -1
  25. package/dist/host.d.ts +29 -0
  26. package/dist/host.d.ts.map +1 -0
  27. package/dist/host.js +2 -0
  28. package/dist/host.js.map +1 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +5 -26
  32. package/dist/index.js.map +1 -1
  33. package/dist/internal.d.ts +11 -11
  34. package/dist/internal.d.ts.map +1 -1
  35. package/dist/internal.js +20 -16
  36. package/dist/internal.js.map +1 -1
  37. package/dist/link.d.ts +1 -2
  38. package/dist/link.d.ts.map +1 -1
  39. package/dist/link.js +4 -5
  40. package/dist/link.js.map +1 -1
  41. package/dist/log.d.ts +14 -0
  42. package/dist/log.d.ts.map +1 -0
  43. package/dist/log.js +21 -0
  44. package/dist/log.js.map +1 -0
  45. package/dist/object.d.ts +217 -142
  46. package/dist/object.d.ts.map +1 -1
  47. package/dist/object.js +195 -241
  48. package/dist/object.js.map +1 -1
  49. package/dist/platform.d.ts +0 -1
  50. package/dist/platform.d.ts.map +1 -1
  51. package/dist/platform.js +4 -6
  52. package/dist/platform.js.map +1 -1
  53. package/dist/schema.d.ts +14 -22
  54. package/dist/schema.d.ts.map +1 -1
  55. package/dist/schema.js +31 -69
  56. package/dist/schema.js.map +1 -1
  57. package/dist/serve.d.ts +11 -17
  58. package/dist/serve.d.ts.map +1 -1
  59. package/dist/serve.js +21 -39
  60. package/dist/serve.js.map +1 -1
  61. package/dist/session.d.ts +58 -236
  62. package/dist/session.d.ts.map +1 -1
  63. package/dist/session.js +206 -513
  64. package/dist/session.js.map +1 -1
  65. package/dist/stop.d.ts +59 -0
  66. package/dist/stop.d.ts.map +1 -0
  67. package/dist/stop.js +220 -0
  68. package/dist/stop.js.map +1 -0
  69. package/dist/vm.d.ts +108 -29
  70. package/dist/vm.d.ts.map +1 -1
  71. package/dist/vm.js +43 -10
  72. package/dist/vm.js.map +1 -1
  73. package/package.json +4 -4
  74. package/src/addon.ts +1 -0
  75. package/src/calls.ts +51 -47
  76. package/src/database.ts +195 -339
  77. package/src/driver.ts +379 -315
  78. package/src/endpoint.ts +217 -62
  79. package/src/handler.ts +183 -164
  80. package/src/host.ts +28 -0
  81. package/src/index.ts +6 -26
  82. package/src/internal.ts +28 -39
  83. package/src/link.ts +4 -5
  84. package/src/log.ts +42 -0
  85. package/src/object.ts +379 -335
  86. package/src/platform.ts +4 -6
  87. package/src/schema.ts +37 -103
  88. package/src/serve.ts +20 -41
  89. package/src/session.ts +236 -613
  90. package/src/stop.ts +225 -0
  91. package/src/vm.ts +151 -55
  92. package/dist/scope.d.ts +0 -38
  93. package/dist/scope.d.ts.map +0 -1
  94. package/dist/scope.js +0 -55
  95. package/dist/scope.js.map +0 -1
  96. package/src/scope.ts +0 -78
@@ -1,284 +1,208 @@
1
1
  import { Buffer } from 'node:buffer';
2
- import { type Vm } from './vm.ts';
2
+ import { type Vm, type VmCommit } from './vm.ts';
3
3
  /** An SQL value. Integers come back as numbers, or as bigints beyond 2^53. */
4
4
  export type SqlValue = null | number | bigint | string | Uint8Array;
5
5
  /** An SQL parameter: an `SqlValue`, or a boolean, stored as 0 or 1. */
6
6
  export type SqlParam = SqlValue | boolean;
7
- /** The rows of a statement, with its column names. */
8
- export interface SqlQueryResult {
7
+ interface SqlQueryResult {
9
8
  columns: string[];
10
9
  rows: SqlValue[][];
11
10
  }
12
11
  /**
13
- * A failure a retry would repeat: SQL the engine rejected (a syntax error, a
14
- * constraint, a missing table), which undid just that statement and leaves
15
- * the session usable; a parameter it cannot bind; or a call the session
16
- * refused, which may have ended it (a `COMMIT` in a transaction's body, a
17
- * transaction left open). A storage error, which ends the session, rejects
18
- * as it is.
12
+ * A failure a retry would repeat: rejected SQL (undoes only that statement),
13
+ * a parameter that cannot bind, or a refused call, which may end the session
14
+ * (a `COMMIT` in a transaction body). A storage error rejects unchanged.
19
15
  */
20
16
  export declare class SqlError extends Error {
21
17
  name: string;
22
18
  }
23
- /** A row as an object, by column name. */
24
19
  export type Row = Record<string, SqlValue>;
25
- /** Reads of a database, or of one transaction of it. */
20
+ /** Reads of a database, or of one of its transactions. */
26
21
  export interface DatabaseReader {
27
22
  /**
28
- * The rows of one statement, each an object by column name; parameters
29
- * bind to a single statement. `T` declares the row's shape, unchecked:
30
- * integers past 2^53 come back as bigints, and booleans as 0 or 1. Columns
31
- * are named as SQL names them (an expression needs `AS`), and two of the
32
- * same name are an {@link SqlError}: alias them, or use {@link values}.
23
+ * The rows of one statement, each an object by column name. `T` declares
24
+ * the row shape, unchecked: integers past 2^53 come back as bigints, and
25
+ * booleans as 0 or 1. Columns are named as SQL names them (an expression
26
+ * needs `AS`). Two columns with the same name are an SQL error (from
27
+ * `ctx.db`, a `TerminalError`): alias them, or use {@link values}.
33
28
  */
34
29
  query<T = Row>(sql: string, params?: SqlParam[]): Promise<T[]>;
35
30
  /** The first row of {@link query}, or `undefined` when there is none. */
36
31
  get<T = Row>(sql: string, params?: SqlParam[]): Promise<T | undefined>;
37
- /** The rows of one statement as arrays, in column order: for adapters, and for columns that share a name. */
32
+ /** The rows as arrays, in column order: for adapters, and for columns that share a name. */
38
33
  values(sql: string, params?: SqlParam[]): Promise<SqlValue[][]>;
39
34
  }
40
- /** SQL: a database, or one transaction of it. */
35
+ /** SQL on a database, or on one of its transactions. */
41
36
  export interface DatabaseWriter extends DatabaseReader {
42
37
  /** Run SQL (one or more statements), discarding rows; parameters only with a single statement. */
43
38
  execute(sql: string, params?: SqlParam[]): Promise<void>;
44
39
  }
45
- /**
46
- * {@link DatabaseWriter} over `run`, which runs one call's SQL and returns
47
- * its rows with their columns, failing as `failure` makes its errors (as
48
- * `run` makes the engine's). `run` answers with the value itself when the
49
- * call was ready at once, which only this package sees: each call returns a
50
- * promise.
51
- */
40
+ /** A {@link DatabaseWriter} over `run`, which may answer synchronously; each method returns a promise. */
52
41
  export declare function sqlOver(run: (sql: string, params?: SqlParam[]) => Answer<SqlQueryResult>, failure?: (error: unknown) => unknown): DatabaseWriter;
53
42
  /**
54
- * A key/value store, the object's state: `set` and `clear` return at once,
55
- * and `sync` resolves once every write before it is stored. Writes are
56
- * stored in the order they were made: a crash keeps a prefix of the writes
57
- * since the last sync and loses the rest. `get` returns the stored value, or
58
- * this request's own latest write; `undefined` or `null` when absent.
43
+ * The object state as a key/value store. `sync` resolves once every earlier
44
+ * write is stored. Writes are stored in order, so a crash keeps a prefix of
45
+ * them. `get` sees this request's own writes; absent is `undefined` or `null`.
59
46
  */
60
47
  export interface Store {
61
48
  get(key: string): Promise<Uint8Array | null | undefined>;
62
49
  set(key: string, value: Uint8Array): void;
63
50
  clear(key: string): void;
64
51
  sync(): Promise<void>;
65
- /**
66
- * Every key, as `ctx.stateKeys()`: then a commit that checkpoints deletes
67
- * the packs no checkpoint needs any more. A store without it keeps them.
68
- */
52
+ /** Every key. With it, a checkpoint deletes packs no checkpoint needs; without it they stay. */
69
53
  keys?(): Promise<string[]>;
70
54
  }
71
- /**
72
- * A session of the addon: one call at a time holds it. A transaction's body
73
- * runs between `begin` and `commit` (or `rollback`). A call answers at once
74
- * with its value (or throws) when it needs nothing from the store, such as
75
- * SQL on cached pages, and with a promise when it waits for the store.
76
- */
77
- interface NativeSession {
55
+ /** An addon session. A call that needs nothing from the store returns its value or throws. */
56
+ export interface NativeSession {
78
57
  queryColumns(sql: string, params?: SqlParam[]): Answer<SqlQueryResult>;
79
- /** `queryColumns`, after `before`'s statements in the same call; absent in an addon without it. */
80
- queryColumnsAfter?(before: string[], sql: string, params?: SqlParam[]): Answer<SqlQueryResult>;
81
58
  begin(): Answer<void>;
82
- /** `withCommit`: whether the transaction has work to run at the commit's sync (see `Boundary.sync`). */
83
- commit(records: Record<string, Buffer>, withCommit?: boolean): Answer<void>;
59
+ /**
60
+ * On the VM, `withCommit` is what commits with the transaction: its sends,
61
+ * inside the commit's atomic group (see {@link ConnectionTransaction.commitWith}).
62
+ */
63
+ commit(records: Record<string, Buffer>, withCommit?: VmCommit): Answer<void>;
84
64
  rollback(): Answer<void>;
85
65
  record(name: string): Answer<Buffer>;
86
66
  isUsable(): boolean;
87
67
  save(): Answer<void>;
88
68
  close(): Promise<void>;
89
69
  }
90
- /** A value, or a promise of it: `await` takes either. */
91
70
  type Answer<T> = T | Promise<T>;
92
- /**
93
- * Run `fn`, keeping the attempt alive meanwhile: the attempt's `working`
94
- * (see `driver.ts`). The database's calls run in it, being local work that
95
- * never waits on Restate for long.
96
- */
71
+ /** `ctx.working` (see stop.ts). */
97
72
  export type Working = <T>(fn: () => T | Promise<T>) => Promise<T>;
98
- /**
99
- * Open the database of `namespace` over `store`. One process-wide page cache
100
- * serves every namespace. A `reader` reads beside the namespace's owner (a
101
- * shared handler), the state as of open, and writes nothing.
102
- */
73
+ /** `ctx.stoppable` (see stop.ts). */
74
+ export type Stoppable = <T>(fn: (signal: AbortSignal) => T | Promise<T>) => Promise<T>;
75
+ /** `ctx.suspendable` (see stop.ts). */
76
+ export type Suspendable = <T>(fn: () => T | Promise<T>) => Promise<T>;
77
+ /** Open the database of `namespace` over `store`. A `reader` (a view) reads the state as of the open. */
103
78
  export declare function open(namespace: string, store: Store, { reader }?: {
104
79
  reader?: boolean | undefined;
105
80
  }): Promise<Connection>;
106
81
  /**
107
- * Open the database of `namespace` over the attempt's VM: the state is read
108
- * and written as the VM's own commands, in the addon, so none of it crosses
109
- * into JavaScript. `store` is called at one point only — its `sync`, which the
110
- * boundary uses to run what the committing transaction gave
111
- * {@link ConnectionTransaction.withCommit} — so its `get`, `set` and `clear`
112
- * are never reached. `name` names a database beside the object's own.
82
+ * Open the database of `namespace` over the attempt VM. The addon reads and
83
+ * writes the state as the VM's own actions and never calls a store; a commit
84
+ * is one atomic group, with what the transaction gave
85
+ * {@link ConnectionTransaction.commitWith}. `name` names a database beside the
86
+ * object database.
113
87
  */
114
- export declare function openOnVm(namespace: string, store: Store, vm: Vm, { name, reader, working }?: {
88
+ export declare function openOnVm(namespace: string, vm: Vm, { name, reader, keepAlive }?: {
115
89
  name?: string;
116
90
  reader?: boolean;
117
- working?: Working;
91
+ keepAlive?: Working;
118
92
  }): Promise<Connection>;
119
93
  /**
120
- * The store as the addon calls it. An error of the store's crosses the addon
121
- * as text, which ends the session: the first is kept here, and the calls that
122
- * fail on the session it ended fail with it as it was thrown (the SDK's
123
- * CancelledError, say). And a commit's sync first runs what its transaction
124
- * gave {@link ConnectionTransaction.withCommit}: after the commit's writes,
125
- * before anything is awaited.
94
+ * The store as the addon calls it. A store error crosses the addon as text and
95
+ * ends the session, so the first one is kept for later calls to fail with. A
96
+ * commit sync first runs `withCommit`. On the VM the addon calls none of it.
126
97
  */
127
98
  declare class Boundary implements Store {
128
- /** The first error of the store's. */
129
99
  failed: {
130
100
  error: unknown;
131
101
  } | undefined;
132
- /** What the next sync runs first: the committing transaction's. */
102
+ /** What the next sync runs first: the `withCommit` work of the committing transaction. */
133
103
  withSync: (() => void) | undefined;
134
104
  readonly keys?: () => Promise<string[]>;
135
105
  private readonly store;
136
106
  private readonly working;
137
- constructor(store: Store, working?: Working);
107
+ constructor(store: Store | undefined, working?: Working);
138
108
  get(key: string): Promise<Uint8Array<ArrayBufferLike> | null | undefined>;
139
109
  set(key: string, value: Uint8Array): void;
140
110
  clear(key: string): void;
141
111
  sync(): Promise<void>;
142
- /**
143
- * `call`'s value if it is ready (the addon answers at once): then no scope
144
- * is opened, as nothing waited; a promise runs on in the attempt's `working`
145
- * scope, which opens as the call returns it.
146
- */
112
+ /** On the VM, reaching here is a bug in the addon. */
113
+ private stored;
114
+ /** A synchronous answer needs no keep-alive; a promise runs in `Stop.keepAlive`. */
147
115
  aliveNow<T>(call: () => Answer<T>): Answer<T>;
148
- /** `call`, in the attempt's `working` scope if the database has one. */
116
+ /** `call`, in the attempt keep-alive if there is one (on the VM). */
149
117
  alive<T>(call: () => T | Promise<T>): Promise<T>;
150
- /** `request`'s result, keeping its error, thrown at once or rejected. */
118
+ /** Run `request`, keeping the first error, whether thrown or rejected. */
151
119
  private kept;
152
120
  }
153
- /**
154
- * SQL on a session of the addon: {@link DatabaseWriter}'s `query` and `execute`
155
- * by way of its `queryColumnsNow`.
156
- */
121
+ /** {@link DatabaseWriter} on an addon session, built on `queryColumnsNow`. */
157
122
  declare abstract class Sql implements DatabaseWriter {
158
123
  protected readonly native: NativeSession;
159
124
  protected readonly boundary: Boundary;
160
125
  private readonly over;
161
126
  constructor(native: NativeSession, boundary: Boundary);
162
- /**
163
- * The rows of one statement with their column names: the value itself if
164
- * the addon answered at once (only the package's own code takes it so), else
165
- * a promise of it. A failure is a rejection.
166
- */
127
+ /** The rows of one statement with their columns; synchronous if the addon answered so. A failure rejects. */
167
128
  abstract queryColumnsNow(sql: string, params?: SqlParam[]): Answer<SqlQueryResult>;
168
- queryColumns(sql: string, params?: SqlParam[]): Promise<SqlQueryResult>;
169
129
  query<T = Row>(sql: string, params?: SqlParam[]): Promise<T[]>;
170
130
  get<T = Row>(sql: string, params?: SqlParam[]): Promise<T | undefined>;
171
131
  values(sql: string, params?: SqlParam[]): Promise<SqlValue[][]>;
172
132
  execute(sql: string, params?: SqlParam[]): Promise<void>;
173
- /** {@link request}, but the value itself if it is ready, and then without a scope or a promise. */
133
+ /** {@link request} that returns a ready value synchronously, with no keep-alive. */
174
134
  protected requestNow<T>(call: () => Answer<T>): Answer<T>;
175
- /**
176
- * `call`'s result, or its {@link failure}: `call` makes the request, as the
177
- * addon throws as it is called (arguments it cannot convert, and the error
178
- * of a call that answers at once).
179
- */
135
+ /** The result of `call`, or its {@link failure}, whether the addon throws or rejects. */
180
136
  protected request<T>(call: () => Answer<T>): Promise<T>;
181
137
  /**
182
- * A request's `error`: an {@link SqlError} if a retry would repeat it; the
183
- * store's own error if that ended the session.
138
+ * An {@link SqlError} if a retry would repeat `error`; the store error if
139
+ * that ended the session. `sends`: `error` failed the commit of a
140
+ * transaction that sends on the VM, the one call whose failure can be the
141
+ * VM's refusal of a send, or the attempt's end with the session usable.
184
142
  */
185
- protected failure(error: unknown): unknown;
143
+ protected failure(error: unknown, { sends }?: {
144
+ sends?: boolean;
145
+ }): unknown;
186
146
  }
187
- /**
188
- * A session of a database: calls run one at a time, in call order, and a
189
- * transaction holds the session until it commits or rolls back. Calls made
190
- * meanwhile wait, but a call from inside the transaction's body is refused,
191
- * as it would wait for that body: the body uses its `tx`.
192
- */
147
+ /** A session of a database. Call ordering and the transaction guard: see the header. */
193
148
  export declare class Connection extends Sql {
194
- /** This session's transaction whose body is running, in that body's asynchronous context. */
149
+ /**
150
+ * The transaction guard: the open transaction, in the async context of its
151
+ * body. A call from a continuation created before the transaction, which
152
+ * the body then awaits, is not refused and deadlocks.
153
+ */
195
154
  private readonly running;
196
- /** Settles once the last call queued so far has: the next call runs after it. */
197
155
  private queue;
198
- /** The last transaction queued, until it has committed or rolled back: a call queued behind it fires it. */
199
- private tail;
200
- /** Calls queued and not settled: with none, a call that is ready runs at once, in order. */
156
+ /** Calls queued and not settled. With none, a call can take the fast path. */
201
157
  private inflight;
202
158
  private readonly release;
203
159
  queryColumnsNow(sql: string, params?: SqlParam[]): Answer<SqlQueryResult>;
204
160
  /**
205
- * Run `body` as one SQL transaction: it commits when `body` resolves, with
206
- * the records it set, and rolls back when it rejects, with the body's own
207
- * error, once the calls it made have settled. A statement in it that ends
208
- * the transaction (`COMMIT`, `ROLLBACK`) ends the session. A failing
209
- * COMMIT rolls back.
161
+ * Run `body` as one SQL transaction: once its calls settle, commit with its
162
+ * records, or roll back if it rejects. A `COMMIT` or `ROLLBACK` statement
163
+ * in it ends the session.
210
164
  */
211
165
  transaction<T>(body: (tx: ConnectionTransaction) => Promise<T>): Promise<T>;
212
166
  private run;
213
- /**
214
- * The record `name`, as the last commit that set it left it (see
215
- * {@link ConnectionTransaction.setRecord}); empty if none did.
216
- */
167
+ /** The record `name` as last committed (see {@link ConnectionTransaction.setRecord}); empty if never set. */
217
168
  record(name: string): Promise<Uint8Array>;
218
- /** Whether SQL can still run: an SQL error leaves the session usable, a storage error ends it. */
169
+ /** An SQL error leaves the session usable; a storage error ends it. */
219
170
  isUsable(): boolean;
220
- /**
221
- * End the session after the calls before it, leaving its engine to the
222
- * next one. It rejects if they left a transaction open, or a failure ended
223
- * the session.
224
- */
171
+ /** End the session after earlier calls. Rejects if a transaction is left open or a failure ended it. */
225
172
  save(): Promise<void>;
226
- /** End the session now, whatever its state: queued calls reject. */
173
+ /** End the session now, whatever its state. Queued calls reject. */
227
174
  close(): Promise<void>;
228
- /** Run `call` once the calls before it have, unless it comes from the body of a transaction it would wait for. */
175
+ /** Queue `call` after earlier calls. Refused from the body of an open transaction (the guard). */
229
176
  private serial;
230
- /** Roll back, unless a storage error ended the session: the caller rethrows its own error, which says why. */
177
+ /** Roll back, ignoring errors: the caller rethrows its own error, which explains the failure. */
231
178
  private rollback;
232
179
  }
233
- /** SQL in one transaction, while its body runs, and the records it commits with. */
180
+ /** SQL in one transaction while its body runs, and the records it commits with. */
234
181
  export interface ConnectionTransaction extends DatabaseWriter {
235
- /** The rows of one statement, with their column names. */
236
- queryColumns(sql: string, params?: SqlParam[]): Promise<SqlQueryResult>;
237
- /** {@link queryColumns} for the package's own code: the value itself if the addon answered at once. */
182
+ /** The rows of one statement with their columns, synchronous if the addon answered so (package code only). */
238
183
  queryColumnsNow(sql: string, params?: SqlParam[]): Answer<SqlQueryResult>;
239
184
  /**
240
- * Set the record `name` to `value` with this transaction, in the same
241
- * write: a whole value kept beside the SQL, in no table, stored exactly
242
- * when the transaction is, even if it changes no row. It stays until a
243
- * later transaction sets it again; an empty value reads as never set. A
244
- * name is at most 255 bytes, and not `db`; a value at most 16 MiB.
185
+ * Set the record `name` to `value` in this commit: a value kept outside the
186
+ * tables, stored exactly when the transaction is, even if no row changes.
187
+ * It stays until a later transaction sets it. An empty value reads as never
188
+ * set. A name is at most 255 bytes and not `db`; a value at most 16 MiB.
245
189
  */
246
190
  setRecord(name: string, value: Uint8Array): void;
247
- /** The record `name` as this transaction would commit it: as it set it, or as committed. */
191
+ /** The record `name` as this transaction would commit it. */
248
192
  record(name: string): Promise<Uint8Array>;
249
193
  /**
250
- * Run `run` with the commit, right after its writes and before it waits
251
- * for them to be stored: the store's host gets what `run` makes after the
252
- * writes, and before anything that fails the commit's wait (Restate's
253
- * sends, which it stores in order with the writes). Never if the
254
- * transaction rolls back.
194
+ * Run `run` right after the commit writes, before waiting for them: for a
195
+ * store in JavaScript (the sends of a test's transaction, session.ts).
196
+ * Never if the transaction rolls back. On the VM, {@link commitWith}.
255
197
  */
256
198
  withCommit(run: () => void): void;
257
199
  /**
258
- * Have `sql` (one statement, no parameters) run just before the next call
259
- * of this transaction, in the same call to the addon: the statements are
260
- * the ones a call of their own would run, in the order the calls are made,
261
- * and the call fails with the error of the first that fails. It spares
262
- * the crossing of a call. Returns false, and queues nothing, where the
263
- * addon cannot (an addon without `queryColumnsAfter`): run the statement
264
- * with {@link queryColumns}. One still queued as the body settles runs
265
- * then, before the commit, and its failure fails the transaction.
266
- */
267
- defer(sql: string): boolean;
268
- /**
269
- * Take back the last `sql` that {@link defer} queued if no call has taken
270
- * it yet: it never runs. Whether it did.
271
- */
272
- undefer(sql: string): boolean;
273
- /**
274
- * Settles, and never rejects, once another call to the connection has
275
- * queued behind this transaction: it is waiting for the body to settle.
276
- * A body that holds the transaction open for more work can return on it,
277
- * so that the call costs one commit rather than a stall. A call made
278
- * before the transaction began does not settle it, and neither does one
279
- * made from the body, which is refused.
200
+ * On the VM: commit `commit`'s sends with the transaction, inside its
201
+ * commit's atomic group, which is inside `commit.parentSpan`. A transaction
202
+ * that writes nothing makes them in a group of its own. A later call
203
+ * replaces it.
280
204
  */
281
- readonly queued: Promise<void>;
205
+ commitWith(commit: VmCommit): void;
282
206
  }
283
207
  export {};
284
208
  //# sourceMappingURL=database.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,SAAS,CAAC;AAGnD,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpE,uEAAuE;AACvE,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1C,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACxB,IAAI,SAAc;CAC5B;AAED,0CAA0C;AAC1C,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE3C,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,KAAK,CAAC,CAAC,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