post-postgres
Type Aliases
Section titled “Type Aliases”PostgresPost
Section titled “PostgresPost”PostgresPost =
SqlPostRuntime&Readonly<{send: (client,envelope) =>Promise<void>>; }>
Post on PostgreSQL; the producer retains ownership of BEGIN and COMMIT.
PostgresPostErasureStatement
Section titled “PostgresPostErasureStatement”PostgresPostErasureStatement =
Readonly<{text:string;values: readonly (string|number|null)[]; }>
Parameterized native erasure; the producer controls BEGIN and COMMIT.
Variables
Section titled “Variables”postPostgresSchema
Section titled “postPostgresSchema”
constpostPostgresSchema: readonlystring[]
Carrier-owned PostgreSQL schema, applied by the deployment migration owner.
Functions
Section titled “Functions”createPostgresPost()
Section titled “createPostgresPost()”createPostgresPost<
R>>(options):PostgresPost
Bind the Post registry to a PostgreSQL owner and the shared delivery engine.
Type Parameters
Section titled “Type Parameters”R extends Record<string, Readonly<{ addressKind: string;
address: Codec<unknown, unknown>; event: Codec<unknown,
unknown>; encodeEnvelope: (envelope) => object; parseDelivery:
(envelope) => object; prepareEnvelope?: (envelope, signal) =>
Promise<{ key: string; kind: string; address: unknown; event:
unknown; }>; recordDelivered?: (envelope) => void; nameOf:
(envelope) => string; namespace: Readonly<{ getByName: (name) =>
Readonly<{ deliver: (envelope) =>
Promise<PostDeliveryResult>; }>; }>;
recordCursor?: (envelope, cursor) => void; recordRefused?:
(envelope) => void; }>>
Parameters
Section titled “Parameters”options
Section titled “options”Readonly<{ routes: R; failureDetail?: (cause) => string; retry?:
Readonly<{ maxAttempts: number; baseDelayMs: number; maxDelayMs:
number; }>; now: () => number; scheduleWake: (at) =>
Promise<void>; }> & Readonly<{ database: Pick<Pool, "query"
| "connect">; watchdog: PostgresWatchdog; }>
Returns
Section titled “Returns”purgePostgresPost()
Section titled “purgePostgresPost()”purgePostgresPost(
source): readonlyReadonly<{text:string;values: readonly (string|number|null)[]; }>[]
Purge selected recipient queues, including all envelopes and attempts. The trusted SELECT yields queue_name from producer/envelope facts, not job state.
Parameters
Section titled “Parameters”source
Section titled “source”Returns
Section titled “Returns”readonly Readonly<{ text: string; values: readonly (string |
number | null)[]; }>[]
References
Section titled “References”SqlPostOptions
Section titled “SqlPostOptions”Re-exports SqlPostOptions
SqlPostRuntime
Section titled “SqlPostRuntime”Re-exports SqlPostRuntime