pqb 0.18.18 → 0.18.19

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.js CHANGED
@@ -3551,22 +3551,22 @@ const getColumnTypes = (types, fn, nowSQL, language, data = newTableData()) => {
3551
3551
  resetTableData(data);
3552
3552
  return fn(types);
3553
3553
  };
3554
- function sql(...args) {
3555
- const arg = args[0];
3556
- if (Array.isArray(arg)) {
3557
- return new RawSQL(args);
3558
- }
3559
- if (typeof args[0] === "string") {
3560
- return new RawSQL(args[0]);
3561
- }
3562
- if (args[1] !== void 0) {
3563
- return new RawSQL(args[1], arg);
3564
- }
3565
- return (...args2) => new RawSQL(args2, arg);
3566
- }
3567
3554
  const columnTypes = __spreadValues$9({
3568
3555
  name: orchidCore.name,
3569
- sql,
3556
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3557
+ sql(...args) {
3558
+ const arg = args[0];
3559
+ if (Array.isArray(arg)) {
3560
+ return new RawSQL(args);
3561
+ }
3562
+ if (typeof args[0] === "string") {
3563
+ return new RawSQL(args[0]);
3564
+ }
3565
+ if (args[1] !== void 0) {
3566
+ return new RawSQL(args[1], arg);
3567
+ }
3568
+ return (...args2) => new RawSQL(args2, arg);
3569
+ },
3570
3570
  smallint() {
3571
3571
  return new SmallIntColumn();
3572
3572
  },
@@ -3612,7 +3612,6 @@ const columnTypes = __spreadValues$9({
3612
3612
  text(min, max) {
3613
3613
  return new TextColumn(min, max);
3614
3614
  },
3615
- // `varchar` column with optional limit defaulting to 255.
3616
3615
  string(limit = 255) {
3617
3616
  return new VarCharColumn(limit);
3618
3617
  },
@@ -3733,12 +3732,7 @@ const columnTypes = __spreadValues$9({
3733
3732
  searchIndex(columns, options) {
3734
3733
  return this.index(columns, __spreadProps$5(__spreadValues$9({}, options), { tsVector: true }));
3735
3734
  },
3736
- constraint({
3737
- name: name2,
3738
- references,
3739
- check,
3740
- dropMode
3741
- }) {
3735
+ constraint({ name: name2, references, check, dropMode }) {
3742
3736
  var _a;
3743
3737
  ((_a = tableData.constraints) != null ? _a : tableData.constraints = []).push({
3744
3738
  name: name2,
@@ -10193,7 +10187,9 @@ const createDb = (_a) => {
10193
10187
  noPrimaryKey: (_b2 = options.noPrimaryKey) != null ? _b2 : "error",
10194
10188
  snakeCase
10195
10189
  };
10196
- const ct = typeof ctOrFn === "function" ? ctOrFn(columnTypes) : ctOrFn;
10190
+ const ct = typeof ctOrFn === "function" ? ctOrFn(
10191
+ columnTypes
10192
+ ) : ctOrFn;
10197
10193
  if (snakeCase) {
10198
10194
  ct[orchidCore.snakeCaseKey] = true;
10199
10195
  }