pqb 0.36.4 → 0.36.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ interface RelationConfigBase {
|
|
|
68
68
|
dataForUpdateOne: unknown;
|
|
69
69
|
}
|
|
70
70
|
interface RelationConfigDataForCreate {
|
|
71
|
-
columns:
|
|
71
|
+
columns: PropertyKey;
|
|
72
72
|
nested: RecordUnknown;
|
|
73
73
|
}
|
|
74
74
|
interface RelationsBase {
|
|
@@ -4069,9 +4069,13 @@ type CreateRelationsData<T extends CreateSelf, BelongsToData> = CreateDataWithDe
|
|
|
4069
4069
|
type CreateBelongsToData<T extends CreateSelf> = [
|
|
4070
4070
|
T['relations'][keyof T['relations']]['relationConfig']['dataForCreate']
|
|
4071
4071
|
] extends [never] ? never : CreateRelationsDataOmittingFKeys<T, T['relations'][keyof T['relations']]['relationConfig']['dataForCreate']>;
|
|
4072
|
-
type CreateRelationsDataOmittingFKeys<T extends CreateSelf, Union> = (Union extends RelationConfigDataForCreate ? (u:
|
|
4073
|
-
[P in
|
|
4074
|
-
} &
|
|
4072
|
+
type CreateRelationsDataOmittingFKeys<T extends CreateSelf, Union> = (Union extends RelationConfigDataForCreate ? (u: Union['columns'] extends keyof T['meta']['defaults'] ? {
|
|
4073
|
+
[P in Exclude<Union['columns'] & keyof T['inputType'], keyof T['meta']['defaults']>]: CreateColumn<T, P>;
|
|
4074
|
+
} & {
|
|
4075
|
+
[P in keyof T['meta']['defaults'] & Union['columns']]?: CreateColumn<T, P>;
|
|
4076
|
+
} & Partial<Union['nested']> : {
|
|
4077
|
+
[P in Union['columns'] & keyof T['inputType']]: CreateColumn<T, P>;
|
|
4078
|
+
} | Union['nested']) => void : never) extends (u: infer Obj) => void ? Obj : never;
|
|
4075
4079
|
type CreateResult<T extends CreateSelf, BT> = T extends {
|
|
4076
4080
|
isCount: true;
|
|
4077
4081
|
} ? SetQueryKind<T, 'create'> : T['returnType'] extends undefined | 'all' ? SetQueryReturnsOneKindResult<T, 'create', NarrowCreateResult<T, BT>> : T['returnType'] extends 'pluck' ? SetQueryReturnsColumnKindResult<T, 'create', NarrowCreateResult<T, BT>> : SetQueryKindResult<T, 'create', NarrowCreateResult<T, BT>>;
|