@relaybus/postgres 0.3.0 → 0.4.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 +29 -10
- package/dist/chunk-NNZJR5AB.js +12 -0
- package/dist/chunk-NNZJR5AB.js.map +1 -0
- package/dist/drizzle.cjs +13 -6
- package/dist/drizzle.cjs.map +1 -1
- package/dist/drizzle.d.cts +3 -2
- package/dist/drizzle.d.ts +3 -2
- package/dist/drizzle.js +6 -5
- package/dist/drizzle.js.map +1 -1
- package/dist/index.cjs +457 -404
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +458 -405
- package/dist/index.js.map +1 -1
- package/dist/knex.cjs +14 -5
- package/dist/knex.cjs.map +1 -1
- package/dist/knex.d.cts +3 -2
- package/dist/knex.d.ts +3 -2
- package/dist/knex.js +6 -5
- package/dist/knex.js.map +1 -1
- package/dist/kysely.cjs +13 -6
- package/dist/kysely.cjs.map +1 -1
- package/dist/kysely.d.cts +3 -2
- package/dist/kysely.d.ts +3 -2
- package/dist/kysely.js +6 -6
- package/dist/kysely.js.map +1 -1
- package/dist/prisma.cjs +14 -5
- package/dist/prisma.cjs.map +1 -1
- package/dist/prisma.d.cts +4 -4
- package/dist/prisma.d.ts +4 -4
- package/dist/prisma.js +7 -5
- package/dist/prisma.js.map +1 -1
- package/dist/typeorm.cjs +14 -5
- package/dist/typeorm.cjs.map +1 -1
- package/dist/typeorm.d.cts +3 -2
- package/dist/typeorm.d.ts +3 -2
- package/dist/typeorm.js +7 -5
- package/dist/typeorm.js.map +1 -1
- package/package.json +19 -12
package/dist/index.d.cts
CHANGED
|
@@ -190,11 +190,23 @@ interface PostgresConnectionOptions extends PostgresEventStoreSettings {
|
|
|
190
190
|
/** Use another database library through an adapter. The store never closes it. */
|
|
191
191
|
interface PostgresExecutorOptions<TTransaction> extends PostgresEventStoreSettings {
|
|
192
192
|
readonly executor: PostgresExecutor<TTransaction>;
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Optional `pg` pool on the same database, for example the one an ORM's `pg` driver adapter uses
|
|
195
|
+
* (`new PrismaPg(pool)`, Kysely's `PostgresDialect`, Drizzle's `node-postgres`). The store never
|
|
196
|
+
* closes it. With it:
|
|
197
|
+
* - the statements the store sends outside a transaction (the dispatcher's claims, completions and
|
|
198
|
+
* lease renewals, maintenance) run on it as prepared statements (`preparedStatements`), which ORM
|
|
199
|
+
* raw queries cannot do; statements in a transaction still go through `executor`;
|
|
200
|
+
* - with `wakeUp: 'notify'` the store listens for wake-ups with its connection settings, so a
|
|
201
|
+
* delivery published in an ORM transaction is dispatched right after that transaction commits,
|
|
202
|
+
* instead of after a fixed delay or the next poll.
|
|
203
|
+
*/
|
|
204
|
+
readonly pool?: Pool;
|
|
194
205
|
readonly connectionString?: never;
|
|
195
206
|
readonly poolConfig?: never;
|
|
196
207
|
}
|
|
197
208
|
type PostgresEventStoreOptions<TTransaction = PoolClient> = PostgresPoolOptions | PostgresConnectionOptions | PostgresExecutorOptions<TTransaction>;
|
|
209
|
+
|
|
198
210
|
/**
|
|
199
211
|
* PostgreSQL {@link EventStore} (PostgreSQL 13 or newer).
|
|
200
212
|
*
|
|
@@ -329,4 +341,5 @@ declare class ReconcileFailedError extends RelayBusError {
|
|
|
329
341
|
readonly code: string;
|
|
330
342
|
}
|
|
331
343
|
|
|
332
|
-
export { PgExecutor,
|
|
344
|
+
export { PgExecutor, PostgresEventStore, PostgresExecutor, PostgresParameter, PostgresQueryOptions, PostgresRow, ReconcileFailedError, createPostgresSchemaSql, createPostgresSchemaStatements, resolvePostgresNames };
|
|
345
|
+
export type { PgExecutorOptions, PostgresConnectionOptions, PostgresEventStoreOptions, PostgresEventStoreSettings, PostgresExecutorOptions, PostgresNames, PostgresPoolOptions, PostgresSchemaOptions, PostgresWakeUp };
|
package/dist/index.d.ts
CHANGED
|
@@ -190,11 +190,23 @@ interface PostgresConnectionOptions extends PostgresEventStoreSettings {
|
|
|
190
190
|
/** Use another database library through an adapter. The store never closes it. */
|
|
191
191
|
interface PostgresExecutorOptions<TTransaction> extends PostgresEventStoreSettings {
|
|
192
192
|
readonly executor: PostgresExecutor<TTransaction>;
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Optional `pg` pool on the same database, for example the one an ORM's `pg` driver adapter uses
|
|
195
|
+
* (`new PrismaPg(pool)`, Kysely's `PostgresDialect`, Drizzle's `node-postgres`). The store never
|
|
196
|
+
* closes it. With it:
|
|
197
|
+
* - the statements the store sends outside a transaction (the dispatcher's claims, completions and
|
|
198
|
+
* lease renewals, maintenance) run on it as prepared statements (`preparedStatements`), which ORM
|
|
199
|
+
* raw queries cannot do; statements in a transaction still go through `executor`;
|
|
200
|
+
* - with `wakeUp: 'notify'` the store listens for wake-ups with its connection settings, so a
|
|
201
|
+
* delivery published in an ORM transaction is dispatched right after that transaction commits,
|
|
202
|
+
* instead of after a fixed delay or the next poll.
|
|
203
|
+
*/
|
|
204
|
+
readonly pool?: Pool;
|
|
194
205
|
readonly connectionString?: never;
|
|
195
206
|
readonly poolConfig?: never;
|
|
196
207
|
}
|
|
197
208
|
type PostgresEventStoreOptions<TTransaction = PoolClient> = PostgresPoolOptions | PostgresConnectionOptions | PostgresExecutorOptions<TTransaction>;
|
|
209
|
+
|
|
198
210
|
/**
|
|
199
211
|
* PostgreSQL {@link EventStore} (PostgreSQL 13 or newer).
|
|
200
212
|
*
|
|
@@ -329,4 +341,5 @@ declare class ReconcileFailedError extends RelayBusError {
|
|
|
329
341
|
readonly code: string;
|
|
330
342
|
}
|
|
331
343
|
|
|
332
|
-
export { PgExecutor,
|
|
344
|
+
export { PgExecutor, PostgresEventStore, PostgresExecutor, PostgresParameter, PostgresQueryOptions, PostgresRow, ReconcileFailedError, createPostgresSchemaSql, createPostgresSchemaStatements, resolvePostgresNames };
|
|
345
|
+
export type { PgExecutorOptions, PostgresConnectionOptions, PostgresEventStoreOptions, PostgresEventStoreSettings, PostgresExecutorOptions, PostgresNames, PostgresPoolOptions, PostgresSchemaOptions, PostgresWakeUp };
|