orchid-orm 1.37.2 → 1.37.3
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Query, SelectableFromShape, CreateMethodsNames, CreateData, CreateBelongsToData, AddQueryDefaults, RelationConfigBase, SetQueryReturnsOne, SetQueryReturnsOneOptional, 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
|
-
import { ColumnsShapeBase, EmptyObject, MaybeArray, RecordUnknown,
|
|
3
|
+
import { ColumnsShapeBase, EmptyObject, MaybeArray, RecordUnknown, ShallowSimplify, ColumnShapeOutput, DefaultSelectColumns, ColumnShapeInput, ColumnShapeInputPartial, IsQuery, CoreQueryScopes, ColumnSchemaConfig, StaticSQLArgs, QueryColumn, DynamicSQLArg, QueryColumns, QueryReturnType } from 'orchid-core';
|
|
4
4
|
export * from 'orchid-core';
|
|
5
5
|
|
|
6
6
|
interface RelationCommonOptions<Related extends TableClass = TableClass, Scope extends Query = Query> {
|
|
@@ -447,12 +447,12 @@ interface ORMTableInput {
|
|
|
447
447
|
readonly softDelete?: true | string;
|
|
448
448
|
comment?: string;
|
|
449
449
|
}
|
|
450
|
-
type Queryable<T extends ORMTableInput> =
|
|
450
|
+
type Queryable<T extends ORMTableInput> = ShallowSimplify<{
|
|
451
451
|
[K in keyof T['columns']['shape']]?: T['columns']['shape'][K]['queryType'];
|
|
452
452
|
}>;
|
|
453
|
-
type Selectable<T extends ORMTableInput> =
|
|
454
|
-
type Insertable<T extends ORMTableInput> =
|
|
455
|
-
type Updatable<T extends ORMTableInput> =
|
|
453
|
+
type Selectable<T extends ORMTableInput> = ShallowSimplify<Pick<ColumnShapeOutput<T['columns']['shape']>, DefaultSelectColumns<T['columns']['shape']>>>;
|
|
454
|
+
type Insertable<T extends ORMTableInput> = ShallowSimplify<ColumnShapeInput<T['columns']['shape']>>;
|
|
455
|
+
type Updatable<T extends ORMTableInput> = ShallowSimplify<ColumnShapeInputPartial<T['columns']['shape']>>;
|
|
456
456
|
type BeforeHookMethod = (cb: QueryBeforeHook) => void;
|
|
457
457
|
type AfterHookMethod = (cb: QueryAfterHook) => void;
|
|
458
458
|
type AfterSelectableHookMethod = <Shape extends QueryColumns, S extends (keyof Shape)[]>(this: {
|