Unverified Commit 3a92557e authored by An Nyeong's avatar An Nyeong
Browse files

Fix docs: replace wrong hypens with Em-dash

parent de5dd5a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -183,11 +183,11 @@ labels:
        - Routing or middleware support

  - component/kv:
      description: "Key-value storage layer"
      description: "keyvalue storage layer"
      instructions: |
        Use for:
        - Persistence changes
        - Data modeling for key-value store
        - Data modeling for keyvalue store

  - component/mq:
      description: "Message queue infrastructure"
+9 −9
Original line number Diff line number Diff line
@@ -6,11 +6,11 @@ import { driverSerializesJson } from "./utils.ts";
const logger = getLogger(["fedify", "postgres", "kv"]);

/**
 * Options for the PostgreSQL key-value store.
 * Options for the PostgreSQL keyvalue store.
 */
export interface PostgresKvStoreOptions {
  /**
   * The table name to use for the key-value store.
   * The table name to use for the keyvalue store.
   * `"fedify_kv_v2"` by default.
   * @default `"fedify_kv_v2"`
   */
@@ -24,7 +24,7 @@ export interface PostgresKvStoreOptions {
}

/**
 * A key-value store that uses PostgreSQL as the underlying storage.
 * A keyvalue store that uses PostgreSQL as the underlying storage.
 *
 * @example
 * ```ts
@@ -46,9 +46,9 @@ export class PostgresKvStore implements KvStore {
  #driverSerializesJson = false;

  /**
   * Creates a new PostgreSQL key-value store.
   * Creates a new PostgreSQL keyvalue store.
   * @param sql The PostgreSQL client to use.
   * @param options The options for the key-value store.
   * @param options The options for the keyvalue store.
   */
  constructor(
    // deno-lint-ignore ban-types
@@ -108,12 +108,12 @@ export class PostgresKvStore implements KvStore {
  }

  /**
   * Creates the table used by the key-value store if it does not already exist.
   * Creates the table used by the keyvalue store if it does not already exist.
   * Does nothing if the table already exists.
   */
  async initialize(): Promise<void> {
    if (this.#initialized) return;
    logger.debug("Initializing the key-value store table {tableName}...", {
    logger.debug("Initializing the keyvalue store table {tableName}...", {
      tableName: this.#tableName,
    });
    await this.#sql`
@@ -126,13 +126,13 @@ export class PostgresKvStore implements KvStore {
    `;
    this.#driverSerializesJson = await driverSerializesJson(this.#sql);
    this.#initialized = true;
    logger.debug("Initialized the key-value store table {tableName}.", {
    logger.debug("Initialized the keyvalue store table {tableName}.", {
      tableName: this.#tableName,
    });
  }

  /**
   * Drops the table used by the key-value store.  Does nothing if the table
   * Drops the table used by the keyvalue store.  Does nothing if the table
   * does not exist.
   */
  async drop(): Promise<void> {
+5 −5
Original line number Diff line number Diff line
@@ -8,20 +8,20 @@ import { type Codec, JsonCodec } from "./codec.ts";
 */
export interface RedisKvStoreOptions {
  /**
   * The prefix to use for all keys in the key-value store in Redis.
   * The prefix to use for all keys in the keyvalue store in Redis.
   * Defaults to `"fedify::"`.
   */
  keyPrefix?: RedisKey;

  /**
   * The codec to use for encoding and decoding values in the key-value store.
   * The codec to use for encoding and decoding values in the keyvalue store.
   * Defaults to {@link JsonCodec}.
   */
  codec?: Codec;
}

/**
 * A key-value store that uses Redis as the underlying storage.
 * A keyvalue store that uses Redis as the underlying storage.
 *
 * @example
 * ```ts ignore
@@ -42,9 +42,9 @@ export class RedisKvStore implements KvStore {
  #textEncoder = new TextEncoder();

  /**
   * Creates a new Redis key-value store.
   * Creates a new Redis keyvalue store.
   * @param redis The Redis client to use.
   * @param options The options for the key-value store.
   * @param options The options for the keyvalue store.
   */
  constructor(redis: Redis, options: RedisKvStoreOptions = {}) {
    this.#redis = redis;
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ export interface RedisMessageQueueOptions {
  lockKey?: RedisKey;

  /**
   * The codec to use for encoding and decoding messages in the key-value store.
   * The codec to use for encoding and decoding messages in the keyvalue store.
   * Defaults to {@link JsonCodec}.
   * @default {@link JsonCodec}
   */
+1 −1
Original line number Diff line number Diff line
@fedify/sqlite: SQLite drivers for Fedify
==============

This package provides a SQLite-based key-value store implementation.
This package provides a SQLite-based keyvalue store implementation.

## Usage

Loading