Skip to main content

Built and signed on GitHub Actions

Works with
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score100%
License
MIT
Downloads1/wk
Publisheda day ago (2.1.2)

PostgreSQL drivers for Fedify

Classes

c
PostgresKvStore(
sql: Sql<{ }>,
options?: PostgresKvStoreOptions
)

A key–value store that uses PostgreSQL as the underlying storage.

  • delete(key: KvKey): Promise<void>
    No documentation available
  • drop(): Promise<void>

    Drops the table used by the key–value store. Does nothing if the table does not exist.

  • get<T = unknown>(key: KvKey): Promise<T | undefined>
    No documentation available
  • initialize(): Promise<void>

    Creates the table used by the key–value store if it does not already exist. Does nothing if the table already exists.

  • list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>

    {@inheritDoc KvStore.list}

  • set(
    key: KvKey,
    value: unknown,
    options?: KvStoreSetOptions | undefined
    ): Promise<void>
    No documentation available
c
PostgresMessageQueue(
sql: Sql<{ }>,
options?: PostgresMessageQueueOptions
)

A message queue that uses PostgreSQL as the underlying storage.

  • drop(): Promise<void>

    Drops the message queue table if it exists.

  • enqueue(
    message: any,
    options?: MessageQueueEnqueueOptions
    ): Promise<void>
    No documentation available
  • enqueueMany(
    messages: readonly any[],
    options?: MessageQueueEnqueueOptions
    ): Promise<void>
    No documentation available
  • initialize(): Promise<void>

    Initializes the message queue table if it does not already exist.

  • listen(
    handler: (message: any) => void | Promise<void>,
    options?: MessageQueueListenOptions
    ): Promise<void>
    No documentation available

Interfaces

I

Options for the PostgreSQL key–value store.

  • initialized: boolean

    Whether the table has been initialized. false by default.

  • tableName: string

    The table name to use for the key–value store. "fedify_kv_v2" by default.

I

Options for the PostgreSQL message queue.

  • channelName: string

    The channel name to use for the message queue. "fedify_channel" by default.

  • handlerTimeout: Temporal.Duration | Temporal.DurationLike

    The maximum time to wait for a message handler to complete before considering it hung. When a handler exceeds this timeout, it is treated as an error and the poll loop moves on to the next message, preventing a single hung handler from permanently blocking the queue.

  • initialized: boolean

    Whether the table has been initialized. false by default.

  • pollInterval: Temporal.Duration | Temporal.DurationLike

    The poll interval for the message queue. 5 seconds by default.

  • tableName: string

    The table name to use for the message queue. "fedify_message_v2" by default.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/postgres

Import symbol

import * as mod from "@fedify/postgres";
or

Import directly with a jsr specifier

import * as mod from "jsr:@fedify/postgres";