@earth-app/collegedb
    Preparing search index...

    Function patch

    • Convenience wrapper over updateRow that scopes the update to a single id (WHERE idColumn = id).

      Type Parameters

      • T = Record<string, unknown>

        Type of returned rows when RETURNING is used

      Parameters

      • key: string

        Primary key used for shard routing

      • table: string

        Target table name

      • id: string | number

        Primary-key value to match

      • values: ColumnValues

        Column to value map of changes to apply

      • options: IdColumnOptions = {}

        idColumn (default id) and returning

      Returns Promise<QueryResult<T>>

      The write result

      1.2.4

      await patch('42', 'tickets', 42, { status: 'closed', priority: 'high' });