pqb 0.26.2 → 0.26.4
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 +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1338,11 +1338,13 @@ interface JBase {
|
|
|
1338
1338
|
result: QueryColumns;
|
|
1339
1339
|
shape: QueryColumns;
|
|
1340
1340
|
meta: QueryMetaBase;
|
|
1341
|
+
table?: string;
|
|
1341
1342
|
}
|
|
1342
1343
|
declare class OnQueryBuilder<S extends PickQueryMetaShape = QueryBase, J extends JBase = JBase> extends WhereQueryBase {
|
|
1343
1344
|
selectable: J['meta']['selectable'] & Omit<S['meta']['selectable'], keyof S['shape']>;
|
|
1344
1345
|
relations: J['relations'];
|
|
1345
1346
|
result: J['result'];
|
|
1347
|
+
table: J['table'];
|
|
1346
1348
|
shape: J['shape'];
|
|
1347
1349
|
withData: {};
|
|
1348
1350
|
constructor(q: QueryBase, { shape, joinedShapes }: PickQueryDataShapeAndJoinedShapes, joinTo: QueryDataJoinTo);
|
|
@@ -2547,7 +2549,7 @@ interface DefaultColumnTypes<SchemaConfig extends ColumnSchemaConfig> extends Ti
|
|
|
2547
2549
|
}): EmptyObject;
|
|
2548
2550
|
check(check: RawSQLBase): EmptyObject;
|
|
2549
2551
|
}
|
|
2550
|
-
declare const makeColumnTypes: <SchemaConfig extends ColumnSchemaConfig
|
|
2552
|
+
declare const makeColumnTypes: <SchemaConfig extends ColumnSchemaConfig<orchid_core.ColumnTypeBase<orchid_core.ColumnTypeSchemaArg, unknown, any, orchid_core.BaseOperators, unknown, unknown, any, unknown, any, orchid_core.ColumnDataBase>>>(schema: SchemaConfig) => DefaultColumnTypes<SchemaConfig>;
|
|
2551
2553
|
|
|
2552
2554
|
type NumberColumnData = BaseNumberData & {
|
|
2553
2555
|
identity: TableData.Identity;
|
|
@@ -2630,7 +2632,7 @@ declare class BigSerialColumn<Schema extends ColumnSchemaConfig> extends NumberA
|
|
|
2630
2632
|
toCode(t: string): Code;
|
|
2631
2633
|
}
|
|
2632
2634
|
|
|
2633
|
-
interface DefaultSchemaConfig extends ColumnSchemaConfig {
|
|
2635
|
+
interface DefaultSchemaConfig extends ColumnSchemaConfig<ColumnType> {
|
|
2634
2636
|
parse<T extends {
|
|
2635
2637
|
type: unknown;
|
|
2636
2638
|
}, Output>(this: T, fn: (input: T['type']) => Output): ParseColumn<T, unknown, Output>;
|
|
@@ -2944,7 +2946,7 @@ interface DbResult<ColumnTypes> extends Db<string, Record<string, never>, EmptyO
|
|
|
2944
2946
|
* })
|
|
2945
2947
|
* ```
|
|
2946
2948
|
*/
|
|
2947
|
-
declare const createDb: <SchemaConfig extends ColumnSchemaConfig = DefaultSchemaConfig, ColumnTypes = DefaultColumnTypes<SchemaConfig>>({ log, logger, snakeCase, nowSQL, schemaConfig, columnTypes: ctOrFn, ...options }: DbOptions<SchemaConfig, ColumnTypes>) => DbResult<ColumnTypes>;
|
|
2949
|
+
declare const createDb: <SchemaConfig extends ColumnSchemaConfig<ColumnTypeBase<orchid_core.ColumnTypeSchemaArg, unknown, any, orchid_core.BaseOperators, unknown, unknown, any, unknown, any, orchid_core.ColumnDataBase>> = DefaultSchemaConfig, ColumnTypes = DefaultColumnTypes<SchemaConfig>>({ log, logger, snakeCase, nowSQL, schemaConfig, columnTypes: ctOrFn, ...options }: DbOptions<SchemaConfig, ColumnTypes>) => DbResult<ColumnTypes>;
|
|
2948
2950
|
|
|
2949
2951
|
type ToSQLCtx = {
|
|
2950
2952
|
queryBuilder: Db;
|
|
@@ -5717,7 +5719,7 @@ declare class DynamicRawSQL<T extends QueryColumn, ColumnTypes = DefaultColumnTy
|
|
|
5717
5719
|
}
|
|
5718
5720
|
declare function raw<T = unknown>(...args: StaticSQLArgs): RawSQL<QueryColumn<T>>;
|
|
5719
5721
|
declare function raw<T = unknown>(...args: [DynamicSQLArg]): DynamicRawSQL<QueryColumn<T>>;
|
|
5720
|
-
declare const countSelect: RawSQL<QueryColumn<unknown, orchid_core.BaseOperators>, DefaultColumnTypes<ColumnSchemaConfig
|
|
5722
|
+
declare const countSelect: RawSQL<QueryColumn<unknown, orchid_core.BaseOperators>, DefaultColumnTypes<ColumnSchemaConfig<orchid_core.ColumnTypeBase<orchid_core.ColumnTypeSchemaArg, unknown, any, orchid_core.BaseOperators, unknown, unknown, any, unknown, any, orchid_core.ColumnDataBase>>>>[];
|
|
5721
5723
|
declare function sqlQueryArgsToExpression(args: SQLQueryArgs): RawSQL<QueryColumn>;
|
|
5722
5724
|
|
|
5723
5725
|
declare abstract class RawSqlMethods<ColumnTypes> {
|
|
@@ -6959,7 +6961,7 @@ declare abstract class ColumnType<Schema extends ColumnTypeSchemaArg = ColumnTyp
|
|
|
6959
6961
|
generated<T extends PickColumnData>(this: T, ...args: StaticSQLArgs): T;
|
|
6960
6962
|
}
|
|
6961
6963
|
|
|
6962
|
-
declare const simplifyColumnDefault: (value?: string) => RawSQL<orchid_core.QueryColumn<unknown, orchid_core.BaseOperators>, DefaultColumnTypes<orchid_core.ColumnSchemaConfig
|
|
6964
|
+
declare const simplifyColumnDefault: (value?: string) => RawSQL<orchid_core.QueryColumn<unknown, orchid_core.BaseOperators>, DefaultColumnTypes<orchid_core.ColumnSchemaConfig<ColumnTypeBase<orchid_core.ColumnTypeSchemaArg, unknown, any, orchid_core.BaseOperators, unknown, unknown, any, unknown, any, orchid_core.ColumnDataBase>>>> | undefined;
|
|
6963
6965
|
declare const instantiateColumn: (typeFn: () => ColumnTypeBase, params: ColumnFromDbParams) => ColumnTypeBase;
|
|
6964
6966
|
declare const getConstraintKind: (it: TableData.Constraint) => 'constraint' | 'foreignKey' | 'check';
|
|
6965
6967
|
|