drizzle-kit 1.0.0-beta.1-7946562 → 1.0.0-beta.1-251c8ba
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/api.js +132 -4
 - package/api.mjs +132 -4
 - package/bin.cjs +16 -99
 - package/package.json +1 -1
 
    
        package/api.js
    CHANGED
    
    | 
         @@ -22282,6 +22282,14 @@ var init_common2 = __esm({ 
     | 
|
| 
       22282 
22282 
     | 
    
         
             
                    }
         
     | 
| 
       22283 
22283 
     | 
    
         
             
                    return value.map((v) => this.baseColumn.mapFromDriverValue(v));
         
     | 
| 
       22284 
22284 
     | 
    
         
             
                  }
         
     | 
| 
      
 22285 
     | 
    
         
            +
                  // Needed for arrays of custom types
         
     | 
| 
      
 22286 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 22287 
     | 
    
         
            +
                    if (typeof value === "string") {
         
     | 
| 
      
 22288 
     | 
    
         
            +
                      value = parsePgArray(value);
         
     | 
| 
      
 22289 
     | 
    
         
            +
                    }
         
     | 
| 
      
 22290 
     | 
    
         
            +
                    const base = this.baseColumn;
         
     | 
| 
      
 22291 
     | 
    
         
            +
                    return "mapFromJsonValue" in base ? value.map((v) => base.mapFromJsonValue(v)) : value.map((v) => base.mapFromDriverValue(v));
         
     | 
| 
      
 22292 
     | 
    
         
            +
                  }
         
     | 
| 
       22285 
22293 
     | 
    
         
             
                  mapToDriverValue(value, isNestedArray = false) {
         
     | 
| 
       22286 
22294 
     | 
    
         
             
                    const a = value.map(
         
     | 
| 
       22287 
22295 
     | 
    
         
             
                      (v) => v === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
         
     | 
| 
         @@ -23403,7 +23411,7 @@ function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (valu 
     | 
|
| 
       23403 
23411 
     | 
    
         
             
                } else {
         
     | 
| 
       23404 
23412 
     | 
    
         
             
                  decoder = field.getSQL().decoder;
         
     | 
| 
       23405 
23413 
     | 
    
         
             
                }
         
     | 
| 
       23406 
     | 
    
         
            -
                row[selectionItem.key] = decoder.mapFromDriverValue(value);
         
     | 
| 
      
 23414 
     | 
    
         
            +
                row[selectionItem.key] = "mapFromJsonValue" in decoder ? decoder.mapFromJsonValue(value) : decoder.mapFromDriverValue(value);
         
     | 
| 
       23407 
23415 
     | 
    
         
             
              }
         
     | 
| 
       23408 
23416 
     | 
    
         
             
              return row;
         
     | 
| 
       23409 
23417 
     | 
    
         
             
            }
         
     | 
| 
         @@ -24858,9 +24866,13 @@ var init_custom = __esm({ 
     | 
|
| 
       24858 
24866 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       24859 
24867 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       24860 
24868 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 24869 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 24870 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       24861 
24871 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       24862 
24872 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       24863 
24873 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 24874 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 24875 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       24864 
24876 
     | 
    
         
             
                  }
         
     | 
| 
       24865 
24877 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       24866 
24878 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -24868,6 +24880,29 @@ var init_custom = __esm({ 
     | 
|
| 
       24868 
24880 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       24869 
24881 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       24870 
24882 
     | 
    
         
             
                  }
         
     | 
| 
      
 24883 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 24884 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 24885 
     | 
    
         
            +
                  }
         
     | 
| 
      
 24886 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2, arrayDimensions) {
         
     | 
| 
      
 24887 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 24888 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2, arrayDimensions);
         
     | 
| 
      
 24889 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 24890 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 24891 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 24892 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 24893 
     | 
    
         
            +
                      case "bytea":
         
     | 
| 
      
 24894 
     | 
    
         
            +
                      case "geometry":
         
     | 
| 
      
 24895 
     | 
    
         
            +
                      case "timestamp":
         
     | 
| 
      
 24896 
     | 
    
         
            +
                      case "numeric":
         
     | 
| 
      
 24897 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 24898 
     | 
    
         
            +
                        const arrVal = "[]".repeat(arrayDimensions ?? 0);
         
     | 
| 
      
 24899 
     | 
    
         
            +
                        return sql2`${identifier}::text${sql2.raw(arrVal).if(arrayDimensions)}`;
         
     | 
| 
      
 24900 
     | 
    
         
            +
                      }
         
     | 
| 
      
 24901 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 24902 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 24903 
     | 
    
         
            +
                      }
         
     | 
| 
      
 24904 
     | 
    
         
            +
                    }
         
     | 
| 
      
 24905 
     | 
    
         
            +
                  }
         
     | 
| 
       24871 
