drizzle-kit 1.0.0-beta.1-6b935a0 → 1.0.0-beta.1-03aea0b
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 +32 -32
 - package/api.mjs +32 -32
 - package/bin.cjs +1 -1
 - package/package.json +1 -1
 
    
        package/api.js
    CHANGED
    
    | 
         @@ -24867,12 +24867,12 @@ var init_custom = __esm({ 
     | 
|
| 
       24867 
24867 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       24868 
24868 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       24869 
24869 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       24870 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 24870 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       24871 
24871 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       24872 
24872 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       24873 
24873 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       24874 
24874 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       24875 
     | 
    
         
            -
                    this. 
     | 
| 
      
 24875 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       24876 
24876 
     | 
    
         
             
                  }
         
     | 
| 
       24877 
24877 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       24878 
24878 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -24883,9 +24883,9 @@ var init_custom = __esm({ 
     | 
|
| 
       24883 
24883 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       24884 
24884 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       24885 
24885 
     | 
    
         
             
                  }
         
     | 
| 
       24886 
     | 
    
         
            -
                   
     | 
| 
       24887 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       24888 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 24886 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2, arrayDimensions) {
         
     | 
| 
      
 24887 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 24888 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2, arrayDimensions);
         
     | 
| 
       24889 
24889 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       24890 
24890 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       24891 
24891 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -24896,10 +24896,10 @@ var init_custom = __esm({ 
     | 
|
| 
       24896 
24896 
     | 
    
         
             
                      case "numeric":
         
     | 
| 
       24897 
24897 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       24898 
24898 
     | 
    
         
             
                        const arrVal = "[]".repeat(arrayDimensions ?? 0);
         
     | 
| 
       24899 
     | 
    
         
            -
                        return sql2`${ 
     | 
| 
      
 24899 
     | 
    
         
            +
                        return sql2`${identifier}::text${sql2.raw(arrVal).if(arrayDimensions)}`;
         
     | 
| 
       24900 
24900 
     | 
    
         
             
                      }
         
     | 
| 
       24901 
24901 
     | 
    
         
             
                      default: {
         
     | 
| 
       24902 
     | 
    
         
            -
                        return  
     | 
| 
      
 24902 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       24903 
24903 
     | 
    
         
             
                      }
         
     | 
| 
       24904 
24904 
     | 
    
         
             
                    }
         
     | 
| 
       24905 
24905 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -27605,7 +27605,7 @@ var init_dialect = __esm({ 
     | 
|
| 
       27605 
27605 
     | 
    
         
             
                          return sql`${name2}::text${sql.raw(arrVal).if(arrVal)} as ${sql.identifier(key)}`;
         
     | 
| 
       27606 
27606 
     | 
    
         
             
                        }
         
     | 
| 
       27607 
27607 
     | 
    
         
             
                        case "PgCustomColumn": {
         
     | 
| 
       27608 
     | 
    
         
            -
                          return sql`${col. 
     | 
| 
      
 27608 
     | 
    
         
            +
                          return sql`${col.jsonSelectIdentifier(name2, sql, dimensionCnt > 0 ? dimensionCnt : void 0)} as ${sql.identifier(key)}`;
         
     | 
| 
       27609 
27609 
     | 
    
         
             
                        }
         
     | 
| 
       27610 
27610 
     | 
    
         
             
                        default: {
         
     | 
| 
       27611 
27611 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -32571,12 +32571,12 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32571 
32571 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       32572 
32572 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       32573 
32573 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       32574 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 32574 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       32575 
32575 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       32576 
32576 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       32577 
32577 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       32578 
32578 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       32579 
     | 
    
         
            -
                    this. 
     | 
| 
      
 32579 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       32580 
32580 
     | 
    
         
             
                  }
         
     | 
| 
       32581 
32581 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       32582 
32582 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -32587,9 +32587,9 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32587 
32587 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       32588 
32588 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       32589 
32589 
     | 
    
         
             
                  }
         
     | 
| 
       32590 
     | 
    
         
            -
                   
     | 
| 
       32591 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       32592 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 32590 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 32591 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 32592 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       32593 
32593 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       32594 
32594 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       32595 
32595 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -32597,13 +32597,13 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32597 
32597 
     | 
    
         
             
                      case "numeric":
         
     | 
| 
       32598 
32598 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       32599 
32599 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       32600 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 32600 
     | 
    
         
            +
                        return sql2`cast(${identifier} as text)`;
         
     | 
| 
       32601 
32601 
     | 
    
         
             
                      }
         
     | 
| 
       32602 
32602 
     | 
    
         
             
                      case "blob": {
         
     | 
| 
       32603 
     | 
    
         
            -
                        return sql2`hex(${ 
     | 
| 
      
 32603 
     | 
    
         
            +
                        return sql2`hex(${identifier})`;
         
     | 
| 
       32604 
32604 
     | 
    
         
             
                      }
         
     | 
| 
       32605 
32605 
     | 
    
         
             
                      default: {
         
     | 
| 
       32606 
     | 
    
         
            -
                        return  
     | 
| 
      
 32606 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       32607 
32607 
     | 
    
         
             
                      }
         
     | 
| 
       32608 
32608 
     | 
    
         
             
                    }
         
     | 
| 
       32609 
32609 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -33801,7 +33801,7 @@ var init_dialect2 = __esm({ 
     | 
|
| 
       33801 
33801 
     | 
    
         
             
                          return sql`cast(${name2} as text) as ${sql.identifier(key)}`;
         
     | 
| 
       33802 
33802 
     | 
    
         
             
                        }
         
     | 
| 
       33803 
33803 
     | 
    
         
             
                        case "SQLiteCustomColumn": {
         
     | 
| 
       33804 
     | 
    
         
            -
                          return sql`${column6. 
     | 
| 
      
 33804 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
       33805 
33805 
     | 
    
         
             
                        }
         
     | 
| 
       33806 
33806 
     | 
    
         
             
                        default: {
         
     | 
| 
       33807 
33807 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -37413,12 +37413,12 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37413 
37413 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       37414 
37414 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       37415 
37415 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       37416 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 37416 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       37417 
37417 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       37418 
37418 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       37419 
37419 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       37420 
37420 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       37421 
     | 
    
         
            -
                    this. 
     | 
| 
      
 37421 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       37422 
37422 
     | 
    
         
             
                  }
         
     | 
| 
       37423 
37423 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       37424 
37424 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -37429,9 +37429,9 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37429 
37429 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       37430 
37430 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       37431 
37431 
     | 
    
         
             
                  }
         
     | 
| 
       37432 
     | 
    
         
            -
                   
     | 
| 
       37433 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       37434 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 37432 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 37433 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 37434 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       37435 
37435 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       37436 
37436 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       37437 
37437 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -37443,10 +37443,10 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37443 
37443 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       37444 
37444 
     | 
    
         
             
                      case "float":
         
     | 
| 
       37445 
37445 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       37446 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 37446 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
       37447 
37447 
     | 
    
         
             
                      }
         
     | 
