kern-orm 0.14.0 → 0.16.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-CFkH9TlC.d.mts → index-DD_wYhRD.d.mts} +18 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +63 -3695
- package/dist/schema-lVpsWpEF.mjs +3685 -0
- package/dist/testing.d.mts +17 -1
- package/dist/testing.mjs +332 -1
- package/dist/types.d.mts +1 -1
- package/package.json +2 -2
|
@@ -1100,7 +1100,7 @@ declare class SelectQuery<out S extends SelectQueryState, out Kind extends Selec
|
|
|
1100
1100
|
fieldTypes: SelectedFieldTypes<S["fieldTypes"], ColumnFieldTypes<S["table"], keyof S["table"]["columns"]>>;
|
|
1101
1101
|
}>, Kind>;
|
|
1102
1102
|
/** Selects the listed columns, replacing fields under their keys. */
|
|
1103
|
-
select<S extends RecordQueryState$1, Kind extends SelectQueryKind, K extends keyof S["table"]["columns"] & string>(this: SelectQuery<S, Kind>, ...keys: K[]): SelectQuery<ChangeState<S, {
|
|
1103
|
+
select<S extends RecordQueryState$1, Kind extends SelectQueryKind, K extends keyof S["table"]["columns"] & string = never>(this: SelectQuery<S, Kind>, ...keys: K[]): SelectQuery<ChangeState<S, {
|
|
1104
1104
|
result: MergeSelection<S["result"], Pick<Selectable<S["table"]>, K>>;
|
|
1105
1105
|
fieldTypes: SelectedFieldTypes<S["fieldTypes"], ColumnFieldTypes<S["table"], K>>;
|
|
1106
1106
|
}>, Kind>;
|
|
@@ -1467,6 +1467,8 @@ declare class SelectQuery<out S extends SelectQueryState, out Kind extends Selec
|
|
|
1467
1467
|
* A value is what `insert` takes as a value, such as a query of an aggregate of related records.
|
|
1468
1468
|
* A query of `find` or `findBy` rejects with `NotFoundError` without its row, unless `optional` or `nullable` allows it.
|
|
1469
1469
|
* A query without a filter must call `all` to update every row, unless it is a query of a singleton table, which updates its row.
|
|
1470
|
+
*
|
|
1471
|
+
* Values without a column to set change no row and lock none: the query reads the rows that it chooses instead, and resolves to their number or the fields selected after it.
|
|
1470
1472
|
* Select the fields that it returns after it, with their values after the update, such as `update(callback).select("id")`.
|
|
1471
1473
|
*/
|
|
1472
1474
|
update<S extends SelectQueryState, Kind extends SelectQueryKind, F extends (columns: ColumnRefs<S["table"]> & RelationRefs<S["schema"]>) => UpdateValues<S["table"]>>(this: SelectQuery<S, Kind>, callback: F): MutationQuery<InitialMutationState<S["table"], S["schema"], S["rows"], OperandUses<ReturnType<F>[keyof ReturnType<F>]>>, Kind>;
|
|
@@ -1477,6 +1479,8 @@ declare class SelectQuery<out S extends SelectQueryState, out Kind extends Selec
|
|
|
1477
1479
|
* A value is what `insert` takes as a value.
|
|
1478
1480
|
* A query of `find` or `findBy` rejects with `NotFoundError` without its row, unless `optional` or `nullable` allows it.
|
|
1479
1481
|
* A query without a filter must call `all` to update every row, unless it is a query of a singleton table, which updates its row.
|
|
1482
|
+
*
|
|
1483
|
+
* Values without a column to set change no row and lock none: the query reads the rows that it chooses instead, and resolves to their number or the fields selected after it.
|
|
1480
1484
|
* Select the fields that it returns after it, with their values after the update, such as `update(set).select("id")`.
|
|
1481
1485
|
*/
|
|
1482
1486
|
update<S extends SelectQueryState, Kind extends SelectQueryKind>(this: SelectQuery<S, Kind>, set: UpdateSet<S["table"], S["schema"]>): MutationQuery<InitialMutationState<S["table"], S["schema"], S["rows"]>, Kind>;
|
|
@@ -1972,7 +1976,7 @@ declare class MutationQuery<out S extends MutationQueryState, out Kind extends S
|
|
|
1972
1976
|
/** Returns all columns of each changed row, replacing fields under their keys, instead of the number of the rows. */
|
|
1973
1977
|
select<S extends RecordMutationState, Kind extends SelectQueryKind>(this: MutationQuery<S, Kind>, all: "*"): MutationQuery<RecordsState<S, Selectable<S["table"]>>, Kind>;
|
|
1974
1978
|
/** Returns the listed columns of each changed row, replacing fields under their keys, instead of the number of the rows. */
|
|
1975
|
-
select<S extends RecordMutationState, Kind extends SelectQueryKind, K extends keyof S["table"]["columns"] & string>(this: MutationQuery<S, Kind>, ...keys: K[]): MutationQuery<RecordsState<S, Pick<Selectable<S["table"]>, K>>, Kind>;
|
|
1979
|
+
select<S extends RecordMutationState, Kind extends SelectQueryKind, K extends keyof S["table"]["columns"] & string = never>(this: MutationQuery<S, Kind>, ...keys: K[]): MutationQuery<RecordsState<S, Pick<Selectable<S["table"]>, K>>, Kind>;
|
|
1976
1980
|
/**
|
|
1977
1981
|
* Returns the expressions and nested queries that `callback` returns for each changed row, replacing fields under their keys, instead of the number of the rows.
|
|
1978
1982
|
*
|
|
@@ -2455,7 +2459,11 @@ interface DbMutationState<T extends AnyTable, U extends UsedRelation> extends Mu
|
|
|
2455
2459
|
}
|
|
2456
2460
|
interface DbMethods<T extends Tables, R extends SchemaRelations> {
|
|
2457
2461
|
readonly $schema: Schema<T, R>;
|
|
2458
|
-
/**
|
|
2462
|
+
/**
|
|
2463
|
+
* Database that the `Db` is bound to.
|
|
2464
|
+
*
|
|
2465
|
+
* Reading it calls the function given to `bindSchema` instead of a database, as a statement does, such as to resolve the database of the current context.
|
|
2466
|
+
*/
|
|
2459
2467
|
readonly $database: Database;
|
|
2460
2468
|
/**
|
|
2461
2469
|
* PostgreSQL schema of the tables, or `undefined` for a `Db` bound without `schemaName`.
|
|
@@ -2562,8 +2570,10 @@ type AnyDb = Db<any, any>;
|
|
|
2562
2570
|
* Binds a schema to a database, placing its tables in a PostgreSQL schema.
|
|
2563
2571
|
*
|
|
2564
2572
|
* Schemas bound to the same database, such as tenant and SaaS schemas, share its connections and transactions.
|
|
2573
|
+
* Given a function instead of a database, such as one that reads it from dependency injection, the `Db` calls it for each statement and at the start of each transaction, session, and lock, in the async context of the caller.
|
|
2574
|
+
* The function must return the same database within a transaction or session; in the callback of a transaction or session of the `Db`, a statement for which it returns another database rejects.
|
|
2565
2575
|
*/
|
|
2566
|
-
declare function bindSchema<T extends Tables, R extends SchemaRelations>(schema: Schema<T, R>, database: Database, options?: BindOptions): Db<T, R>;
|
|
2576
|
+
declare function bindSchema<T extends Tables, R extends SchemaRelations>(schema: Schema<T, R>, database: Database | (() => Database), options?: BindOptions): Db<T, R>;
|
|
2567
2577
|
/** Occurrence of a table in `FROM`. */
|
|
2568
2578
|
interface TableSourceNode {
|
|
2569
2579
|
readonly kind: "table";
|
|
@@ -2829,7 +2839,7 @@ interface ConflictUpdateNode {
|
|
|
2829
2839
|
/** Update statement of the rows that its filters choose. */
|
|
2830
2840
|
interface UpdateNode<Field = ProjectionNode> extends MutationParts<Field> {
|
|
2831
2841
|
readonly kind: "update";
|
|
2832
|
-
/** Assignments of `SET`,
|
|
2842
|
+
/** Assignments of `SET`, with unique keys; without them, the update changes no row and compiles to a select of the rows that it would change. */
|
|
2833
2843
|
readonly set: readonly AssignmentNode[];
|
|
2834
2844
|
readonly filters: QueryFilters;
|
|
2835
2845
|
}
|
|
@@ -2997,12 +3007,12 @@ declare function identifier$1(...names: [string, ...string[]]): UntypedExpressio
|
|
|
2997
3007
|
* `value` may then also be an expression, such as an operand of a generic operator, which is returned as it is, with its own type and nullability.
|
|
2998
3008
|
* A query of one value becomes an expression with the runtime type of the first argument and the nullability of the query, typed as an `AnyExpression` of its value.
|
|
2999
3009
|
*/
|
|
3000
|
-
declare function param<Output, Input, O extends OperatorDefinitions>(type: Type<Output, Input, O, any>, value: Input): Expression<Output, O, Input>;
|
|
3001
|
-
declare function param<E extends AnyExpression, V extends (E extends AnyExpression<infer T, infer I> ? Operand<T, I> : never)>(type: E, value: V): V extends AnyExpression ? V : V extends ScalarQuery ? AnyExpression<ScalarQueryValue<V>> : E;
|
|
3010
|
+
declare function param$1<Output, Input, O extends OperatorDefinitions>(type: Type<Output, Input, O, any>, value: Input): Expression<Output, O, Input>;
|
|
3011
|
+
declare function param$1<E extends AnyExpression, V extends (E extends AnyExpression<infer T, infer I> ? Operand<T, I> : never)>(type: E, value: V): V extends AnyExpression ? V : V extends ScalarQuery ? AnyExpression<ScalarQueryValue<V>> : E;
|
|
3002
3012
|
/**
|
|
3003
3013
|
* Converts a column key to snake case, such as `form_id` for `formId`, for the `columnName` option of `createTableFactory`.
|
|
3004
3014
|
*
|
|
3005
3015
|
* A run of capital letters is one word, such as `user_id` for `userID`, and digits stay in their word, such as `line2`.
|
|
3006
3016
|
*/
|
|
3007
3017
|
declare function toSnakeCase(key: string): string;
|
|
3008
|
-
export { NotAColumn as $, BaseType as $i, avg as $n, WhereValues as $r, SchemaTables as $t, SqlQueryResult as A, QueryState as Ai, ExpressionInput as An, UpdateSet as Ar, DeclaredRelations as At, createDatabase as B, ColumnShape as Bi, SelectionFieldTypes as Bn, FoundState as Br, RequiredMember as Bt, ResultByRows$1 as C, ScalarQuery as Ci, TypedOperandInput as Cn, ResultOf as Cr, DbQueryState as Ct, SessionOptions$1 as D, FoundKey as Di, greatest as Dn, ColumnValue as Dr, SynchronousResult as Dt, ResultRows$1 as E, EmptyRecord as Ei, coalesce as En, from as Er, NotSynchronous as Et, TransactionConnectionError as F, TableQueryState as Fi, GroupedRecord as Fn, Helper as Fr, RelationDeclaration as Ft, toSnakeCase as G, TableFactoryOptions as Gi, AggregateExpression as Gn, KeyCheck as Gr, UsableRelation as Gt, isOutcomeUnknown as H, KeyColumns as Hi, SelectionUses as Hn, SelectedOperandType as Hr, SchemaRelations as Ht, TransactionOptions$1 as I, AnyTable as Ii, MergeSelection as In, HelperEffect as Ir, RelationDeclarations as It, param as J, ToColumns as Ji, GroupAggregateExpression as Jn, PrimaryKeyValues as Jr, one as Jt, SqlTemplate as K, TableKeys as Ki, AggregateOptions as Kn, NotAKey as Kr, UsedRelation as Kt, TypeOptions$1 as L, AnyTableKeys as Li, NestedQuery as Ln, defineHelper as Lr, RelationKey as Lt, SqlStatement$1 as M, QueryValueType as Mi, GroupOperandValue as Mn, UpsertValues as Mr, NoRelations as Mt, SqlValue as N, SelectQueryState as Ni, GroupSelectionResult as Nn, RowLockOptions as Nr, OneRelationKeys as Nt, SqlFragment$2 as O, Grouped as Oi, least as On, ConflictUpdateSet as Or, TransformedQuery as Ot, TextValue as P, SingletonQueryState as Pi, GroupedField as Pn, AnyHelper as Pr, Relation as Pt, MatchResult as Q, AnyType as Qi, UnfilteredStringAggOptions as Qn, WhereFilter as Qr, SchemaPartRelations as Qt, TypeTransform$1 as R, ColumnDefinitions as Ri, SelectedFieldTypes as Rn, FilteredStateRows as Rr, RelationKeys as Rt, QueryErrorCondition as S, OperandUses as Si, TypedOperand as Sn, BoundSelectQuery as Sr, DbOf as St, ResultMode$1 as T, ValuesQuery as Ti, caseWhen as Tn, SingletonInsertMany as Tr, AnyTransformedQuery as Tt, isQueryError as U, Selectable as Ui, Literal as Un, GroupTerm as Ur, TableContext as Ut, createStatement$1 as V, ColumnValues as Vi, SelectionResult as Vn, GroupedState as Vr, SchemaContext as Vt, toDriverError as W, Table as Wi, literal as Wn, GroupTerms as Wr, TableRelations as Wt, ColumnRefKey as X, defineTable as Xi, StringAggOptions as Xn, WhereCallback as Xr, Schema as Xt, sql as Y, createTableFactory as Yi, GroupValue as Yn, EqValue as Yr, AnySchema as Yt, MatchCheck as Z, RequiredRelationError as Zi, UnfilteredAggregateOptions as Zn, WhereCondition as Zr, SchemaPart as Zt, OneRow$1 as _, defineGenericOperator as _a, BooleanResult as _i, CaseBranch as _n, orderBy as _r, UntypedExpression as _t, Database$1 as a, AnyColumn as aa, not as ai, SelectionState as an, some as ar, TextConversionSignature as at, QueryError as b, OperandValue as bi, FollowingOperand as bn, RelationRefs as br, Db as bt, DerivableType$1 as c, KeyKind as ca, FilteredRows as ci, AnyMutationQuery as cn, OrderColumns as cr, TextTypeOperators as ct, DriverErrorFields as d, MergeOperators as da, CompileOptions as di, ConflictTarget as dn, OrderTerm as dr, orderingOperators as dt, Type as ea, CombinedCondition as ei, Tables as en, count as er, matches as et, DriverResult as f, NoOperators as fa, EqualityOperator as fi, InitialInsertState as fn, OrderTerms as fr, AnyExpression as ft, NotFoundError$1 as g, OperatorSignature as ga, equalityOperators as gi, MutationQueryState as gn, desc as gr, TypedExpression as gt, IsolationLevel as h, GenericOperatorImplementation as ha, InSignature as hi, MutationQuery as hn, asc as hr, ExpressionOperators as ht, ConnectionError as i, defineType$1 as ia, and as ii, RecordQueryState as in, min as ir, PatternSignature as it, SqlQueryState as j, QueryStateOf as ji, ExpressionValue as jn, UpdateValues as jr, MergeRelations as jt, SqlQuery$1 as k, InitialQueryState as ki, ColumnFieldTypes as kn, InsertValues as kr, TransformedQueryState as kt, DerivableTypeWithParameters as l, ToColumn as la, QueryResult as li, ConflictActionRequired as ln, OrderDirection as lr, textOperators as lt, InitialSqlQueryState$1 as m, GenericOperator as ma, HasEquality as mi, InsertMutationState as mn, SelectedRefs as mr, Expression as mt, BaseDerivableType as n, TypeOperators as na, ConditionOperand as ni, AnyRecordQuery as nn, every as nr, FALSE as nt, DatabaseOptions as o, Column as oa, or as oi, AnyQuery as on, stringAgg as or, TextLengthSignature as ot, FieldTypes as p, OperatorDefinitions as pa, EqualityOperators as pi, InitialMutationState as pn, Ordering as pr, BaseOperators as pt, identifier$1 as q, TableOptions as qi, CountExpression as qn, PrimaryKeyColumn as qr, many as qt, Connection as r, TypeOutput as ra, Predicate as ri, RecordQuery as rn, max as rr, TRUE as rt, DecodedFields as s, ColumnAttributes as sa, ExistsValueType as si, SelectQueryKind as sn, sum as sr, TextOperators as st, AnySqlQuery$1 as t, TypeInput as ta, Condition as ti, defineSchema as tn, countDistinct as tr, defineExpression as tt, Driver as u, BoundOperators as ua, CountValueType as ui, ConflictKeyRequired as un, OrderKey as ur, NumberTypeOperators as ut, OneValueRows$1 as v, ComparisonSignature as vi, CaseCondition as vn, ColumnRefs as vr, AnyDb as vt, ResultDecodeError$1 as w, TypedScalarQuery as wi, TypedOperandOperators as wn, SelectQuery as wr, bindSchema as wt, QueryErrorCode as x, compare as xi, NullSkippingResult as xn, AnySelectQuery as xr, DbMutationState as xt, PollLockOptions$1 as y, Operand as yi, CaseValue as yn, QueryContext as yr, BindOptions as yt, ValueRows$1 as z, ColumnOperators as zi, Selection as zn, FoundQueryState as zr, RelationKind as zt };
|
|
3018
|
+
export { NotAColumn as $, BaseType as $i, avg as $n, WhereValues as $r, SchemaTables as $t, SqlQueryResult as A, QueryState as Ai, ExpressionInput as An, UpdateSet as Ar, DeclaredRelations as At, createDatabase as B, ColumnShape as Bi, SelectionFieldTypes as Bn, FoundState as Br, RequiredMember as Bt, ResultByRows$1 as C, ScalarQuery as Ci, TypedOperandInput as Cn, ResultOf as Cr, DbQueryState as Ct, SessionOptions$1 as D, FoundKey as Di, greatest as Dn, ColumnValue as Dr, SynchronousResult as Dt, ResultRows$1 as E, EmptyRecord as Ei, coalesce as En, from as Er, NotSynchronous as Et, TransactionConnectionError as F, TableQueryState as Fi, GroupedRecord as Fn, Helper as Fr, RelationDeclaration as Ft, toSnakeCase as G, TableFactoryOptions as Gi, AggregateExpression as Gn, KeyCheck as Gr, UsableRelation as Gt, isOutcomeUnknown as H, KeyColumns as Hi, SelectionUses as Hn, SelectedOperandType as Hr, SchemaRelations as Ht, TransactionOptions$1 as I, AnyTable as Ii, MergeSelection as In, HelperEffect as Ir, RelationDeclarations as It, param$1 as J, ToColumns as Ji, GroupAggregateExpression as Jn, PrimaryKeyValues as Jr, one as Jt, SqlTemplate as K, TableKeys as Ki, AggregateOptions as Kn, NotAKey as Kr, UsedRelation as Kt, TypeOptions$1 as L, AnyTableKeys as Li, NestedQuery as Ln, defineHelper as Lr, RelationKey as Lt, SqlStatement$1 as M, QueryValueType as Mi, GroupOperandValue as Mn, UpsertValues as Mr, NoRelations as Mt, SqlValue as N, SelectQueryState as Ni, GroupSelectionResult as Nn, RowLockOptions as Nr, OneRelationKeys as Nt, SqlFragment$2 as O, Grouped as Oi, least as On, ConflictUpdateSet as Or, TransformedQuery as Ot, TextValue as P, SingletonQueryState as Pi, GroupedField as Pn, AnyHelper as Pr, Relation as Pt, MatchResult as Q, AnyType as Qi, UnfilteredStringAggOptions as Qn, WhereFilter as Qr, SchemaPartRelations as Qt, TypeTransform$1 as R, ColumnDefinitions as Ri, SelectedFieldTypes as Rn, FilteredStateRows as Rr, RelationKeys as Rt, QueryErrorCondition as S, OperandUses as Si, TypedOperand as Sn, BoundSelectQuery as Sr, DbOf as St, ResultMode$1 as T, ValuesQuery as Ti, caseWhen as Tn, SingletonInsertMany as Tr, AnyTransformedQuery as Tt, isQueryError as U, Selectable as Ui, Literal as Un, GroupTerm as Ur, TableContext as Ut, createStatement$1 as V, ColumnValues as Vi, SelectionResult as Vn, GroupedState as Vr, SchemaContext as Vt, toDriverError as W, Table as Wi, literal as Wn, GroupTerms as Wr, TableRelations as Wt, ColumnRefKey as X, defineTable as Xi, StringAggOptions as Xn, WhereCallback as Xr, Schema as Xt, sql as Y, createTableFactory as Yi, GroupValue as Yn, EqValue as Yr, AnySchema as Yt, MatchCheck as Z, RequiredRelationError as Zi, UnfilteredAggregateOptions as Zn, WhereCondition as Zr, SchemaPart as Zt, OneRow$1 as _, defineGenericOperator as _a, BooleanResult as _i, CaseBranch as _n, orderBy as _r, UntypedExpression as _t, Database$1 as a, AnyColumn as aa, not as ai, SelectionState as an, some as ar, TextConversionSignature as at, QueryError as b, OperandValue as bi, FollowingOperand as bn, RelationRefs as br, Db as bt, DerivableType$1 as c, KeyKind as ca, FilteredRows as ci, AnyMutationQuery as cn, OrderColumns as cr, TextTypeOperators as ct, DriverErrorFields as d, MergeOperators as da, CompileOptions as di, ConflictTarget as dn, OrderTerm as dr, orderingOperators as dt, Type as ea, CombinedCondition as ei, Tables as en, count as er, matches as et, DriverResult as f, NoOperators as fa, EqualityOperator as fi, InitialInsertState as fn, OrderTerms as fr, AnyExpression as ft, NotFoundError$1 as g, OperatorSignature as ga, equalityOperators as gi, MutationQueryState as gn, desc as gr, TypedExpression as gt, IsolationLevel as h, GenericOperatorImplementation as ha, InSignature as hi, MutationQuery as hn, asc as hr, ExpressionOperators as ht, ConnectionError as i, defineType$1 as ia, and as ii, RecordQueryState as in, min as ir, PatternSignature as it, SqlQueryState as j, QueryStateOf as ji, ExpressionValue as jn, UpdateValues as jr, MergeRelations as jt, SqlQuery$1 as k, InitialQueryState as ki, ColumnFieldTypes as kn, InsertValues as kr, TransformedQueryState as kt, DerivableTypeWithParameters as l, ToColumn as la, QueryResult as li, ConflictActionRequired as ln, OrderDirection as lr, textOperators as lt, InitialSqlQueryState$1 as m, GenericOperator as ma, HasEquality as mi, InsertMutationState as mn, SelectedRefs as mr, Expression as mt, BaseDerivableType as n, TypeOperators as na, ConditionOperand as ni, AnyRecordQuery as nn, every as nr, FALSE as nt, DatabaseOptions as o, Column as oa, or as oi, AnyQuery as on, stringAgg as or, TextLengthSignature as ot, FieldTypes as p, OperatorDefinitions as pa, EqualityOperators as pi, InitialMutationState as pn, Ordering as pr, BaseOperators as pt, identifier$1 as q, TableOptions as qi, CountExpression as qn, PrimaryKeyColumn as qr, many as qt, Connection as r, TypeOutput as ra, Predicate as ri, RecordQuery as rn, max as rr, TRUE as rt, DecodedFields as s, ColumnAttributes as sa, ExistsValueType as si, SelectQueryKind as sn, sum as sr, TextOperators as st, AnySqlQuery$1 as t, TypeInput as ta, Condition as ti, defineSchema as tn, countDistinct as tr, defineExpression as tt, Driver as u, BoundOperators as ua, CountValueType as ui, ConflictKeyRequired as un, OrderKey as ur, NumberTypeOperators as ut, OneValueRows$1 as v, ComparisonSignature as vi, CaseCondition as vn, ColumnRefs as vr, AnyDb as vt, ResultDecodeError$1 as w, TypedScalarQuery as wi, TypedOperandOperators as wn, SelectQuery as wr, bindSchema as wt, QueryErrorCode as x, compare as xi, NullSkippingResult as xn, AnySelectQuery as xr, DbMutationState as xt, PollLockOptions$1 as y, Operand as yi, CaseValue as yn, QueryContext as yr, BindOptions as yt, ValueRows$1 as z, ColumnOperators as zi, Selection as zn, FoundQueryState as zr, RelationKind as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as NotAColumn, $i as BaseType, $n as avg, $r as WhereValues, $t as SchemaTables, A as SqlQueryResult, Ai as QueryState, An as ExpressionInput, Ar as UpdateSet, At as DeclaredRelations, B as createDatabase, Bi as ColumnShape, Bn as SelectionFieldTypes, Br as FoundState, Bt as RequiredMember, C as ResultByRows, Ci as ScalarQuery, Cn as TypedOperandInput, Cr as ResultOf, Ct as DbQueryState, D as SessionOptions, Di as FoundKey, Dn as greatest, Dr as ColumnValue, Dt as SynchronousResult, E as ResultRows, Ei as EmptyRecord, En as coalesce, Er as from, Et as NotSynchronous, F as TransactionConnectionError, Fi as TableQueryState, Fn as GroupedRecord, Fr as Helper, Ft as RelationDeclaration, G as toSnakeCase, Gi as TableFactoryOptions, Gn as AggregateExpression, Gr as KeyCheck, Gt as UsableRelation, H as isOutcomeUnknown, Hi as KeyColumns, Hn as SelectionUses, Hr as SelectedOperandType, Ht as SchemaRelations, I as TransactionOptions, Ii as AnyTable, In as MergeSelection, Ir as HelperEffect, It as RelationDeclarations, J as param, Ji as ToColumns, Jn as GroupAggregateExpression, Jr as PrimaryKeyValues, Jt as one, K as SqlTemplate, Ki as TableKeys, Kn as AggregateOptions, Kr as NotAKey, Kt as UsedRelation, L as TypeOptions, Li as AnyTableKeys, Ln as NestedQuery, Lr as defineHelper, Lt as RelationKey, M as SqlStatement, Mi as QueryValueType, Mn as GroupOperandValue, Mr as UpsertValues, Mt as NoRelations, N as SqlValue, Ni as SelectQueryState, Nn as GroupSelectionResult, Nr as RowLockOptions, Nt as OneRelationKeys, O as SqlFragment, Oi as Grouped, On as least, Or as ConflictUpdateSet, Ot as TransformedQuery, P as TextValue, Pi as SingletonQueryState, Pn as GroupedField, Pr as AnyHelper, Pt as Relation, Q as MatchResult, Qi as AnyType, Qn as UnfilteredStringAggOptions, Qr as WhereFilter, Qt as SchemaPartRelations, R as TypeTransform, Ri as ColumnDefinitions, Rn as SelectedFieldTypes, Rr as FilteredStateRows, Rt as RelationKeys, S as QueryErrorCondition, Si as OperandUses, Sn as TypedOperand, Sr as BoundSelectQuery, St as DbOf, T as ResultMode, Ti as ValuesQuery, Tn as caseWhen, Tr as SingletonInsertMany, Tt as AnyTransformedQuery, U as isQueryError, Ui as Selectable, Un as Literal, Ur as GroupTerm, Ut as TableContext, V as createStatement, Vi as ColumnValues, Vn as SelectionResult, Vr as GroupedState, Vt as SchemaContext, W as toDriverError, Wi as Table, Wn as literal, Wr as GroupTerms, Wt as TableRelations, X as ColumnRefKey, Xi as defineTable, Xn as StringAggOptions, Xr as WhereCallback, Xt as Schema, Y as sql, Yi as createTableFactory, Yn as GroupValue, Yr as EqValue, Yt as AnySchema, Z as MatchCheck, Zi as RequiredRelationError, Zn as UnfilteredAggregateOptions, Zr as WhereCondition, Zt as SchemaPart, _ as OneRow, _a as defineGenericOperator, _i as BooleanResult, _n as CaseBranch, _r as orderBy, _t as UntypedExpression, a as Database, aa as AnyColumn, ai as not, an as SelectionState, ar as some, at as TextConversionSignature, b as QueryError, bi as OperandValue, bn as FollowingOperand, br as RelationRefs, bt as Db, c as DerivableType, ca as KeyKind, ci as FilteredRows, cn as AnyMutationQuery, cr as OrderColumns, ct as TextTypeOperators, d as DriverErrorFields, da as MergeOperators, di as CompileOptions, dn as ConflictTarget, dr as OrderTerm, dt as orderingOperators, ea as Type, ei as CombinedCondition, en as Tables, er as count, et as matches, f as DriverResult, fa as NoOperators, fi as EqualityOperator, fn as InitialInsertState, fr as OrderTerms, ft as AnyExpression, g as NotFoundError, ga as OperatorSignature, gi as equalityOperators, gn as MutationQueryState, gr as desc, gt as TypedExpression, h as IsolationLevel, ha as GenericOperatorImplementation, hi as InSignature, hn as MutationQuery, hr as asc, ht as ExpressionOperators, i as ConnectionError, ia as defineType, ii as and, in as RecordQueryState, ir as min, it as PatternSignature, j as SqlQueryState, ji as QueryStateOf, jn as ExpressionValue, jr as UpdateValues, jt as MergeRelations, k as SqlQuery, ki as InitialQueryState, kn as ColumnFieldTypes, kr as InsertValues, kt as TransformedQueryState, l as DerivableTypeWithParameters, la as ToColumn, li as QueryResult, ln as ConflictActionRequired, lr as OrderDirection, lt as textOperators, m as InitialSqlQueryState, ma as GenericOperator, mi as HasEquality, mn as InsertMutationState, mr as SelectedRefs, mt as Expression, n as BaseDerivableType, na as TypeOperators, ni as ConditionOperand, nn as AnyRecordQuery, nr as every, nt as FALSE, o as DatabaseOptions, oa as Column, oi as or, on as AnyQuery, or as stringAgg, ot as TextLengthSignature, p as FieldTypes, pa as OperatorDefinitions, pi as EqualityOperators, pn as InitialMutationState, pr as Ordering, pt as BaseOperators, q as identifier, qi as TableOptions, qn as CountExpression, qr as PrimaryKeyColumn, qt as many, r as Connection, ra as TypeOutput, ri as Predicate, rn as RecordQuery, rr as max, rt as TRUE, s as DecodedFields, sa as ColumnAttributes, si as ExistsValueType, sn as SelectQueryKind, sr as sum, st as TextOperators, t as AnySqlQuery, ta as TypeInput, ti as Condition, tn as defineSchema, tr as countDistinct, tt as defineExpression, u as Driver, ua as BoundOperators, ui as CountValueType, un as ConflictKeyRequired, ur as OrderKey, ut as NumberTypeOperators, v as OneValueRows, vi as ComparisonSignature, vn as CaseCondition, vr as ColumnRefs, vt as AnyDb, w as ResultDecodeError, wi as TypedScalarQuery, wn as TypedOperandOperators, wr as SelectQuery, wt as bindSchema, x as QueryErrorCode, xi as compare, xn as NullSkippingResult, xr as AnySelectQuery, xt as DbMutationState, y as PollLockOptions, yi as Operand, yn as CaseValue, yr as QueryContext, yt as BindOptions, z as ValueRows, zi as ColumnOperators, zn as Selection, zr as FoundQueryState, zt as RelationKind } from "./index-
|
|
1
|
+
import { $ as NotAColumn, $i as BaseType, $n as avg, $r as WhereValues, $t as SchemaTables, A as SqlQueryResult, Ai as QueryState, An as ExpressionInput, Ar as UpdateSet, At as DeclaredRelations, B as createDatabase, Bi as ColumnShape, Bn as SelectionFieldTypes, Br as FoundState, Bt as RequiredMember, C as ResultByRows, Ci as ScalarQuery, Cn as TypedOperandInput, Cr as ResultOf, Ct as DbQueryState, D as SessionOptions, Di as FoundKey, Dn as greatest, Dr as ColumnValue, Dt as SynchronousResult, E as ResultRows, Ei as EmptyRecord, En as coalesce, Er as from, Et as NotSynchronous, F as TransactionConnectionError, Fi as TableQueryState, Fn as GroupedRecord, Fr as Helper, Ft as RelationDeclaration, G as toSnakeCase, Gi as TableFactoryOptions, Gn as AggregateExpression, Gr as KeyCheck, Gt as UsableRelation, H as isOutcomeUnknown, Hi as KeyColumns, Hn as SelectionUses, Hr as SelectedOperandType, Ht as SchemaRelations, I as TransactionOptions, Ii as AnyTable, In as MergeSelection, Ir as HelperEffect, It as RelationDeclarations, J as param, Ji as ToColumns, Jn as GroupAggregateExpression, Jr as PrimaryKeyValues, Jt as one, K as SqlTemplate, Ki as TableKeys, Kn as AggregateOptions, Kr as NotAKey, Kt as UsedRelation, L as TypeOptions, Li as AnyTableKeys, Ln as NestedQuery, Lr as defineHelper, Lt as RelationKey, M as SqlStatement, Mi as QueryValueType, Mn as GroupOperandValue, Mr as UpsertValues, Mt as NoRelations, N as SqlValue, Ni as SelectQueryState, Nn as GroupSelectionResult, Nr as RowLockOptions, Nt as OneRelationKeys, O as SqlFragment, Oi as Grouped, On as least, Or as ConflictUpdateSet, Ot as TransformedQuery, P as TextValue, Pi as SingletonQueryState, Pn as GroupedField, Pr as AnyHelper, Pt as Relation, Q as MatchResult, Qi as AnyType, Qn as UnfilteredStringAggOptions, Qr as WhereFilter, Qt as SchemaPartRelations, R as TypeTransform, Ri as ColumnDefinitions, Rn as SelectedFieldTypes, Rr as FilteredStateRows, Rt as RelationKeys, S as QueryErrorCondition, Si as OperandUses, Sn as TypedOperand, Sr as BoundSelectQuery, St as DbOf, T as ResultMode, Ti as ValuesQuery, Tn as caseWhen, Tr as SingletonInsertMany, Tt as AnyTransformedQuery, U as isQueryError, Ui as Selectable, Un as Literal, Ur as GroupTerm, Ut as TableContext, V as createStatement, Vi as ColumnValues, Vn as SelectionResult, Vr as GroupedState, Vt as SchemaContext, W as toDriverError, Wi as Table, Wn as literal, Wr as GroupTerms, Wt as TableRelations, X as ColumnRefKey, Xi as defineTable, Xn as StringAggOptions, Xr as WhereCallback, Xt as Schema, Y as sql, Yi as createTableFactory, Yn as GroupValue, Yr as EqValue, Yt as AnySchema, Z as MatchCheck, Zi as RequiredRelationError, Zn as UnfilteredAggregateOptions, Zr as WhereCondition, Zt as SchemaPart, _ as OneRow, _a as defineGenericOperator, _i as BooleanResult, _n as CaseBranch, _r as orderBy, _t as UntypedExpression, a as Database, aa as AnyColumn, ai as not, an as SelectionState, ar as some, at as TextConversionSignature, b as QueryError, bi as OperandValue, bn as FollowingOperand, br as RelationRefs, bt as Db, c as DerivableType, ca as KeyKind, ci as FilteredRows, cn as AnyMutationQuery, cr as OrderColumns, ct as TextTypeOperators, d as DriverErrorFields, da as MergeOperators, di as CompileOptions, dn as ConflictTarget, dr as OrderTerm, dt as orderingOperators, ea as Type, ei as CombinedCondition, en as Tables, er as count, et as matches, f as DriverResult, fa as NoOperators, fi as EqualityOperator, fn as InitialInsertState, fr as OrderTerms, ft as AnyExpression, g as NotFoundError, ga as OperatorSignature, gi as equalityOperators, gn as MutationQueryState, gr as desc, gt as TypedExpression, h as IsolationLevel, ha as GenericOperatorImplementation, hi as InSignature, hn as MutationQuery, hr as asc, ht as ExpressionOperators, i as ConnectionError, ia as defineType, ii as and, in as RecordQueryState, ir as min, it as PatternSignature, j as SqlQueryState, ji as QueryStateOf, jn as ExpressionValue, jr as UpdateValues, jt as MergeRelations, k as SqlQuery, ki as InitialQueryState, kn as ColumnFieldTypes, kr as InsertValues, kt as TransformedQueryState, l as DerivableTypeWithParameters, la as ToColumn, li as QueryResult, ln as ConflictActionRequired, lr as OrderDirection, lt as textOperators, m as InitialSqlQueryState, ma as GenericOperator, mi as HasEquality, mn as InsertMutationState, mr as SelectedRefs, mt as Expression, n as BaseDerivableType, na as TypeOperators, ni as ConditionOperand, nn as AnyRecordQuery, nr as every, nt as FALSE, o as DatabaseOptions, oa as Column, oi as or, on as AnyQuery, or as stringAgg, ot as TextLengthSignature, p as FieldTypes, pa as OperatorDefinitions, pi as EqualityOperators, pn as InitialMutationState, pr as Ordering, pt as BaseOperators, q as identifier, qi as TableOptions, qn as CountExpression, qr as PrimaryKeyColumn, qt as many, r as Connection, ra as TypeOutput, ri as Predicate, rn as RecordQuery, rr as max, rt as TRUE, s as DecodedFields, sa as ColumnAttributes, si as ExistsValueType, sn as SelectQueryKind, sr as sum, st as TextOperators, t as AnySqlQuery, ta as TypeInput, ti as Condition, tn as defineSchema, tr as countDistinct, tt as defineExpression, u as Driver, ua as BoundOperators, ui as CountValueType, un as ConflictKeyRequired, ur as OrderKey, ut as NumberTypeOperators, v as OneValueRows, vi as ComparisonSignature, vn as CaseCondition, vr as ColumnRefs, vt as AnyDb, w as ResultDecodeError, wi as TypedScalarQuery, wn as TypedOperandOperators, wr as SelectQuery, wt as bindSchema, x as QueryErrorCode, xi as compare, xn as NullSkippingResult, xr as AnySelectQuery, xt as DbMutationState, y as PollLockOptions, yi as Operand, yn as CaseValue, yr as QueryContext, yt as BindOptions, z as ValueRows, zi as ColumnOperators, zn as Selection, zr as FoundQueryState, zt as RelationKind } from "./index-DD_wYhRD.mjs";
|
|
2
2
|
export { type AggregateExpression, type AggregateOptions, type AnyColumn, type AnyDb, type AnyExpression, type AnyHelper, type AnyMutationQuery, type AnyQuery, type AnyRecordQuery, type AnySchema, type AnySelectQuery, type AnySqlQuery, type AnyTable, type AnyTableKeys, type AnyTransformedQuery, type AnyType, type BaseDerivableType, type BaseOperators, type BaseType, type BindOptions, type BooleanResult, type BoundOperators, type BoundSelectQuery, type CaseBranch, type CaseCondition, type CaseValue, type Column, type ColumnAttributes, type ColumnDefinitions, type ColumnFieldTypes, type ColumnOperators, type ColumnRefKey, type ColumnRefs, type ColumnShape, type ColumnValue, type ColumnValues, type CombinedCondition, type ComparisonSignature, type CompileOptions, type Condition, type ConditionOperand, type ConflictActionRequired, type ConflictKeyRequired, type ConflictTarget, type ConflictUpdateSet, type Connection, ConnectionError, type CountExpression, type CountValueType, type Database, type DatabaseOptions, type Db, type DbMutationState, type DbOf, type DbQueryState, type DeclaredRelations, type DecodedFields, type DerivableType, type DerivableTypeWithParameters, type Driver, type DriverErrorFields, type DriverResult, type EmptyRecord, type EqValue, type EqualityOperator, type EqualityOperators, type ExistsValueType, type Expression, type ExpressionInput, type ExpressionOperators, type ExpressionValue, FALSE, type FieldTypes, type FilteredRows, type FilteredStateRows, type FollowingOperand, type FoundKey, type FoundQueryState, type FoundState, type GenericOperator, type GenericOperatorImplementation, type GroupAggregateExpression, type GroupOperandValue, type GroupSelectionResult, type GroupTerm, type GroupTerms, type GroupValue, type Grouped, type GroupedField, type GroupedRecord, type GroupedState, type HasEquality, type Helper, type HelperEffect, type InSignature, type InitialInsertState, type InitialMutationState, type InitialQueryState, type InitialSqlQueryState, type InsertMutationState, type InsertValues, type IsolationLevel, type KeyCheck, type KeyColumns, type KeyKind, type Literal, type MatchCheck, type MatchResult, type MergeOperators, type MergeRelations, type MergeSelection, type MutationQuery, type MutationQueryState, type NestedQuery, type NoOperators, type NoRelations, type NotAColumn, type NotAKey, NotFoundError, type NotSynchronous, type NullSkippingResult, type NumberTypeOperators, type OneRelationKeys, type OneRow, type OneValueRows, type Operand, type OperandUses, type OperandValue, type OperatorDefinitions, type OperatorSignature, type OrderColumns, type OrderDirection, type OrderKey, type OrderTerm, type OrderTerms, type Ordering, type PatternSignature, type PollLockOptions, type Predicate, type PrimaryKeyColumn, type PrimaryKeyValues, type QueryContext, QueryError, type QueryErrorCode, type QueryErrorCondition, type QueryResult, type QueryState, type QueryStateOf, type QueryValueType, type RecordQuery, type RecordQueryState, type Relation, type RelationDeclaration, type RelationDeclarations, type RelationKey, type RelationKeys, type RelationKind, type RelationRefs, type RequiredMember, RequiredRelationError, type ResultByRows, ResultDecodeError, type ResultMode, type ResultOf, type ResultRows, type RowLockOptions, type ScalarQuery, type Schema, type SchemaContext, type SchemaPart, type SchemaPartRelations, type SchemaRelations, type SchemaTables, type SelectQuery, type SelectQueryKind, type SelectQueryState, type Selectable, type SelectedFieldTypes, type SelectedOperandType, type SelectedRefs, type Selection, type SelectionFieldTypes, type SelectionResult, type SelectionState, type SelectionUses, type SessionOptions, type SingletonInsertMany, type SingletonQueryState, type SqlFragment, type SqlQuery, type SqlQueryResult, type SqlQueryState, type SqlStatement, type SqlTemplate, type SqlValue, type StringAggOptions, type SynchronousResult, TRUE, type Table, type TableContext, type TableFactoryOptions, type TableKeys, type TableOptions, type TableQueryState, type TableRelations, type Tables, type TextConversionSignature, type TextLengthSignature, type TextOperators, type TextTypeOperators, type TextValue, type ToColumn, type ToColumns, TransactionConnectionError, type TransactionOptions, type TransformedQuery, type TransformedQueryState, type Type, type TypeInput, type TypeOperators, type TypeOptions, type TypeOutput, type TypeTransform, type TypedExpression, type TypedOperand, type TypedOperandInput, type TypedOperandOperators, type TypedScalarQuery, type UnfilteredAggregateOptions, type UnfilteredStringAggOptions, type UntypedExpression, type UpdateSet, type UpdateValues, type UpsertValues, type UsableRelation, type UsedRelation, type ValueRows, type ValuesQuery, type WhereCallback, type WhereCondition, type WhereFilter, type WhereValues, and, asc, avg, bindSchema, caseWhen, coalesce, compare, count, countDistinct, createDatabase, createStatement, createTableFactory, defineExpression, defineGenericOperator, defineHelper, defineSchema, defineTable, defineType, desc, equalityOperators, every, from, greatest, identifier, isOutcomeUnknown, isQueryError, least, literal, many, matches, max, min, not, one, or, orderBy, orderingOperators, param, some, sql, stringAgg, sum, textOperators, toDriverError, toSnakeCase };
|