24906 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       24872 
24907 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       24873 
24908 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -27550,11 +27585,11 @@ var init_dialect = __esm({ 
     | 
|
| 
       27550 
27585 
     | 
    
         
             
                      const name2 = sql`${table6}.${sql.identifier(this.casing.getColumnCasing(column6))}`;
         
     | 
| 
       27551 
27586 
     | 
    
         
             
                      let targetType = column6.columnType;
         
     | 
| 
       27552 
27587 
     | 
    
         
             
                      let col = column6;
         
     | 
| 
       27553 
     | 
    
         
            -
                      let  
     | 
| 
      
 27588 
     | 
    
         
            +
                      let dimensionCnt = 0;
         
     | 
| 
       27554 
27589 
     | 
    
         
             
                      while (is(col, PgArray)) {
         
     | 
| 
       27555 
     | 
    
         
            -
                        col =  
     | 
| 
      
 27590 
     | 
    
         
            +
                        col = col.baseColumn;
         
     | 
| 
       27556 
27591 
     | 
    
         
             
                        targetType = col.columnType;
         
     | 
| 
       27557 
     | 
    
         
            -
                         
     | 
| 
      
 27592 
     | 
    
         
            +
                        ++dimensionCnt;
         
     | 
| 
       27558 
27593 
     | 
    
         
             
                      }
         
     | 
| 
       27559 
27594 
     | 
    
         
             
                      switch (targetType) {
         
     | 
| 
       27560 
27595 
     | 
    
         
             
                        case "PgNumeric":
         
     | 
| 
         @@ -27566,8 +27601,12 @@ var init_dialect = __esm({ 
     | 
|
| 
       27566 
27601 
     | 
    
         
             
                        case "PgGeometry":
         
     | 
| 
       27567 
27602 
     | 
    
         
             
                        case "PgGeometryObject":
         
     | 
| 
       27568 
27603 
     | 
    
         
             
                        case "PgBytea": {
         
     | 
| 
      
 27604 
     | 
    
         
            +
                          const arrVal = "[]".repeat(dimensionCnt);
         
     | 
| 
       27569 
27605 
     | 
    
         
             
                          return sql`${name2}::text${sql.raw(arrVal).if(arrVal)} as ${sql.identifier(key)}`;
         
     | 
| 
       27570 
27606 
     | 
    
         
             
                        }
         
     | 
| 
      
 27607 
     | 
    
         
            +
                        case "PgCustomColumn": {
         
     | 
| 
      
 27608 
     | 
    
         
            +
                          return sql`${col.jsonSelectIdentifier(name2, sql, dimensionCnt > 0 ? dimensionCnt : void 0)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 27609 
     | 
    
         
            +
                        }
         
     | 
| 
       27571 
27610 
     | 
    
         
             
                        default: {
         
     | 
| 
       27572 
27611 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       27573 
27612 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -32531,9 +32570,13 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32531 
32570 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       32532 
32571 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       32533 
32572 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 32573 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 32574 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       32534 
32575 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       32535 
32576 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       32536 
32577 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 32578 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 32579 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       32537 
32580 
     | 
    
         
             
                  }
         
     | 
| 
       32538 
32581 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       32539 
32582 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -32541,6 +32584,29 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32541 
32584 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       32542 
32585 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       32543 
32586 
     | 
    
         
             
                  }
         
     | 
| 
      
 32587 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 32588 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 32589 
     | 
    
         
            +
                  }
         
     | 
| 
      
 32590 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 32591 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 32592 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 32593 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 32594 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 32595 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 32596 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 32597 
     | 
    
         
            +
                      case "numeric":
         
     | 
| 
      
 32598 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 32599 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 32600 
     | 
    
         
            +
                        return sql2`cast(${identifier} as text)`;
         
     | 
| 
      
 32601 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32602 
     | 
    
         
            +
                      case "blob": {
         
     | 
| 
      
 32603 
     | 
    
         
            +
                        return sql2`hex(${identifier})`;
         
     | 
| 
      
 32604 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32605 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 32606 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 32607 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32608 
     | 
    
         
            +
                    }
         
     | 
| 
      
 32609 
     | 
    
         
            +
                  }
         
     | 
| 
       32544 
32610 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       32545 
32611 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       32546 
32612 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -33734,6 +33800,9 @@ var init_dialect2 = __esm({ 
     | 
|
| 
       33734 
33800 
     | 
    
         
             
                        case "SQLiteNumericBigInt": {
         
     | 
| 
       33735 
33801 
     | 
    
         
             
                          return sql`cast(${name2} as text) as ${sql.identifier(key)}`;
         
     | 
| 
       33736 
33802 
     | 
    
         
             
                        }
         
     | 
| 
      
 33803 
     | 
    
         
            +
                        case "SQLiteCustomColumn": {
         
     | 
| 
      
 33804 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 33805 
     | 
    
         
            +
                        }
         
     | 
| 
       33737 
33806 
     | 
    
         
             
                        default: {
         
     | 
| 
       33738 
33807 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       33739 
33808 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -37343,9 +37412,13 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37343 
37412 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       37344 
37413 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       37345 
37414 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 37415 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 37416 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       37346 
37417 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       37347 
37418 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       37348 
37419 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 37420 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 37421 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       37349 
37422 
     | 
    
         
             
                  }
         
     | 
| 
       37350 
37423 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       37351 
37424 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -37353,6 +37426,30 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37353 
37426 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       37354 
37427 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       37355 
37428 
     | 
    
         
             
                  }
         
     | 
| 
      
 37429 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 37430 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 37431 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37432 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 37433 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 37434 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 37435 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 37436 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 37437 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 37438 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 37439 
     | 
    
         
            +
                      case "binary":
         
     | 
| 
      
 37440 
     | 
    
         
            +
                      case "varbinary":
         
     | 
| 
      
 37441 
     | 
    
         
            +
                      case "time":
         
     | 
| 
      
 37442 
     | 
    
         
            +
                      case "datetime":
         
     | 
| 
      
 37443 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 37444 
     | 
    
         
            +
                      case "float":
         
     | 
| 
      
 37445 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 37446 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
      
 37447 
     | 
    
         
            +
                      }
         
     | 
| 
      
 37448 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 37449 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 37450 
     | 
    
         
            +
                      }
         
     | 
| 
      
 37451 
     | 
    
         
            +
                    }
         
     | 
| 
      
 37452 
     | 
    
         
            +
                  }
         
     | 
| 
       37356 
37453 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       37357 
37454 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       37358 
37455 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -39711,6 +39808,9 @@ var init_dialect3 = __esm({ 
     | 
|
| 
       39711 
39808 
     | 
    
         
             
                        case "MySqlBigInt64": {
         
     | 
| 
       39712 
39809 
     | 
    
         
             
                          return sql`cast(${name2} as char) as ${sql.identifier(key)}`;
         
     | 
| 
       39713 
39810 
     | 
    
         
             
                        }
         
     | 
| 
      
 39811 
     | 
    
         
            +
                        case "MySqlCustomColumn": {
         
     | 
| 
      
 39812 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 39813 
     | 
    
         
            +
                        }
         
     | 
| 
       39714 
39814 
     | 
    
         
             
                        default: {
         
     | 
| 
       39715 
39815 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       39716 
39816 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -43313,9 +43413,13 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43313 
43413 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       43314 
43414 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       43315 
43415 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 43416 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 43417 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       43316 
43418 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       43317 
43419 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       43318 
43420 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 43421 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 43422 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       43319 
43423 
     | 
    
         
             
                  }
         
     | 
| 
       43320 
43424 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       43321 
43425 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -43323,6 +43427,30 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43323 
43427 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       43324 
43428 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       43325 
43429 
     | 
    
         
             
                  }
         
     | 
| 
      
 43430 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 43431 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 43432 
     | 
    
         
            +
                  }
         
     | 
| 
      
 43433 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 43434 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 43435 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 43436 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 43437 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 43438 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 43439 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 43440 
     | 
    
         
            +
                      case "binary":
         
     | 
| 
      
 43441 
     | 
    
         
            +
                      case "varbinary":
         
     | 
| 
      
 43442 
     | 
    
         
            +
                      case "time":
         
     | 
| 
      
 43443 
     | 
    
         
            +
                      case "datetime":
         
     | 
| 
      
 43444 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 43445 
     | 
    
         
            +
                      case "float":
         
     | 
| 
      
 43446 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 43447 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
      
 43448 
     | 
    
         
            +
                      }
         
     | 
| 
      
 43449 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 43450 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 43451 
     | 
    
         
            +
                      }
         
     | 
| 
      
 43452 
     | 
    
         
            +
                    }
         
     | 
| 
      
 43453 
     | 
    
         
            +
                  }
         
     | 
| 
       43326 
43454 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       43327 
43455 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       43328 
43456 
     | 
    
         
             
                  }
         
     | 
    
        package/api.mjs
    CHANGED
    
    | 
         @@ -22287,6 +22287,14 @@ var init_common2 = __esm({ 
     | 
|
| 
       22287 
22287 
     | 
    
         
             
                    }
         
     | 
| 
       22288 
22288 
     | 
    
         
             
                    return value.map((v) => this.baseColumn.mapFromDriverValue(v));
         
     | 
| 
       22289 
22289 
     | 
    
         
             
                  }
         
     | 
| 
      
 22290 
     | 
    
         
            +
                  // Needed for arrays of custom types
         
     | 
| 
      
 22291 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 22292 
     | 
    
         
            +
                    if (typeof value === "string") {
         
     | 
| 
      
 22293 
     | 
    
         
            +
                      value = parsePgArray(value);
         
     | 
| 
      
 22294 
     | 
    
         
            +
                    }
         
     | 
| 
      
 22295 
     | 
    
         
            +
                    const base = this.baseColumn;
         
     | 
| 
      
 22296 
     | 
    
         
            +
                    return "mapFromJsonValue" in base ? value.map((v) => base.mapFromJsonValue(v)) : value.map((v) => base.mapFromDriverValue(v));
         
     | 
| 
      
 22297 
     | 
    
         
            +
                  }
         
     | 
| 
       22290 
22298 
     | 
    
         
             
                  mapToDriverValue(value, isNestedArray = false) {
         
     | 
| 
       22291 
22299 
     | 
    
         
             
                    const a = value.map(
         
     | 
| 
       22292 
22300 
     | 
    
         
             
                      (v) => v === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
         
     | 
| 
         @@ -23408,7 +23416,7 @@ function mapRelationalRow(row, buildQueryResultSelection, mapColumnValue = (valu 
     | 
|
| 
       23408 
23416 
     | 
    
         
             
                } else {
         
     | 
| 
       23409 
23417 
     | 
    
         
             
                  decoder = field.getSQL().decoder;
         
     | 
| 
       23410 
23418 
     | 
    
         
             
                }
         
     | 
| 
       23411 
     | 
    
         
            -
                row[selectionItem.key] = decoder.mapFromDriverValue(value);
         
     | 
| 
      
 23419 
     | 
    
         
            +
                row[selectionItem.key] = "mapFromJsonValue" in decoder ? decoder.mapFromJsonValue(value) : decoder.mapFromDriverValue(value);
         
     | 
| 
       23412 
23420 
     | 
    
         
             
              }
         
     | 
| 
       23413 
23421 
     | 
    
         
             
              return row;
         
     | 
| 
       23414 
23422 
     | 
    
         
             
            }
         
     | 
| 
         @@ -24863,9 +24871,13 @@ var init_custom = __esm({ 
     | 
|
| 
       24863 
24871 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       24864 
24872 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       24865 
24873 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 24874 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 24875 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       24866 
24876 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       24867 
24877 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       24868 
24878 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 24879 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 24880 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       24869 
24881 
     | 
    
         
             
                  }
         
     | 
| 
       24870 
24882 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       24871 
24883 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -24873,6 +24885,29 @@ var init_custom = __esm({ 
     | 
|
| 
       24873 
24885 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       24874 
24886 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       24875 
24887 
     | 
    
         
             
                  }
         
     | 
| 
      
 24888 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 24889 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 24890 
     | 
    
         
            +
                  }
         
     | 
| 
      
 24891 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2, arrayDimensions) {
         
     | 
| 
      
 24892 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 24893 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2, arrayDimensions);
         
     | 
| 
      
 24894 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 24895 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 24896 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 24897 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 24898 
     | 
    
         
            +
                      case "bytea":
         
     | 
| 
      
 24899 
     | 
    
         
            +
                      case "geometry":
         
     | 
| 
      
 24900 
     | 
    
         
            +
                      case "timestamp":
         
     | 
| 
      
 24901 
     | 
    
         
            +
                      case "numeric":
         
     | 
| 
      
 24902 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 24903 
     | 
    
         
            +
                        const arrVal = "[]".repeat(arrayDimensions ?? 0);
         
     | 
| 
      
 24904 
     | 
    
         
            +
                        return sql2`${identifier}::text${sql2.raw(arrVal).if(arrayDimensions)}`;
         
     | 
| 
      
 24905 
     | 
    
         
            +
                      }
         
     | 
| 
      
 24906 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 24907 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 24908 
     | 
    
         
            +
                      }
         
     | 
| 
      
 24909 
     | 
    
         
            +
                    }
         
     | 
| 
      
 24910 
     | 
    
         
            +
                  }
         
     | 
| 
       24876 
24911 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       24877 
24912 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       24878 
24913 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -27555,11 +27590,11 @@ var init_dialect = __esm({ 
     | 
|
| 
       27555 
27590 
     | 
    
         
             
                      const name2 = sql`${table6}.${sql.identifier(this.casing.getColumnCasing(column6))}`;
         
     | 
| 
       27556 
27591 
     | 
    
         
             
                      let targetType = column6.columnType;
         
     | 
| 
       27557 
27592 
     | 
    
         
             
                      let col = column6;
         
     | 
| 
       27558 
     | 
    
         
            -
                      let  
     | 
| 
      
 27593 
     | 
    
         
            +
                      let dimensionCnt = 0;
         
     | 
| 
       27559 
27594 
     | 
    
         
             
                      while (is(col, PgArray)) {
         
     | 
| 
       27560 
     | 
    
         
            -
                        col =  
     | 
| 
      
 27595 
     | 
    
         
            +
                        col = col.baseColumn;
         
     | 
| 
       27561 
27596 
     | 
    
         
             
                        targetType = col.columnType;
         
     | 
| 
       27562 
     | 
    
         
            -
                         
     | 
| 
      
 27597 
     | 
    
         
            +
                        ++dimensionCnt;
         
     | 
| 
       27563 
27598 
     | 
    
         
             
                      }
         
     | 
| 
       27564 
27599 
     | 
    
         
             
                      switch (targetType) {
         
     | 
| 
       27565 
27600 
     | 
    
         
             
                        case "PgNumeric":
         
     | 
| 
         @@ -27571,8 +27606,12 @@ var init_dialect = __esm({ 
     | 
|
| 
       27571 
27606 
     | 
    
         
             
                        case "PgGeometry":
         
     | 
| 
       27572 
27607 
     | 
    
         
             
                        case "PgGeometryObject":
         
     | 
| 
       27573 
27608 
     | 
    
         
             
                        case "PgBytea": {
         
     | 
| 
      
 27609 
     | 
    
         
            +
                          const arrVal = "[]".repeat(dimensionCnt);
         
     | 
| 
       27574 
27610 
     | 
    
         
             
                          return sql`${name2}::text${sql.raw(arrVal).if(arrVal)} as ${sql.identifier(key)}`;
         
     | 
| 
       27575 
27611 
     | 
    
         
             
                        }
         
     | 
| 
      
 27612 
     | 
    
         
            +
                        case "PgCustomColumn": {
         
     | 
| 
      
 27613 
     | 
    
         
            +
                          return sql`${col.jsonSelectIdentifier(name2, sql, dimensionCnt > 0 ? dimensionCnt : void 0)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 27614 
     | 
    
         
            +
                        }
         
     | 
| 
       27576 
27615 
     | 
    
         
             
                        default: {
         
     | 
| 
       27577 
27616 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       27578 
27617 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -32536,9 +32575,13 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32536 
32575 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       32537 
32576 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       32538 
32577 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 32578 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 32579 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       32539 
32580 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       32540 
32581 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       32541 
32582 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 32583 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 32584 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       32542 
32585 
     | 
    
         
             
                  }
         
     | 
| 
       32543 
32586 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       32544 
32587 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -32546,6 +32589,29 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32546 
32589 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       32547 
32590 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       32548 
32591 
     | 
    
         
             
                  }
         
     | 
| 
      
 32592 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 32593 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 32594 
     | 
    
         
            +
                  }
         
     | 
| 
      
 32595 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 32596 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 32597 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 32598 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 32599 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 32600 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 32601 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 32602 
     | 
    
         
            +
                      case "numeric":
         
     | 
| 
      
 32603 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 32604 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 32605 
     | 
    
         
            +
                        return sql2`cast(${identifier} as text)`;
         
     | 
| 
      
 32606 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32607 
     | 
    
         
            +
                      case "blob": {
         
     | 
| 
      
 32608 
     | 
    
         
            +
                        return sql2`hex(${identifier})`;
         
     | 
| 
      
 32609 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32610 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 32611 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 32612 
     | 
    
         
            +
                      }
         
     | 
| 
      
 32613 
     | 
    
         
            +
                    }
         
     | 
| 
      
 32614 
     | 
    
         
            +
                  }
         
     | 
| 
       32549 
32615 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       32550 
32616 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       32551 
32617 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -33739,6 +33805,9 @@ var init_dialect2 = __esm({ 
     | 
|
| 
       33739 
33805 
     | 
    
         
             
                        case "SQLiteNumericBigInt": {
         
     | 
| 
       33740 
33806 
     | 
    
         
             
                          return sql`cast(${name2} as text) as ${sql.identifier(key)}`;
         
     | 
| 
       33741 
33807 
     | 
    
         
             
                        }
         
     | 
| 
      
 33808 
     | 
    
         
            +
                        case "SQLiteCustomColumn": {
         
     | 
| 
      
 33809 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 33810 
     | 
    
         
            +
                        }
         
     | 
| 
       33742 
33811 
     | 
    
         
             
                        default: {
         
     | 
| 
       33743 
33812 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       33744 
33813 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -37348,9 +37417,13 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37348 
37417 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       37349 
37418 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       37350 
37419 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 37420 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 37421 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       37351 
37422 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       37352 
37423 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       37353 
37424 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 37425 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 37426 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       37354 
37427 
     | 
    
         
             
                  }
         
     | 
| 
       37355 
37428 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       37356 
37429 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -37358,6 +37431,30 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37358 
37431 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       37359 
37432 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       37360 
37433 
     | 
    
         
             
                  }
         
     | 
| 
      
 37434 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 37435 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 37436 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37437 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 37438 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 37439 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 37440 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 37441 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 37442 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 37443 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 37444 
     | 
    
         
            +
                      case "binary":
         
     | 
| 
      
 37445 
     | 
    
         
            +
                      case "varbinary":
         
     | 
| 
      
 37446 
     | 
    
         
            +
                      case "time":
         
     | 
| 
      
 37447 
     | 
    
         
            +
                      case "datetime":
         
     | 
| 
      
 37448 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 37449 
     | 
    
         
            +
                      case "float":
         
     | 
| 
      
 37450 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 37451 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
      
 37452 
     | 
    
         
            +
                      }
         
     | 
| 
      
 37453 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 37454 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 37455 
     | 
    
         
            +
                      }
         
     | 
| 
      
 37456 
     | 
    
         
            +
                    }
         
     | 
