Libraries
← Back to Website
All Versions
Preparing search index...
@cleverbrush/knex-schema
PrimaryKeyValueOf
Type Alias PrimaryKeyValueOf<S>
PrimaryKeyValueOf
:
PrimaryKeyOf
<
S
>
extends
readonly
(
infer
_Item
extends
string
)
[]
?
PrimaryKeyOf
<
S
>
extends
readonly
string
[]
?
PkTupleValue
<
S
,
PrimaryKeyOf
<
S
>
>
:
never
:
PrimaryKeyOf
<
S
>
extends
string
?
InferType
<
S
>
[
PrimaryKeyOf
<
S
>
&
keyof
InferType
<
S
>
]
:
never
The runtime value type of a schema's primary key.
For a single-column PK, the inferred type of that property (e.g.
number
).
For a composite PK, a tuple of inferred property types in declared order (e.g.
[number, number]
).
never
if no primary key is declared.
Type Parameters
S
extends
ObjectSchemaBuilder
<
any
,
any
,
any
,
any
,
any
,
any
,
any
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
← Back to Website
All Versions
Libraries
Loading...
The runtime value type of a schema's primary key.
number).[number, number]).neverif no primary key is declared.