orchid-orm 1.41.1 → 1.42.0
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableData, Query, SelectableFromShape, CreateMethodsNames, CreateData, CreateBelongsToData, AddQueryDefaults, RelationConfigBase,
|
|
1
|
+
import { TableData, Query, SelectableFromShape, CreateMethodsNames, CreateData, CreateBelongsToData, AddQueryDefaults, RelationConfigBase, QueryTake, QueryTakeOptional, UpdateData, WhereArg, JoinQueryMethod, DeleteMethodsNames, Db, IsolationLevel, TransactionOptions, Adapter, FromArg, FromResult, AdapterOptions, DbSharedOptions, RelationsBase, ShapeColumnPrimaryKeys, ShapeUniqueColumns, TableDataItemsUniqueColumns, TableDataItemsUniqueColumnTuples, UniqueConstraints, TableDataItemsUniqueConstraints, ComputedColumnsFromOptions, MapTableScopesOption, TableDataItem, ComputedOptionsFactory, QueryData, TableDataFn, DbTableOptionScopes, RawSQL, DynamicRawSQL, DefaultSchemaConfig, DefaultColumnTypes, QueryBeforeHook, QueryAfterHook, AfterHook, WhereResult, MergeQuery } from 'pqb';
|
|
2
2
|
export * from 'pqb';
|
|
3
3
|
import { ColumnsShapeBase, ColumnShapeInputPartial, EmptyObject, MaybeArray, RecordUnknown, ShallowSimplify, ColumnShapeOutput, DefaultSelectColumns, ColumnShapeInput, IsQuery, CoreQueryScopes, ColumnSchemaConfig, StaticSQLArgs, QueryColumn, DynamicSQLArg, QueryColumns, QueryReturnType } from 'orchid-core';
|
|
4
4
|
export * from 'orchid-core';
|
|
@@ -45,7 +45,7 @@ type HasOneQuery<T extends RelationConfigSelf, Name extends string, TableQuery e
|
|
|
45
45
|
interface HasOneInfo<T extends RelationConfigSelf, Name extends string, Rel extends HasOne, Q extends Query, CD = T['relations'][Name]['options'] extends RelationThroughOptions ? CreateData<Q, CreateBelongsToData<Q>> : CreateData<AddQueryDefaults<Q, HasOnePopulate<T, Name>>, CreateBelongsToData<Q>>> extends RelationConfigBase {
|
|
46
46
|
query: Q;
|
|
47
47
|
params: HasOneParams<T, Rel>;
|
|
48
|
-
maybeSingle: T['relations'][Name]['options']['required'] extends true ?
|
|
48
|
+
maybeSingle: T['relations'][Name]['options']['required'] extends true ? QueryTake<Q> : QueryTakeOptional<Q>;
|
|
49
49
|
omitForeignKeyInCreate: never;
|
|
50
50
|
optionalDataForCreate: T['relations'][Name]['options'] extends RelationThroughOptions ? EmptyObject : {
|
|
51
51
|
[P in Name]?: RelationToOneDataForCreate<{
|
|
@@ -144,7 +144,7 @@ type BelongsToQuery<T extends Query, Name extends string> = {
|
|
|
144
144
|
interface BelongsToInfo<T extends RelationConfigSelf, Name extends string, Rel extends BelongsTo, FK extends string, Required, Q extends Query> extends RelationConfigBase {
|
|
145
145
|
query: Q;
|
|
146
146
|
params: BelongsToParams<T, Rel>;
|
|
147
|
-
maybeSingle: Required extends true ?
|
|
147
|
+
maybeSingle: Required extends true ? QueryTake<Q> : QueryTakeOptional<Q>;
|
|
148
148
|
omitForeignKeyInCreate: FK;
|
|
149
149
|
dataForCreate: {
|
|
150
150
|
columns: FK;
|