| 
      
 37457 
     | 
    
         
            +
                  }
         
     | 
| 
       37361 
37458 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       37362 
37459 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       37363 
37460 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -39716,6 +39813,9 @@ var init_dialect3 = __esm({ 
     | 
|
| 
       39716 
39813 
     | 
    
         
             
                        case "MySqlBigInt64": {
         
     | 
| 
       39717 
39814 
     | 
    
         
             
                          return sql`cast(${name2} as char) as ${sql.identifier(key)}`;
         
     | 
| 
       39718 
39815 
     | 
    
         
             
                        }
         
     | 
| 
      
 39816 
     | 
    
         
            +
                        case "MySqlCustomColumn": {
         
     | 
| 
      
 39817 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
      
 39818 
     | 
    
         
            +
                        }
         
     | 
| 
       39719 
39819 
     | 
    
         
             
                        default: {
         
     | 
| 
       39720 
39820 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
       39721 
39821 
     | 
    
         
             
                        }
         
     | 
| 
         @@ -43318,9 +43418,13 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43318 
43418 
     | 
    
         
             
                    __publicField(this, "sqlName");
         
     | 
| 
       43319 
43419 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       43320 
43420 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
      
 43421 
     | 
    
         
            +
                    __publicField(this, "mapJson");
         
     | 
| 
      
 43422 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       43321 
43423 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       43322 
43424 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       43323 
43425 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
      
 43426 
     | 
    
         
            +
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
      
 43427 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       43324 
43428 
     | 
    
         
             
                  }
         
     | 
| 
       43325 
43429 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       43326 
43430 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -43328,6 +43432,30 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43328 
43432 
     | 
    
         
             
                  mapFromDriverValue(value) {
         
     | 
| 
       43329 
43433 
     | 
    
         
             
                    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
         
     | 
| 
       43330 
43434 
     | 
    
         
             
                  }
         
     | 
| 
      
 43435 
     | 
    
         
            +
                  mapFromJsonValue(value) {
         
     | 
| 
      
 43436 
     | 
    
         
            +
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
      
 43437 
     | 
    
         
            +
                  }
         
     | 
| 
      
 43438 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 43439 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 43440 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
      
 43441 
     | 
    
         
            +
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
      
 43442 
     | 
    
         
            +
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
      
 43443 
     | 
    
         
            +
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
      
 43444 
     | 
    
         
            +
                    switch (type) {
         
     | 
| 
      
 43445 
     | 
    
         
            +
                      case "binary":
         
     | 
| 
      
 43446 
     | 
    
         
            +
                      case "varbinary":
         
     | 
| 
      
 43447 
     | 
    
         
            +
                      case "time":
         
     | 
| 
      
 43448 
     | 
    
         
            +
                      case "datetime":
         
     | 
| 
      
 43449 
     | 
    
         
            +
                      case "decimal":
         
     | 
| 
      
 43450 
     | 
    
         
            +
                      case "float":
         
     | 
| 
      
 43451 
     | 
    
         
            +
                      case "bigint": {
         
     | 
| 
      
 43452 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
      
 43453 
     | 
    
         
            +
                      }
         
     | 
| 
      
 43454 
     | 
    
         
            +
                      default: {
         
     | 
| 
      
 43455 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
      
 43456 
     | 
    
         
            +
                      }
         
     | 
| 
      
 43457 
     | 
    
         
            +
                    }
         
     | 
| 
      
 43458 
     | 
    
         
            +
                  }
         
     | 
