pqb 0.36.15 → 0.37.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.mjs CHANGED
@@ -1268,11 +1268,17 @@ class TextBaseColumn extends ColumnType {
1268
1268
  }
1269
1269
  class LimitedTextBaseColumn extends TextBaseColumn {
1270
1270
  constructor(schema, limit) {
1271
- super(schema, schema.stringMax(limit));
1271
+ super(
1272
+ schema,
1273
+ limit !== void 0 ? schema.stringMax(limit) : schema.stringSchema()
1274
+ );
1272
1275
  this.data.maxChars = limit;
1273
1276
  }
1274
1277
  toSQL() {
1275
- return joinTruthy(this.dataType, `(${this.data.maxChars})`);
1278
+ return joinTruthy(
1279
+ this.dataType,
1280
+ this.data.maxChars !== void 0 && `(${this.data.maxChars})`
1281
+ );
1276
1282
  }
1277
1283
  }
1278
1284
  class VarCharColumn extends LimitedTextBaseColumn {
@@ -2198,37 +2204,16 @@ const processWhere = (ands, ctx, table, query, data, quotedAs) => {
2198
2204
  );
2199
2205
  } else {
2200
2206
  const item = value;
2201
- const leftColumn = columnToSql(
2202
- ctx,
2203
- query,
2204
- query.shape,
2205
- item.on[0],
2206
- `"${getJoinItemSource(item.joinFrom)}"`
2207
+ const joinAs = `"${getJoinItemSource(item.joinFrom)}"`;
2208
+ const { on } = item;
2209
+ const q = item.useOuterJoinOverrides ? {
2210
+ joinedShapes: query.joinedShapes,
2211
+ joinOverrides: query.outerJoinOverrides,
2212
+ shape: query.shape
2213
+ } : query;
2214
+ ands.push(
2215
+ `${onColumnToSql(ctx, q, joinAs, on[0])} ${on.length === 2 ? "=" : on[1]} ${onColumnToSql(ctx, q, joinAs, on.length === 3 ? on[2] : on[1])}`
2207
2216
  );
2208
- const joinTo = getJoinItemSource(item.joinTo);
2209
- const joinedShape = query.joinedShapes[joinTo];
2210
- let op;
2211
- let rightColumn;
2212
- if (item.on.length === 2) {
2213
- op = "=";
2214
- rightColumn = columnToSql(
2215
- ctx,
2216
- query,
2217
- joinedShape,
2218
- item.on[1],
2219
- `"${joinTo}"`
2220
- );
2221
- } else {
2222
- op = item.on[1];
2223
- rightColumn = columnToSql(
2224
- ctx,
2225
- query,
2226
- joinedShape,
2227
- item.on[2],
2228
- `"${joinTo}"`
2229
- );
2230
- }
2231
- ands.push(`${leftColumn} ${op} ${rightColumn}`);
2232
2217
  }
2233
2218
  } else if (key === "IN") {
2234
2219
  toArray(value).forEach((item) => {
@@ -2324,6 +2309,7 @@ const processWhere = (ands, ctx, table, query, data, quotedAs) => {
2324
2309
  }
2325
2310
  }
2326
2311
  };
2312
+ const onColumnToSql = (ctx, query, joinAs, column) => columnToSql(ctx, query, query.shape, column, joinAs);
2327
2313
  const getJoinItemSource = (joinItem) => {
2328
2314
  return typeof joinItem === "string" ? joinItem : getQueryAs(joinItem);
2329
2315
  };
@@ -2591,7 +2577,7 @@ var __spreadValues$g = (a, b) => {
2591
2577
  return a;
2592
2578
  };
2593
2579
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2594
- const processJoinArgs = (joinTo, first, args, joinSubQuery) => {
2580
+ const processJoinArgs = (joinTo, first, args, joinSubQuery, whereExists) => {
2595
2581
  var _a;
2596
2582
  if (typeof first === "string") {
2597
2583
  if (first in joinTo.relations) {
@@ -2601,7 +2587,11 @@ const processJoinArgs = (joinTo, first, args, joinSubQuery) => {
2601
2587
  const r = args[0](
2602
2588
  makeJoinQueryBuilder(j, j.q.joinedShapes, joinTo)
2603
2589
  );
2604
- return { j: j.merge(r), s: joinSubQuery || getIsJoinSubQuery(r), r };
2590
+ return {
2591
+ j: j.merge(r),
2592
+ s: whereExists ? false : joinSubQuery || getIsJoinSubQuery(r),
2593
+ r
2594
+ };
2605
2595
  }
2606
2596
  return { j, s: joinSubQuery };
2607
2597
  } else if (typeof args[0] !== "function") {
@@ -2633,7 +2623,11 @@ const processJoinArgs = (joinTo, first, args, joinSubQuery) => {
2633
2623
  joinTo
2634
2624
  )
2635
2625
  );
2636
- return { w: first, r, s: joinSubQuery || getIsJoinSubQuery(r) };
2626
+ return {
2627
+ w: first,
2628
+ r,
2629
+ s: whereExists ? false : joinSubQuery || getIsJoinSubQuery(r)
2630
+ };
2637
2631
  }
2638
2632
  }
2639
2633
  const args0 = args.length ? args[0] : returnArg$1;
@@ -5258,7 +5252,7 @@ const makeInsertSql = (ctx, q, query, quotedAs) => {
5258
5252
  const column = q.shape[key];
5259
5253
  quotedColumns[0] = `"${(column == null ? void 0 : column.data.name) || key}"`;
5260
5254
  if (Array.isArray(values) && Array.isArray(values[0])) {
5261
- values = [[void 0]];
5255
+ values = values.map(() => [void 0]);
5262
5256
  }
5263
5257
  }
5264
5258
  ctx.sql.push(
@@ -5954,12 +5948,14 @@ const makeRegexToFindInSql = (value) => {
5954
5948
  return new RegExp(`${value}(?=(?:[^']*'[^']*')*[^']*$)`, "g");
5955
5949
  };
5956
5950
  const resolveSubQueryCallback = (q, cb) => {
5957
- const { subQuery, relChain } = q.q;
5951
+ const { subQuery, relChain, outerJoinOverrides } = q.q;
5958
5952
  q.q.subQuery = 1;
5959
5953
  q.q.relChain = void 0;
5954
+ q.q.outerJoinOverrides = q.q.joinOverrides;
5960
5955
  const result = cb(q);
5961
5956
  q.q.subQuery = subQuery;
5962
5957
  q.q.relChain = relChain;
5958
+ q.q.outerJoinOverrides = outerJoinOverrides;
5963
5959
  return result;
5964
5960
  };
5965
5961
  const joinSubQuery = (q, sub) => {
@@ -7148,7 +7144,7 @@ const processCreateItem = (q, item, rowIndex, ctx, encoders) => {
7148
7144
  item[key]
7149
7145
  );
7150
7146
  }
7151
- if (!ctx.columns.has(key) && (shape[key] && !shape[key].data.computed || shape === anyShape)) {
7147
+ if (!ctx.columns.has(key) && (shape[key] && !shape[key].data.computed || shape === anyShape) && item[key] !== void 0) {
7152
7148
  ctx.columns.set(key, ctx.columns.size);
7153
7149
  encoders[key] = (_c = shape[key]) == null ? void 0 : _c.encodeFn;
7154
7150
  }
@@ -7159,11 +7155,6 @@ const createCtx = () => ({
7159
7155
  columns: /* @__PURE__ */ new Map(),
7160
7156
  resultAll: void 0
7161
7157
  });
7162
- const mapColumnValues = (columns, encoders, data) => {
7163
- return columns.map(
7164
- (key) => encoders[key] && !isExpression(data[key]) ? encoders[key](data[key]) : data[key]
7165
- );
7166
- };
7167
7158
  const handleOneData = (q, data, ctx) => {
7168
7159
  const encoders = {};
7169
7160
  const defaults = q.q.defaults;
@@ -7172,7 +7163,14 @@ const handleOneData = (q, data, ctx) => {
7172
7163
  }
7173
7164
  processCreateItem(q, data, 0, ctx, encoders);
7174
7165
  const columns = Array.from(ctx.columns.keys());
7175
- const values = [mapColumnValues(columns, encoders, data)];
7166
+ const values = [
7167
+ columns.map(
7168
+ (key) => (
7169
+ // undefined values were stripped and no need to check for them
7170
+ encoders[key] && !isExpression(data[key]) ? encoders[key](data[key]) : data[key]
7171
+ )
7172
+ )
7173
+ ];
7176
7174
  return { columns, values };
7177
7175
  };
7178
7176
  const handleManyData = (q, data, ctx) => {
@@ -7187,7 +7185,9 @@ const handleManyData = (q, data, ctx) => {
7187
7185
  const values = Array(data.length);
7188
7186
  const columns = Array.from(ctx.columns.keys());
7189
7187
  data.forEach((item, i) => {
7190
- values[i] = mapColumnValues(columns, encoders, item);
7188
+ values[i] = columns.map(
7189
+ (key) => encoders[key] && item[key] !== void 0 && !isExpression(item[key]) ? encoders[key](item[key]) : item[key]
7190
+ );
7191
7191
  });
7192
7192
  return { columns, values };
7193
7193
  };
@@ -8385,7 +8385,7 @@ class Join {
8385
8385
  *
8386
8386
  * All the `join` methods accept the same arguments, but returning type is different because with `join` it's guaranteed to load joined table, and with `leftJoin` the joined table columns may be `NULL` when no matching record was found.
8387
8387
  *
8388
- * For the following examples, imagine we have a `User` table with `id` and `name`, and `Message` table with `id`, `text`, messages belongs to user via `userId` column:
8388
+ * For the following examples, imagine you have a `User` table with `id` and `name`, and `Message` table with `id`, `text`, messages belongs to user via `userId` column:
8389
8389
  *
8390
8390
  * ```ts
8391
8391
  * export class UserTable extends BaseTable {
@@ -8463,7 +8463,7 @@ class Join {
8463
8463
  * ```ts
8464
8464
  * const result = await db.user
8465
8465
  * .join('messages')
8466
- * // after joining a table, we can use it in `where` conditions:
8466
+ * // after joining a table, you can use it in `where` conditions:
8467
8467
  * .where({ 'messages.text': { startsWith: 'Hi' } })
8468
8468
  * .select(
8469
8469
  * 'name', // name is User column, table name may be omitted
@@ -8474,8 +8474,8 @@ class Join {
8474
8474
  * const ok: { name: string; text: string }[] = result;
8475
8475
  * ```
8476
8476
  *
8477
- * The first argument can also be a callback, where instead of relation name as a string we're picking it as a property of `q`.
8478
- * In such a way, we can alias the relation with `as`, add `where` conditions, use other query methods.
8477
+ * The first argument can also be a callback, where instead of relation name as a string you're picking it as a property of `q`.
8478
+ * In such a way, you can alias the relation with `as`, add `where` conditions, use other query methods.
8479
8479
  *
8480
8480
  * ```ts
8481
8481
  * const result = await db.user.join((q) =>
@@ -8492,7 +8492,7 @@ class Join {
8492
8492
  * (q) => q.messages.as('m'),
8493
8493
  * (q) =>
8494
8494
  * q
8495
- * .on('text', 'name') // additionally, match message with user name
8495
+ * .on('messages.text', 'user.name') // additionally, match message with user name
8496
8496
  * .where({ text: 'some text' }), // you can add `where` in a second callback as well.
8497
8497
  * );
8498
8498
  * ```
@@ -8546,17 +8546,16 @@ class Join {
8546
8546
  * Joined table can be references from `where` and `select` by a table name.
8547
8547
  *
8548
8548
  * ```ts
8549
- * // Join message where userId = id:
8550
8549
  * db.user
8551
- * .join(db.message, 'userId', 'id')
8550
+ * .join(db.message, 'userId', 'user.id')
8552
8551
  * .where({ 'message.text': { startsWith: 'Hi' } })
8553
8552
  * .select('name', 'message.text');
8554
8553
  * ```
8555
8554
  *
8556
- * Columns in the join list may be prefixed with table names for clarity:
8555
+ * The name of the joining table can be omitted, but not the name of the main table:
8557
8556
  *
8558
8557
  * ```ts
8559
- * db.user.join(db.message, 'message.userId', 'user.id');
8558
+ * db.user.join(db.message, 'userId', 'user.id');
8560
8559
  * ```
8561
8560
  *
8562
8561
  * Joined table can have an alias for referencing it further:
@@ -8587,7 +8586,7 @@ class Join {
8587
8586
  * You can provide a custom comparison operator
8588
8587
  *
8589
8588
  * ```ts
8590
- * db.user.join(db.message, 'userId', '!=', 'id');
8589
+ * db.user.join(db.message, 'userId', '!=', 'user.id');
8591
8590
  * ```
8592
8591
  *
8593
8592
  * Join can accept raw SQL for the `ON` part of join:
@@ -8622,11 +8621,11 @@ class Join {
8622
8621
  *
8623
8622
  * ```ts
8624
8623
  * db.user.join(db.message, {
8625
- * userId: 'id',
8626
- *
8627
- * // with table names:
8628
8624
  * 'message.userId': 'user.id',
8629
8625
  *
8626
+ * // joined table name may be omitted
8627
+ * userId: 'user.id',
8628
+ *
8630
8629
  * // value can be a raw SQL expression:
8631
8630
  * text: sql`lower("user"."name")`,
8632
8631
  * });
@@ -8645,17 +8644,16 @@ class Join {
8645
8644
  * db.message,
8646
8645
  * (q) =>
8647
8646
  * q
8648
- * // left column is the db.message column, right column is the db.user column
8649
- * .on('userId', 'id')
8650
- * // table names can be provided:
8651
8647
  * .on('message.userId', 'user.id')
8648
+ * // joined table name may be omitted
8649
+ * .on('userId', 'user.id')
8652
8650
  * // operator can be specified:
8653
- * .on('userId', '!=', 'id')
8651
+ * .on('userId', '!=', 'user.id')
8654
8652
  * // operator can be specified with table names as well:
8655
8653
  * .on('message.userId', '!=', 'user.id')
8656
8654
  * // `.orOn` takes the same arguments as `.on` and acts like `.or`:
8657
- * .on('userId', 'id') // where message.userId = user.id
8658
- * .orOn('text', 'name'), // or message.text = user.name
8655
+ * .on('userId', 'user.id') // where message.userId = user.id
8656
+ * .orOn('text', 'user.name'), // or message.text = user.name
8659
8657
  * );
8660
8658
  * ```
8661
8659
  *
@@ -8664,7 +8662,7 @@ class Join {
8664
8662
  * ```ts
8665
8663
  * db.user.join(db.message, (q) =>
8666
8664
  * q
8667
- * .on('userId', 'id')
8665
+ * .on('userId', 'user.id')
8668
8666
  * .where({
8669
8667
  * // not prefixed column name is for joined table:
8670
8668
  * text: { startsWith: 'hello' },
@@ -8699,7 +8697,7 @@ class Join {
8699
8697
  * .where({ text: { startsWith: 'Hi' } })
8700
8698
  * .as('t'),
8701
8699
  * 'userId',
8702
- * 'id',
8700
+ * 'user.id',
8703
8701
  * );
8704
8702
  * ```
8705
8703
  *
@@ -8766,7 +8764,7 @@ class Join {
8766
8764
  *
8767
8765
  * // the same query, but joining table explicitly
8768
8766
  * const result2: typeof result = await db.user
8769
- * .leftJoin(db.message, 'userId', 'id')
8767
+ * .leftJoin(db.message, 'userId', 'user.id')
8770
8768
  * .select('name', 'message.text');
8771
8769
  *
8772
8770
  * // result has the following type:
@@ -8868,7 +8866,7 @@ class Join {
8868
8866
  * // select message columns
8869
8867
  * .select('text')
8870
8868
  * // join the message to the user, column names can be prefixed with table names
8871
- * .on('authorId', 'id')
8869
+ * .on('authorId', 'user.id')
8872
8870
  * // message columns are available without prefixing,
8873
8871
  * // outer table columns are available with a table name
8874
8872
  * .where({ text: 'some text', 'user.name': 'name' })
@@ -8950,14 +8948,22 @@ class Join {
8950
8948
  );
8951
8949
  }
8952
8950
  }
8953
- const makeOnItem = (joinTo, joinFrom, args) => {
8954
- return {
8951
+ const makeOnItem = (joinTo, joinFrom, args) => ({
8952
+ ON: {
8953
+ joinTo,
8954
+ joinFrom,
8955
+ on: args
8956
+ }
8957
+ });
8958
+ const pushQueryOnForOuter = (q, joinFrom, joinTo, ...on) => {
8959
+ return pushQueryValue(q, "and", {
8955
8960
  ON: {
8956
- joinTo,
8957
- joinFrom,
8958
- on: args
8961
+ joinTo: joinFrom,
8962
+ joinFrom: joinTo,
8963
+ useOuterJoinOverrides: true,
8964
+ on
8959
8965
  }
8960
- };
8966
+ });
8961
8967
  };
8962
8968
  const pushQueryOn = (q, joinFrom, joinTo, ...on) => {
8963
8969
  return pushQueryValue(
@@ -9008,16 +9014,13 @@ class OnMethods {
9008
9014
  *
9009
9015
  * ```ts
9010
9016
  * q
9011
- * // left column is the db.message column, right column is the db.user column
9012
- * .on('userId', 'id')
9013
- * // table names can be provided:
9014
9017
  * .on('message.userId', 'user.id')
9018
+ * // joined table name may be omitted
9019
+ * .on('userId', 'user.id')
9015
9020
  * // operator can be specified:
9016
- * .on('userId', '!=', 'id')
9021
+ * .on('userId', '!=', 'user.id')
9017
9022
  * // operator can be specified with table names as well:
9018
9023
  * .on('message.userId', '!=', 'user.id')
9019
- * // `.orOn` takes the same arguments as `.on` and acts like `.or`:
9020
- * .on('userId', 'id') // where message.userId = user.id
9021
9024
  * ```
9022
9025
  *
9023
9026
  * @param args - columns to join with
@@ -9362,6 +9365,7 @@ const resolveCallbacksInArgs = (q, args) => {
9362
9365
  qb.q = getClonedQueryData(q.q);
9363
9366
  qb.q.and = qb.q.or = qb.q.scopes = void 0;
9364
9367
  qb.q.subQuery = 1;
9368
+ qb.q.outerJoinOverrides = qb.q.joinOverrides;
9365
9369
  args[i] = resolveSubQueryCallback(qb, arg);
9366
9370
  }
9367
9371
  }
@@ -9452,20 +9456,7 @@ const _queryWhereIn = (q, and, arg, values, not) => {
9452
9456
  return q;
9453
9457
  };
9454
9458
  const existsArgs = (self, q, args) => {
9455
- let joinSubQuery;
9456
- if (typeof q === "object") {
9457
- joinSubQuery = getIsJoinSubQuery(q);
9458
- if (joinSubQuery) {
9459
- q = q.clone();
9460
- q.shape = getShapeFromSelect(
9461
- q,
9462
- true
9463
- );
9464
- }
9465
- } else {
9466
- joinSubQuery = false;
9467
- }
9468
- const joinArgs = processJoinArgs(self, q, args, joinSubQuery);
9459
+ const joinArgs = processJoinArgs(self, q, args, false, true);
9469
9460
  return [
9470
9461
  {
9471
9462
  EXISTS: joinArgs
@@ -12764,5 +12755,5 @@ function copyTableData(query, arg) {
12764
12755
  return q;
12765
12756
  }
12766
12757
 
12767
- export { Adapter, AggregateMethods, ArrayColumn, AsMethods, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ColumnRefExpression, ColumnType, ComputedColumn, Create, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DecimalColumn, Delete, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, FnExpression, For, FromMethods, Having, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, JSONColumn, JSONTextColumn, Join, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, OnConflictQueryBuilder, OnMethods, Operators, OrExpression, OrchidOrmError, OrchidOrmInternalError, PathColumn, PointColumn, PolygonColumn, QueryBase, QueryError, QueryGet, QueryHooks, QueryLog, QueryMethods, QueryUpsertOrCreate, RawSQL, RealColumn, RefExpression, SearchMethods, Select, SerialColumn, SmallIntColumn, SmallSerialColumn, SqlMethod, StringColumn, TextBaseColumn, TextColumn, Then, TimeColumn, TimestampColumn, TimestampTZColumn, Transaction, TransactionAdapter, TransformMethods, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, Union, UnknownColumn, Update, VarCharColumn, VirtualColumn, Where, WithMethods, XMLColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quote, quoteString, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfNoWhere, toSQL, toSQLCacheKey };
12758
+ export { Adapter, AggregateMethods, ArrayColumn, AsMethods, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ColumnRefExpression, ColumnType, ComputedColumn, Create, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DecimalColumn, Delete, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, FnExpression, For, FromMethods, Having, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, JSONColumn, JSONTextColumn, Join, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, OnConflictQueryBuilder, OnMethods, Operators, OrExpression, OrchidOrmError, OrchidOrmInternalError, PathColumn, PointColumn, PolygonColumn, QueryBase, QueryError, QueryGet, QueryHooks, QueryLog, QueryMethods, QueryUpsertOrCreate, RawSQL, RealColumn, RefExpression, SearchMethods, Select, SerialColumn, SmallIntColumn, SmallSerialColumn, SqlMethod, StringColumn, TextBaseColumn, TextColumn, Then, TimeColumn, TimestampColumn, TimestampTZColumn, Transaction, TransactionAdapter, TransformMethods, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, Union, UnknownColumn, Update, VarCharColumn, VirtualColumn, Where, WithMethods, XMLColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quote, quoteString, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfNoWhere, toSQL, toSQLCacheKey };
12768
12759
  //# sourceMappingURL=index.mjs.map