RowKey<TRow>: Expand<Partial<ExtractByType<TRow, KeyField>>>

Typescript-specific.

This type is used to infer the primary key type from the row type as indicated by the TRow type parameter. As such, it represents all possible subsets of properties of TRow that include only properties of types that can be used as primary or secondary index keys (@see KeyField).

This type is used as a default value of TKey type parameter for APIs that take primary key, such as get, delete and others. Note that this is only a best-effort basis to determine the type of the primary key since the driver is not aware of what fields of the table constitute the primary key. You can specify the exact shape of the primary key by explicitly providing the value of TKey type parameter to these APIs.

If using untyped versions of the above APIs (see AnyRow), the key will be of type AnyKey.

See

Type Parameters

  • TRow

Generated using TypeDoc