orchid-orm 1.13.1 → 1.13.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.mjs CHANGED
@@ -8,7 +8,8 @@ const createBaseTable = ({
8
8
  snakeCase,
9
9
  filePath,
10
10
  nowSQL,
11
- exportAs
11
+ exportAs,
12
+ language
12
13
  } = { columnTypes: columnTypes }) => {
13
14
  const ct = typeof columnTypes$1 === "function" ? columnTypes$1(columnTypes) : columnTypes$1 || columnTypes;
14
15
  return create(
@@ -17,10 +18,11 @@ const createBaseTable = ({
17
18
  filePath || getStackTrace(),
18
19
  snakeCase,
19
20
  nowSQL,
20
- exportAs
21
+ exportAs,
22
+ language
21
23
  );
22
24
  };
23
- const create = (columnTypes, filePathOrStack, snakeCase, nowSQL, exportAs = "BaseTable") => {
25
+ const create = (columnTypes, filePathOrStack, snakeCase, nowSQL, exportAs = "BaseTable", language) => {
24
26
  var _a;
25
27
  let filePath;
26
28
  const base = (_a = class {
@@ -28,6 +30,7 @@ const create = (columnTypes, filePathOrStack, snakeCase, nowSQL, exportAs = "Bas
28
30
  this.snakeCase = snakeCase;
29
31
  this.columnTypes = columnTypes;
30
32
  this.q = {};
33
+ this.language = language;
31
34
  }
32
35
  static getFilePath() {
33
36
  if (filePath)
@@ -58,7 +61,7 @@ const create = (columnTypes, filePathOrStack, snakeCase, nowSQL, exportAs = "Bas
58
61
  }
59
62
  setColumns(fn) {
60
63
  columnTypes[snakeCaseKey] = this.snakeCase;
61
- const shape = getColumnTypes(columnTypes, fn, nowSQL);
64
+ const shape = getColumnTypes(columnTypes, fn, nowSQL, this.language);
62
65
  if (this.snakeCase) {
63
66
  for (const key in shape) {
64
67
  const column = shape[key];
@@ -1427,7 +1430,8 @@ const orchidORM = (_a, tables) => {
1427
1430
  const table = new tables[key]();
1428
1431
  tableInstances[key] = table;
1429
1432
  const options2 = __spreadProps(__spreadValues$1({}, commonOptions), {
1430
- schema: table.schema
1433
+ schema: table.schema,
1434
+ language: table.language
1431
1435
  });
1432
1436
  if (table.noPrimaryKey)
1433
1437
  options2.noPrimaryKey = "ignore";