| 
       43331 
43459 
     | 
    
         
             
                  mapToDriverValue(value) {
         
     | 
| 
       43332 
43460 
     | 
    
         
             
                    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
         
     | 
| 
       43333 
43461 
     | 
    
         
             
                  }
         
     | 
    
        package/bin.cjs
    CHANGED
    
    | 
         @@ -85706,70 +85706,6 @@ __export(introspect_exports, { 
     | 
|
| 
       85706 
85706 
     | 
    
         
             
              introspectSqlite: () => introspectSqlite,
         
     | 
| 
       85707 
85707 
     | 
    
         
             
              relationsToTypeScript: () => relationsToTypeScript
         
     | 
| 
       85708 
85708 
     | 
    
         
             
            });
         
     | 
| 
       85709 
     | 
    
         
            -
            function postgresToRelationsPull(schema6) {
         
     | 
| 
       85710 
     | 
    
         
            -
              return Object.values(schema6.tables).map((table6) => ({
         
     | 
| 
       85711 
     | 
    
         
            -
                schema: table6.schema,
         
     | 
| 
       85712 
     | 
    
         
            -
                foreignKeys: Object.values(table6.foreignKeys),
         
     | 
| 
       85713 
     | 
    
         
            -
                uniques: [
         
     | 
| 
       85714 
     | 
    
         
            -
                  ...Object.values(table6.uniqueConstraints).map((unq) => ({
         
     | 
| 
       85715 
     | 
    
         
            -
                    columns: unq.columns
         
     | 
| 
       85716 
     | 
    
         
            -
                  })),
         
     | 
| 
       85717 
     | 
    
         
            -
                  ...Object.values(table6.indexes).map((idx) => ({
         
     | 
| 
       85718 
     | 
    
         
            -
                    columns: idx.columns.map((idxc) => {
         
     | 
| 
       85719 
     | 
    
         
            -
                      if (!idxc.isExpression && idx.isUnique) {
         
     | 
| 
       85720 
     | 
    
         
            -
                        return idxc.expression;
         
     | 
| 
       85721 
     | 
    
         
            -
                      }
         
     | 
| 
       85722 
     | 
    
         
            -
                    }).filter((item) => item !== void 0)
         
     | 
| 
       85723 
     | 
    
         
            -
                  }))
         
     | 
| 
       85724 
     | 
    
         
            -
                ]
         
     | 
| 
       85725 
     | 
    
         
            -
              }));
         
     | 
| 
       85726 
     | 
    
         
            -
            }
         
     | 