| 
       37448 
37448 
     | 
    
         
             
                      default: {
         
     | 
| 
       37449 
     | 
    
         
            -
                        return  
     | 
| 
      
 37449 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       37450 
37450 
     | 
    
         
             
                      }
         
     | 
| 
       37451 
37451 
     | 
    
         
             
                    }
         
     | 
| 
       37452 
37452 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -39809,7 +39809,7 @@ var init_dialect3 = __esm({ 
     | 
|
| 
       39809 
39809 
     | 
    
         
             
                          return sql`cast(${name2} as char) as ${sql.identifier(key)}`;
         
     | 
| 
       39810 
39810 
     | 
    
         
             
                        }
         
     | 
| 
       39811 
39811 
     | 
    
         
             
                        case "MySqlCustomColumn": {
         
     | 
| 
       39812 
     | 
    
         
            -
                          return sql`${column6. 
     | 
| 
      
 39812 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
       39813 
39813 
     | 
    
         
             
                        }
         
     | 
| 
       39814 
39814 
     | 
    
         
             
                        default: {
         
     | 
| 
       39815 
39815 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -43414,12 +43414,12 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43414 
43414 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       43415 
43415 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       43416 
43416 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       43417 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 43417 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       43418 
43418 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       43419 
43419 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       43420 
43420 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       43421 
43421 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       43422 
     | 
    
         
            -
                    this. 
     | 
| 
      
 43422 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       43423 
43423 
     | 
    
         
             
                  }
         
     | 
| 
       43424 
43424 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       43425 
43425 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -43430,9 +43430,9 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43430 
43430 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       43431 
43431 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       43432 
43432 
     | 
    
         
             
                  }
         
     | 
| 
       43433 
     | 
    
         
            -
                   
     | 
| 
       43434 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       43435 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 43433 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 43434 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 43435 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       43436 
43436 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       43437 
43437 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       43438 
43438 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -43444,10 +43444,10 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43444 
43444 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       43445 
43445 
     | 
    
         
             
                      case "float":
         
     | 
| 
       43446 
43446 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       43447 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 43447 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
       43448 
43448 
     | 
    
         
             
                      }
         
     | 
| 
       43449 
43449 
     | 
    
         
             
                      default: {
         
     | 
| 
       43450 
     | 
    
         
            -
                        return  
     | 
| 
      
 43450 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       43451 
43451 
     | 
    
         
             
                      }
         
     | 
| 
       43452 
43452 
     | 
    
         
             
                    }
         
     | 
| 
       43453 
43453 
     | 
    
         
             
                  }
         
     | 
    
        package/api.mjs
    CHANGED
    
    | 
         @@ -24872,12 +24872,12 @@ var init_custom = __esm({ 
     | 
|
| 
       24872 
24872 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       24873 
24873 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       24874 
24874 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       24875 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 24875 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       24876 
24876 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       24877 
24877 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       24878 
24878 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       24879 
24879 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       24880 
     | 
    
         
            -
                    this. 
     | 
| 
      
 24880 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       24881 
24881 
     | 
    
         
             
                  }
         
     | 
| 
       24882 
24882 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       24883 
24883 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -24888,9 +24888,9 @@ var init_custom = __esm({ 
     | 
|
| 
       24888 
24888 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       24889 
24889 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       24890 
24890 
     | 
    
         
             
                  }
         
     | 
| 
       24891 
     | 
    
         
            -
                   
     | 
| 
       24892 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       24893 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 24891 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2, arrayDimensions) {
         
     | 
| 
      
 24892 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 24893 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2, arrayDimensions);
         
     | 
| 
       24894 
24894 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       24895 
24895 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       24896 
24896 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -24901,10 +24901,10 @@ var init_custom = __esm({ 
     | 
|
| 
       24901 
24901 
     | 
    
         
             
                      case "numeric":
         
     | 
| 
       24902 
24902 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       24903 
24903 
     | 
    
         
             
                        const arrVal = "[]".repeat(arrayDimensions ?? 0);
         
     | 
| 
       24904 
     | 
    
         
            -
                        return sql2`${ 
     | 
| 
      
 24904 
     | 
    
         
            +
                        return sql2`${identifier}::text${sql2.raw(arrVal).if(arrayDimensions)}`;
         
     | 
| 
       24905 
24905 
     | 
    
         
             
                      }
         
     | 
| 
       24906 
24906 
     | 
    
         
             
                      default: {
         
     | 
| 
       24907 
     | 
    
         
            -
                        return  
     | 
| 
      
 24907 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       24908 
24908 
     | 
    
         
             
                      }
         
     | 
| 
       24909 
24909 
     | 
    
         
             
                    }
         
     | 
| 
       24910 
24910 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -27610,7 +27610,7 @@ var init_dialect = __esm({ 
     | 
|
| 
       27610 
27610 
     | 
    
         
             
                          return sql`${name2}::text${sql.raw(arrVal).if(arrVal)} as ${sql.identifier(key)}`;
         
     | 
| 
       27611 
27611 
     | 
    
         
             
                        }
         
     | 
| 
       27612 
27612 
     | 
    
         
             
                        case "PgCustomColumn": {
         
     | 
| 
       27613 
     | 
    
         
            -
                          return sql`${col. 
     | 
| 
      
 27613 
     | 
    
         
            +
                          return sql`${col.jsonSelectIdentifier(name2, sql, dimensionCnt > 0 ? dimensionCnt : void 0)} as ${sql.identifier(key)}`;
         
     | 
| 
       27614 
27614 
     | 
    
         
             
                        }
         
     | 
| 
       27615 
27615 
     | 
    
         
             
                        default: {
         
     | 
| 
       27616 
27616 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -32576,12 +32576,12 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32576 
32576 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       32577 
32577 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       32578 
32578 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       32579 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 32579 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       32580 
32580 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       32581 
32581 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       32582 
32582 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       32583 
32583 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       32584 
     | 
    
         
            -
                    this. 
     | 
| 
      
 32584 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       32585 
32585 
     | 
    
         
             
                  }
         
     | 
| 
       32586 
32586 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       32587 
32587 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -32592,9 +32592,9 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32592 
32592 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       32593 
32593 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       32594 
32594 
     | 
    
         
             
                  }
         
     | 
| 
       32595 
     | 
    
         
            -
                   
     | 
| 
       32596 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       32597 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 32595 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 32596 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 32597 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       32598 
32598 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       32599 
32599 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       32600 
32600 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -32602,13 +32602,13 @@ var init_custom2 = __esm({ 
     | 
|
| 
       32602 
32602 
     | 
    
         
             
                      case "numeric":
         
     | 
| 
       32603 
32603 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       32604 
32604 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       32605 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 32605 
     | 
    
         
            +
                        return sql2`cast(${identifier} as text)`;
         
     | 
| 
       32606 
32606 
     | 
    
         
             
                      }
         
     | 
| 
       32607 
32607 
     | 
    
         
             
                      case "blob": {
         
     | 
| 
       32608 
     | 
    
         
            -
                        return sql2`hex(${ 
     | 
| 
      
 32608 
     | 
    
         
            +
                        return sql2`hex(${identifier})`;
         
     | 
| 
       32609 
32609 
     | 
    
         
             
                      }
         
     | 
| 
       32610 
32610 
     | 
    
         
             
                      default: {
         
     | 
| 
       32611 
     | 
    
         
            -
                        return  
     | 
| 
      
 32611 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       32612 
32612 
     | 
    
         
             
                      }
         
     | 
| 
       32613 
32613 
     | 
    
         
             
                    }
         
     | 
| 
       32614 
32614 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -33806,7 +33806,7 @@ var init_dialect2 = __esm({ 
     | 
|
| 
       33806 
33806 
     | 
    
         
             
                          return sql`cast(${name2} as text) as ${sql.identifier(key)}`;
         
     | 
| 
       33807 
33807 
     | 
    
         
             
                        }
         
     | 
| 
       33808 
33808 
     | 
    
         
             
                        case "SQLiteCustomColumn": {
         
     | 
| 
       33809 
     | 
    
         
            -
                          return sql`${column6. 
     | 
| 
      
 33809 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
       33810 
33810 
     | 
    
         
             
                        }
         
     | 
| 
       33811 
33811 
     | 
    
         
             
                        default: {
         
     | 
| 
       33812 
33812 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -37418,12 +37418,12 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37418 
37418 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       37419 
37419 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       37420 
37420 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       37421 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 37421 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       37422 
37422 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       37423 
37423 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       37424 
37424 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       37425 
37425 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       37426 
     | 
    
         
            -
                    this. 
     | 
| 
      
 37426 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       37427 
37427 
     | 
    
         
             
                  }
         
     | 
| 
       37428 
37428 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       37429 
37429 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -37434,9 +37434,9 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37434 
37434 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       37435 
37435 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       37436 
37436 
     | 
    
         
             
                  }
         
     | 
| 
       37437 
     | 
    
         
            -
                   
     | 
| 
       37438 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       37439 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 37437 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 37438 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 37439 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       37440 
37440 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       37441 
37441 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       37442 
37442 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -37448,10 +37448,10 @@ var init_custom3 = __esm({ 
     | 
|
| 
       37448 
37448 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       37449 
37449 
     | 
    
         
             
                      case "float":
         
     | 
| 
       37450 
37450 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       37451 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 37451 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
       37452 
37452 
     | 
    
         
             
                      }
         
     | 
| 
       37453 
37453 
     | 
    
         
             
                      default: {
         
     | 
| 
       37454 
     | 
    
         
            -
                        return  
     | 
| 
      
 37454 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       37455 
37455 
     | 
    
         
             
                      }
         
     | 
| 
       37456 
37456 
     | 
    
         
             
                    }
         
     | 
| 
       37457 
37457 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -39814,7 +39814,7 @@ var init_dialect3 = __esm({ 
     | 
|
| 
       39814 
39814 
     | 
    
         
             
                          return sql`cast(${name2} as char) as ${sql.identifier(key)}`;
         
     | 
| 
       39815 
39815 
     | 
    
         
             
                        }
         
     | 
| 
       39816 
39816 
     | 
    
         
             
                        case "MySqlCustomColumn": {
         
     | 
| 
       39817 
     | 
    
         
            -
                          return sql`${column6. 
     | 
| 
      
 39817 
     | 
    
         
            +
                          return sql`${column6.jsonSelectIdentifier(name2, sql)} as ${sql.identifier(key)}`;
         
     | 
| 
       39818 
39818 
     | 
    
         
             
                        }
         
     | 
| 
       39819 
39819 
     | 
    
         
             
                        default: {
         
     | 
| 
       39820 
39820 
     | 
    
         
             
                          return sql`${name2} as ${sql.identifier(key)}`;
         
     | 
| 
         @@ -43419,12 +43419,12 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43419 
43419 
     | 
    
         
             
                    __publicField(this, "mapTo");
         
     | 
| 
       43420 
43420 
     | 
    
         
             
                    __publicField(this, "mapFrom");
         
     | 
| 
       43421 
43421 
     | 
    
         
             
                    __publicField(this, "mapJson");
         
     | 
| 
       43422 
     | 
    
         
            -
                    __publicField(this, " 
     | 
| 
      
 43422 
     | 
    
         
            +
                    __publicField(this, "forJsonSelect");
         
     | 
| 
       43423 
43423 
     | 
    
         
             
                    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
         
     | 
| 
       43424 
43424 
     | 
    
         
             
                    this.mapTo = config.customTypeParams.toDriver;
         
     | 
| 
       43425 
43425 
     | 
    
         
             
                    this.mapFrom = config.customTypeParams.fromDriver;
         
     | 
| 
       43426 
43426 
     | 
    
         
             
                    this.mapJson = config.customTypeParams.fromJson;
         
     | 
| 
       43427 
     | 
    
         
            -
                    this. 
     | 
| 
      
 43427 
     | 
    
         
            +
                    this.forJsonSelect = config.customTypeParams.forJsonSelect;
         
     | 
| 
       43428 
43428 
     | 
    
         
             
                  }
         
     | 
| 
       43429 
43429 
     | 
    
         
             
                  getSQLType() {
         
     | 
| 
       43430 
43430 
     | 
    
         
             
                    return this.sqlName;
         
     | 
| 
         @@ -43435,9 +43435,9 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43435 
43435 
     | 
    
         
             
                  mapFromJsonValue(value) {
         
     | 
| 
       43436 
43436 
     | 
    
         
             
                    return typeof this.mapJson === "function" ? this.mapJson(value) : this.mapFromDriverValue(value);
         
     | 
| 
       43437 
43437 
     | 
    
         
             
                  }
         
     | 
| 
       43438 
     | 
    
         
            -
                   
     | 
| 
       43439 
     | 
    
         
            -
                    if (typeof this. 
     | 
| 
       43440 
     | 
    
         
            -
                      return this. 
     | 
| 
      
 43438 
     | 
    
         
            +
                  jsonSelectIdentifier(identifier, sql2) {
         
     | 
| 
      
 43439 
     | 
    
         
            +
                    if (typeof this.forJsonSelect === "function")
         
     | 
| 
      
 43440 
     | 
    
         
            +
                      return this.forJsonSelect(identifier, sql2);
         
     | 
| 
       43441 
43441 
     | 
    
         
             
                    const rawType = this.getSQLType().toLowerCase();
         
     | 
| 
       43442 
43442 
     | 
    
         
             
                    const parenPos = rawType.indexOf("(");
         
     | 
| 
       43443 
43443 
     | 
    
         
             
                    const type = parenPos + 1 ? rawType.slice(0, parenPos) : rawType;
         
     | 
| 
         @@ -43449,10 +43449,10 @@ var init_custom4 = __esm({ 
     | 
|
| 
       43449 
43449 
     | 
    
         
             
                      case "decimal":
         
     | 
| 
       43450 
43450 
     | 
    
         
             
                      case "float":
         
     | 
| 
       43451 
43451 
     | 
    
         
             
                      case "bigint": {
         
     | 
| 
       43452 
     | 
    
         
            -
                        return sql2`cast(${ 
     | 
| 
      
 43452 
     | 
    
         
            +
                        return sql2`cast(${identifier} as char)`;
         
     | 
| 
       43453 
43453 
     | 
    
         
             
                      }
         
     | 
| 
       43454 
43454 
     | 
    
         
             
                      default: {
         
     | 
| 
       43455 
     | 
    
         
            -
                        return  
     | 
| 
      
 43455 
     | 
    
         
            +
                        return identifier;
         
     | 
| 
       43456 
43456 
     | 
    
         
             
                      }
         
     | 
| 
       43457 
43457 
     | 
    
         
             
                    }
         
     | 
| 
       43458 
43458 
     | 
    
         
             
                  }
         
     | 
    
        package/bin.cjs
    CHANGED
    
    | 
         @@ -92729,7 +92729,7 @@ init_utils5(); 
     | 
|
| 
       92729 
92729 
     | 
    
         
             
            var version2 = async () => {
         
     | 
| 
       92730 
92730 
     | 
    
         
             
              const { npmVersion } = await ormCoreVersions();
         
     | 
| 
       92731 
92731 
     | 
    
         
             
              const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
         
     | 
| 
       92732 
     | 
    
         
            -
              const envVersion = "1.0.0-beta.1- 
     | 
| 
      
 92732 
     | 
    
         
            +
              const envVersion = "1.0.0-beta.1-03aea0b";
         
     | 
| 
       92733 
92733 
     | 
    
         
             
              const kitVersion = envVersion ? `v${envVersion}` : "--";
         
     | 
| 
       92734 
92734 
     | 
    
         
             
              const versions = `drizzle-kit: ${kitVersion}
         
     | 
| 
       92735 
92735 
     | 
    
         
             
            ${ormVersion}`;
         
     |