Interface UpdateTransforms<DB, TB, UpdatingObject, UpdateReturnColumns, UpdateReturn>

Type Parameters

  • DB

  • TB extends keyof DB & string

  • UpdatingObject

  • UpdateReturnColumns extends Readonly<SelectionColumn<DB, TB>[]> | ["*"]

  • UpdateReturn

Hierarchy

Properties

updateReturnTransform?: ((source, returns) => UpdateReturn)

Type declaration

    • (source, returns): UpdateReturn
    • Transformation to apply to column values returned from updates before returning values to the client. When inferring type parameters, specify a type for the source parameter. source is the object that contained the valiues with which the table row was updated, and returns are the values returned from the update.

      Parameters

      • source: UpdatingObject
      • returns: UpdateReturnColumns extends []
            ? never
            : SelectedRow<DB, TB, UpdateReturnColumns extends ["*"]
                ? never
                : UpdateReturnColumns[number], UpdateReturnColumns>

      Returns UpdateReturn

updateTransform?: ((source, columns) => Updateable<DB[TB]>)

Type declaration

    • (source, columns): Updateable<DB[TB]>
    • Transformation to apply to objects provided for updating rows. source is the object containing the values which which to update the table row. Only the columns in columns will actually be updated, with [*] indicating all columns.

      Parameters

      • source: UpdatingObject
      • columns: ["*"] | readonly UpdateKeys<DB[TB]>[]

      Returns Updateable<DB[TB]>

Generated using TypeDoc