| 
       85727 
     | 
    
         
            -
            function gelToRelationsPull(schema6) {
         
     | 
| 
       85728 
     | 
    
         
            -
              return Object.values(schema6.tables).map((table6) => ({
         
     | 
| 
       85729 
     | 
    
         
            -
                schema: table6.schema,
         
     | 
| 
       85730 
     | 
    
         
            -
                foreignKeys: Object.values(table6.foreignKeys),
         
     | 
| 
       85731 
     | 
    
         
            -
                uniques: [
         
     | 
| 
       85732 
     | 
    
         
            -
                  ...Object.values(table6.uniqueConstraints).map((unq) => ({
         
     | 
| 
       85733 
     | 
    
         
            -
                    columns: unq.columns
         
     | 
| 
       85734 
     | 
    
         
            -
                  })),
         
     | 
| 
       85735 
     | 
    
         
            -
                  ...Object.values(table6.indexes).map((idx) => ({
         
     | 
| 
       85736 
     | 
    
         
            -
                    columns: idx.columns.map((idxc) => {
         
     | 
| 
       85737 
     | 
    
         
            -
                      if (!idxc.isExpression && idx.isUnique) {
         
     | 
| 
       85738 
     | 
    
         
            -
                        return idxc.expression;
         
     | 
| 
       85739 
     | 
    
         
            -
                      }
         
     | 
| 
       85740 
     | 
    
         
            -
                    }).filter((item) => item !== void 0)
         
     | 
| 
       85741 
     | 
    
         
            -
                  }))
         
     | 
| 
       85742 
     | 
    
         
            -
                ]
         
     | 
| 
       85743 
     | 
    
         
            -
              }));
         
     | 
| 
       85744 
     | 
    
         
            -
            }
         
     | 
| 
       85745 
     | 
    
         
            -
            function mysqlToRelationsPull(schema6) {
         
     | 
| 
       85746 
     | 
    
         
            -
              return Object.values(schema6.tables).map((table6) => ({
         
     | 
| 
       85747 
     | 
    
         
            -
                schema: void 0,
         
     | 
| 
       85748 
     | 
    
         
            -
                foreignKeys: Object.values(table6.foreignKeys),
         
     | 
| 
       85749 
     | 
    
         
            -
                uniques: [
         
     | 
| 
       85750 
     | 
    
         
            -
                  ...Object.values(table6.uniqueConstraints).map((unq) => ({
         
     | 
| 
       85751 
     | 
    
         
            -
                    columns: unq.columns
         
     | 
| 
       85752 
     | 
    
         
            -
                  })),
         
     | 
| 
       85753 
     | 
    
         
            -
                  ...Object.values(table6.indexes).map((idx) => ({
         
     | 
| 
       85754 
     | 
    
         
            -
                    columns: idx.columns
         
     | 
| 
       85755 
     | 
    
         
            -
                  }))
         
     | 
| 
       85756 
     | 
    
         
            -
                ]
         
     | 
| 
       85757 
     | 
    
         
            -
              }));
         
     | 
| 
       85758 
     | 
    
         
            -
            }
         
     | 
| 
       85759 
     | 
    
         
            -
            function sqliteToRelationsPull(schema6) {
         
     | 
| 
       85760 
     | 
    
         
            -
              return Object.values(schema6.tables).map((table6) => ({
         
     | 
| 
       85761 
     | 
    
         
            -
                schema: void 0,
         
     | 
| 
       85762 
     | 
    
         
            -
                foreignKeys: Object.values(table6.foreignKeys),
         
     | 
| 
       85763 
     | 
    
         
            -
                uniques: [
         
     | 
| 
       85764 
     | 
    
         
            -
                  ...Object.values(table6.uniqueConstraints).map((unq) => ({
         
     | 
| 
       85765 
     | 
    
         
            -
                    columns: unq.columns
         
     | 
| 
       85766 
     | 
    
         
            -
                  })),
         
     | 
| 
       85767 
     | 
    
         
            -
                  ...Object.values(table6.indexes).map((idx) => ({
         
     | 
| 
       85768 
     | 
    
         
            -
                    columns: idx.columns
         
     | 
| 
       85769 
     | 
    
         
            -
                  }))
         
     | 
| 
       85770 
     | 
    
         
            -
                ]
         
     | 
| 
       85771 
     | 
    
         
            -
              }));
         
     | 
| 
       85772 
     | 
    
         
            -
            }
         
     | 
| 
       85773 
85709 
     | 
    
         
             
            var import_fs11, import_hanji14, import_path7, import_pluralize, introspectPostgres, introspectGel, introspectMysql, introspectSingleStore, introspectSqlite, introspectLibSQL, withCasing4, relationsToTypeScript;
         
     | 
| 
       85774 
85710 
     | 
    
         
             
            var init_introspect = __esm({
         
     | 
| 
       85775 
85711 
     | 
    
         
             
              "src/cli/commands/introspect.ts"() {
         
     | 
| 
         @@ -85839,7 +85775,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       85839 
85775 
     | 
    
         
             
                  );
         
     | 
| 
       85840 
85776 
     | 
    
         
             
                  const schema6 = { id: originUUID, prevId: "", ...res };
         
     | 
| 
       85841 
85777 
     | 
    
         
             
                  const ts = schemaToTypeScript4(schema6, casing2);
         
     | 
| 
       85842 
     | 
    
         
            -
                  const relationsTs = relationsToTypeScript( 
     | 
| 
      
 85778 
     | 
    
         
            +
                  const relationsTs = relationsToTypeScript(schema6, casing2);
         
     | 
| 
       85843 
85779 
     | 
    
         
             
                  const { internal, ...schemaWithoutInternals } = schema6;
         
     | 
| 
       85844 
85780 
     | 
    
         
             
                  const schemaFile = (0, import_path7.join)(out, "schema.ts");
         
     | 
| 
       85845 
85781 
     | 
    
         
             
                  (0, import_fs11.writeFileSync)(schemaFile, ts.file);
         
     | 
| 
         @@ -85934,7 +85870,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       85934 
85870 
     | 
    
         
             
                  );
         
     | 
| 
       85935 
85871 
     | 
    
         
             
                  const schema6 = { id: originUUID, prevId: "", ...res };
         
     | 
| 
       85936 
85872 
     | 
    
         
             
                  const ts = schemaToTypeScript2(schema6, casing2);
         
     | 
| 
       85937 
     | 
    
         
            -
                  const relationsTs = relationsToTypeScript( 
     | 
| 
      
 85873 
     | 
    
         
            +
                  const relationsTs = relationsToTypeScript(schema6, casing2);
         
     | 
| 
       85938 
85874 
     | 
    
         
             
                  const { internal, ...schemaWithoutInternals } = schema6;
         
     | 
| 
       85939 
85875 
     | 
    
         
             
                  const schemaFile = (0, import_path7.join)(out, "schema.ts");
         
     | 
| 
       85940 
85876 
     | 
    
         
             
                  (0, import_fs11.writeFileSync)(schemaFile, ts.file);
         
     | 
| 
         @@ -85989,7 +85925,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       85989 
85925 
     | 
    
         
             
                  );
         
     | 
| 
       85990 
85926 
     | 
    
         
             
                  const schema6 = { id: originUUID, prevId: "", ...res };
         
     | 
| 
       85991 
85927 
     | 
    
         
             
                  const ts = schemaToTypeScript3(schema6, casing2);
         
     | 
| 
       85992 
     | 
    
         
            -
                  const relationsTs = relationsToTypeScript( 
     | 
| 
      
 85928 
     | 
    
         
            +
                  const relationsTs = relationsToTypeScript(schema6, casing2);
         
     | 
| 
       85993 
85929 
     | 
    
         
             
                  const { internal, ...schemaWithoutInternals } = schema6;
         
     | 
| 
       85994 
85930 
     | 
    
         
             
                  const schemaFile = (0, import_path7.join)(out, "schema.ts");
         
     | 
| 
       85995 
85931 
     | 
    
         
             
                  (0, import_fs11.writeFileSync)(schemaFile, ts.file);
         
     | 
| 
         @@ -86145,7 +86081,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       86145 
86081 
     | 
    
         
             
                  );
         
     | 
| 
       86146 
86082 
     | 
    
         
             
                  const schema6 = { id: originUUID, prevId: "", ...res };
         
     | 
| 
       86147 
86083 
     | 
    
         
             
                  const ts = schemaToTypeScript(schema6, casing2);
         
     | 
| 
       86148 
     | 
    
         
            -
                  const relationsTs = relationsToTypeScript( 
     | 
| 
      
 86084 
     | 
    
         
            +
                  const relationsTs = relationsToTypeScript(schema6, casing2);
         
     | 
| 
       86149 
86085 
     | 
    
         
             
                  const schemaFile = (0, import_path7.join)(out, "schema.ts");
         
     | 
| 
       86150 
86086 
     | 
    
         
             
                  (0, import_fs11.writeFileSync)(schemaFile, ts.file);
         
     | 
| 
       86151 
86087 
     | 
    
         
             
                  const relationsFile = (0, import_path7.join)(out, "relations.ts");
         
     | 
| 
         @@ -86227,7 +86163,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       86227 
86163 
     | 
    
         
             
                  );
         
     | 
| 
       86228 
86164 
     | 
    
         
             
                  const schema6 = { id: originUUID, prevId: "", ...res };
         
     | 
| 
       86229 
86165 
     | 
    
         
             
                  const ts = schemaToTypeScript(schema6, casing2);
         
     | 
| 
       86230 
     | 
    
         
            -
                  const relationsTs = relationsToTypeScript( 
     | 
| 
      
 86166 
     | 
    
         
            +
                  const relationsTs = relationsToTypeScript(schema6, casing2);
         
     | 
| 
       86231 
86167 
     | 
    
         
             
                  const schemaFile = (0, import_path7.join)(out, "schema.ts");
         
     | 
| 
       86232 
86168 
     | 
    
         
             
                  (0, import_fs11.writeFileSync)(schemaFile, ts.file);
         
     | 
| 
       86233 
86169 
     | 
    
         
             
                  const relationsFile = (0, import_path7.join)(out, "relations.ts");
         
     | 
| 
         @@ -86287,7 +86223,7 @@ var init_introspect = __esm({ 
     | 
|
| 
       86287 
86223 
     | 
    
         
             
                relationsToTypeScript = (schema6, casing2) => {
         
     | 
| 
       86288 
86224 
     | 
    
         
             
                  const imports = [];
         
     | 
| 
       86289 
86225 
     | 
    
         
             
                  const tableRelations = {};
         
     | 
| 
       86290 
     | 
    
         
            -
                  schema6.forEach((table6) => {
         
     | 
| 
      
 86226 
     | 
    
         
            +
                  Object.values(schema6.tables).forEach((table6) => {
         
     | 
| 
       86291 
86227 
     | 
    
         
             
                    const fks = Object.values(table6.foreignKeys);
         
     | 
| 
       86292 
86228 
     | 
    
         
             
                    if (fks.length === 2) {
         
     | 
| 
       86293 
86229 
     | 
    
         
             
                      const [fk1, fk22] = fks;
         
     | 
| 
         @@ -86319,7 +86255,6 @@ var init_introspect = __esm({ 
     | 
|
| 
       86319 
86255 
     | 
    
         
             
                        }
         
     | 
| 
       86320 
86256 
     | 
    
         
             
                        tableRelations[toTable2].push({
         
     | 
| 
       86321 
86257 
     | 
    
         
             
                          name: (0, import_pluralize.plural)(toTable1),
         
     | 
| 
       86322 
     | 
    
         
            -
                          // this type is used for .many() side of relation, when another side has .through() with from and to fields
         
     | 
| 
       86323 
86258 
     | 
    
         
             
                          type: "many-through",
         
     | 
| 
       86324 
86259 
     | 
    
         
             
                          tableFrom: toTable2,
         
     | 
| 
       86325 
86260 
     | 
    
         
             
                          columnsFrom: fk22.columnsTo,
         
     | 
| 
         @@ -86355,27 +86290,14 @@ var init_introspect = __esm({ 
     | 
|
| 
       86355 
86290 
     | 
    
         
             
                        if (!tableRelations[keyTo]) {
         
     | 
| 
       86356 
86291 
     | 
    
         
             
                          tableRelations[keyTo] = [];
         
     | 
| 
       86357 
86292 
     | 
    
         
             
                        }
         
     | 
| 
       86358 
     | 
    
         
            -
                         
     | 
| 
       86359 
     | 
    
         
            -
                           
     | 
| 
       86360 
     | 
    
         
            -
             
     | 
| 
       86361 
     | 
    
         
            -
                           
     | 
| 
       86362 
     | 
    
         
            -
             
     | 
| 
       86363 
     | 
    
         
            -
             
     | 
| 
       86364 
     | 
    
         
            -
             
     | 
| 
       86365 
     | 
    
         
            -
             
     | 
| 
       86366 
     | 
    
         
            -
                            tableTo: tableFrom,
         
     | 
| 
       86367 
     | 
    
         
            -
                            columnsTo: columnsFrom
         
     | 
| 
       86368 
     | 
    
         
            -
                          });
         
     | 
| 
       86369 
     | 
    
         
            -
                        } else {
         
     | 
| 
       86370 
     | 
    
         
            -
                          tableRelations[keyTo].push({
         
     | 
| 
       86371 
     | 
    
         
            -
                            name: (0, import_pluralize.plural)(tableFrom),
         
     | 
| 
       86372 
     | 
    
         
            -
                            type: "many",
         
     | 
| 
       86373 
     | 
    
         
            -
                            tableFrom: tableTo,
         
     | 
| 
       86374 
     | 
    
         
            -
                            columnsFrom: columnsTo,
         
     | 
| 
       86375 
     | 
    
         
            -
                            tableTo: tableFrom,
         
     | 
| 
       86376 
     | 
    
         
            -
                            columnsTo: columnsFrom
         
     | 
| 
       86377 
     | 
    
         
            -
                          });
         
     | 
| 
       86378 
     | 
    
         
            -
                        }
         
     | 
| 
      
 86293 
     | 
    
         
            +
                        tableRelations[keyTo].push({
         
     | 
| 
      
 86294 
     | 
    
         
            +
                          name: (0, import_pluralize.plural)(tableFrom),
         
     | 
| 
      
 86295 
     | 
    
         
            +
                          type: "many",
         
     | 
| 
      
 86296 
     | 
    
         
            +
                          tableFrom: tableTo,
         
     | 
| 
      
 86297 
     | 
    
         
            +
                          columnsFrom: columnsTo,
         
     | 
| 
      
 86298 
     | 
    
         
            +
                          tableTo: tableFrom,
         
     | 
| 
      
 86299 
     | 
    
         
            +
                          columnsTo: columnsFrom
         
     | 
| 
      
 86300 
     | 
    
         
            +
                        });
         
     | 
| 
       86379 
86301 
     | 
    
         
             
                      });
         
     | 
| 
       86380 
86302 
     | 
    
         
             
                    }
         
     | 
| 
       86381 
86303 
     | 
    
         
             
                  });
         
     | 
| 
         @@ -86395,7 +86317,7 @@ import * as schema from "./schema"; 
     | 
|
| 
       86395 
86317 
     | 
    
         
             
                        if (hasMultipleRelations) {
         
     | 
| 
       86396 
86318 
     | 
    
         
             
                          if (relation.type === "one") {
         
     | 
| 
       86397 
86319 
     | 
    
         
             
                            relationName = `${relation.tableFrom}_${relation.columnsFrom.join("_")}_${relation.tableTo}_${relation.columnsTo.join("_")}`;
         
     | 
| 
       86398 
     | 
    
         
            -
                          } else if (relation.type === "many" 
     | 
| 
      
 86320 
     | 
    
         
            +
                          } else if (relation.type === "many") {
         
     | 
| 
       86399 
86321 
     | 
    
         
             
                            relationName = `${relation.tableTo}_${relation.columnsTo.join("_")}_${relation.tableFrom}_${relation.columnsFrom.join("_")}`;
         
     | 
| 
       86400 
86322 
     | 
    
         
             
                          } else if (relation.type === "through") {
         
     | 
| 
       86401 
86323 
     | 
    
         
             
                            relationName = `${relation.tableFrom}_${relation.columnsFrom.join("_")}_${relation.tableTo}_${relation.columnsTo.join("_")}_via_${relation.tableThrough}`;
         
     | 
| 
         @@ -86433,11 +86355,6 @@ import * as schema from "./schema"; 
     | 
|
| 
       86433 
86355 
     | 
    
         
             
            		${relation.name}: r.many.${relation.tableTo}(` + (relation.relationName ? `{
         
     | 
| 
       86434 
86356 
     | 
    
         
             
            			alias: "${relation.relationName}"
         
     | 
| 
       86435 
86357 
     | 
    
         
             
            		}` : "") + `),`;
         
     | 
| 
       86436 
     | 
    
         
            -
                      } else if (relation.type === "one-one") {
         
     | 
| 
       86437 
     | 
    
         
            -
                        relationString += `
         
     | 
| 
       86438 
     | 
    
         
            -
            		${relation.name}: r.one.${relation.tableTo}(` + (relation.relationName ? `{
         
     | 
| 
       86439 
     | 
    
         
            -
            			alias: "${relation.relationName}"
         
     | 
| 
       86440 
     | 
    
         
            -
            		}` : "") + `),`;
         
     | 
| 
       86441 
86358 
     | 
    
         
             
                      } else {
         
     | 
| 
       86442 
86359 
     | 
    
         
             
                        const from = relation.columnsThroughFrom.length === 1 ? `r.${relation.tableFrom}.${relation.columnsFrom[0]}.through(r.${relation.tableThrough}.${relation.columnsThroughFrom[0]})` : `[${relation.columnsThroughFrom.map((it) => `r.${relation.tableFrom}.${it}.through(${relation.tableThrough}.${it})`).join(", ")}]`;
         
     | 
| 
       86443 
86360 
     | 
    
         
             
                        const to = relation.columnsThroughTo.length === 1 ? `r.${relation.tableTo}.${relation.columnsTo[0]}.through(r.${relation.tableThrough}.${relation.columnsThroughTo[0]})` : `[${relation.columnsThroughTo.map((it) => `r.${relation.tableTo}.${it}.through(${relation.tableThrough}.${it})`).join(", ")}]`;
         
     | 
| 
         @@ -92812,7 +92729,7 @@ init_utils5(); 
     | 
|
| 
       92812 
92729 
     | 
    
         
             
            var version2 = async () => {
         
     | 
| 
       92813 
92730 
     | 
    
         
             
              const { npmVersion } = await ormCoreVersions();
         
     | 
| 
       92814 
92731 
     | 
    
         
             
              const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
         
     | 
| 
       92815 
     | 
    
         
            -
              const envVersion = "1.0.0-beta.1- 
     | 
| 
      
 92732 
     | 
    
         
            +
              const envVersion = "1.0.0-beta.1-251c8ba";
         
     | 
| 
       92816 
92733 
     | 
    
         
             
              const kitVersion = envVersion ? `v${envVersion}` : "--";
         
     | 
| 
       92817 
92734 
     | 
    
         
             
              const versions = `drizzle-kit: ${kitVersion}
         
     | 
| 
       92818 
92735 
     | 
    
         
             
            ${ormVersion}`;
         
     |