drizzle-orm 0.36.0 → 0.36.1-bc6e8f5
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/README.md +8 -8
- package/mysql-core/columns/decimal.cjs +12 -7
- package/mysql-core/columns/decimal.cjs.map +1 -1
- package/mysql-core/columns/decimal.d.cts +3 -1
- package/mysql-core/columns/decimal.d.ts +3 -1
- package/mysql-core/columns/decimal.js +12 -7
- package/mysql-core/columns/decimal.js.map +1 -1
- package/mysql-core/columns/double.cjs +7 -3
- package/mysql-core/columns/double.cjs.map +1 -1
- package/mysql-core/columns/double.d.cts +4 -2
- package/mysql-core/columns/double.d.ts +4 -2
- package/mysql-core/columns/double.js +7 -3
- package/mysql-core/columns/double.js.map +1 -1
- package/mysql-core/columns/float.cjs +20 -4
- package/mysql-core/columns/float.cjs.map +1 -1
- package/mysql-core/columns/float.d.cts +13 -4
- package/mysql-core/columns/float.d.ts +13 -4
- package/mysql-core/columns/float.js +20 -4
- package/mysql-core/columns/float.js.map +1 -1
- package/mysql-core/query-builders/insert.cjs +1 -1
- package/mysql-core/query-builders/insert.cjs.map +1 -1
- package/mysql-core/query-builders/insert.js +2 -2
- package/mysql-core/query-builders/insert.js.map +1 -1
- package/mysql-core/query-builders/select.cjs.map +1 -1
- package/mysql-core/query-builders/select.d.cts +3 -3
- package/mysql-core/query-builders/select.d.ts +3 -3
- package/mysql-core/query-builders/select.js.map +1 -1
- package/package.json +49 -49
- package/sql/sql.cjs +4 -1
- package/sql/sql.cjs.map +1 -1
- package/sql/sql.js +5 -2
- package/sql/sql.js.map +1 -1
- package/sqlite-core/columns/blob.cjs +2 -2
- package/sqlite-core/columns/blob.cjs.map +1 -1
- package/sqlite-core/columns/blob.d.cts +2 -2
- package/sqlite-core/columns/blob.d.ts +2 -2
- package/sqlite-core/columns/blob.js +2 -2
- package/sqlite-core/columns/blob.js.map +1 -1
- package/supabase/rls.cjs +8 -1
- package/supabase/rls.cjs.map +1 -1
- package/supabase/rls.d.cts +112 -0
- package/supabase/rls.d.ts +112 -0
- package/supabase/rls.js +9 -2
- package/supabase/rls.js.map +1 -1
- package/version.cjs +1 -1
- package/version.d.cts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
|
|
18
18
|
### What's Drizzle?
|
|
19
19
|
Drizzle is a modern TypeScript ORM developers [wanna use in their next project](https://stateofdb.com/tools/drizzle).
|
|
20
|
-
It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, it's tree shakeable with exactly 0 dependencies.
|
|
20
|
+
It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, and it's tree shakeable with exactly 0 dependencies.
|
|
21
21
|
|
|
22
|
-
**Drizzle supports every PostgreSQL, MySQL and SQLite
|
|
22
|
+
**Drizzle supports every PostgreSQL, MySQL and SQLite database**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](xata.io), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.
|
|
23
23
|
|
|
24
|
-
**Drizzle is serverless-ready by design
|
|
25
|
-
With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks)
|
|
24
|
+
**Drizzle is serverless-ready by design**. It works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime, and even in browsers.
|
|
25
|
+
With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks) and save time and costs while never introducing any data proxies into your infrastructure.
|
|
26
26
|
|
|
27
|
-
While you can use Drizzle as a JavaScript library, it shines
|
|
27
|
+
While you can use Drizzle as a JavaScript library, it shines with TypeScript. It lets you [**declare SQL schemas**](https://orm.drizzle.team/docs/sql-schema-declaration) and build both [**relational**](https://orm.drizzle.team/docs/rqb) and [**SQL-like queries**](https://orm.drizzle.team/docs/select), while keeping the balance between type-safety and extensibility for toolmakers to build on top.
|
|
28
28
|
|
|
29
29
|
### Ecosystem
|
|
30
30
|
While Drizzle ORM remains a thin typed layer on top of SQL, we made a set of tools for people to have best possible developer experience.
|
|
31
31
|
|
|
32
|
-
Drizzle comes with a powerful [**Drizzle Kit**](https://orm.drizzle.team/kit-docs/overview) CLI companion for you to have
|
|
32
|
+
Drizzle comes with a powerful [**Drizzle Kit**](https://orm.drizzle.team/kit-docs/overview) CLI companion for you to have hassle-free migrations. It can generate SQL migration files for you or apply schema changes directly to the database.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
We also have [**Drizzle Studio**](https://orm.drizzle.team/drizzle-studio/overview) for you to effortlessly browse and manipulate data in your database of choice.
|
|
35
35
|
|
|
36
36
|
### Documentation
|
|
37
|
-
Check out the full documentation on [the website](https://orm.drizzle.team/docs/overview)
|
|
37
|
+
Check out the full documentation on [the website](https://orm.drizzle.team/docs/overview).
|
|
38
38
|
|
|
39
39
|
### Our sponsors ❤️
|
|
40
40
|
<p align="center">
|
|
@@ -28,10 +28,11 @@ var import_utils = require("../../utils.cjs");
|
|
|
28
28
|
var import_common = require("./common.cjs");
|
|
29
29
|
class MySqlDecimalBuilder extends import_common.MySqlColumnBuilderWithAutoIncrement {
|
|
30
30
|
static [import_entity.entityKind] = "MySqlDecimalBuilder";
|
|
31
|
-
constructor(name,
|
|
31
|
+
constructor(name, config) {
|
|
32
32
|
super(name, "string", "MySqlDecimal");
|
|
33
|
-
this.config.precision = precision;
|
|
34
|
-
this.config.scale = scale;
|
|
33
|
+
this.config.precision = config?.precision;
|
|
34
|
+
this.config.scale = config?.scale;
|
|
35
|
+
this.config.unsigned = config?.unsigned;
|
|
35
36
|
}
|
|
36
37
|
/** @internal */
|
|
37
38
|
build(table) {
|
|
@@ -45,19 +46,23 @@ class MySqlDecimal extends import_common.MySqlColumnWithAutoIncrement {
|
|
|
45
46
|
static [import_entity.entityKind] = "MySqlDecimal";
|
|
46
47
|
precision = this.config.precision;
|
|
47
48
|
scale = this.config.scale;
|
|
49
|
+
unsigned = this.config.unsigned;
|
|
48
50
|
getSQLType() {
|
|
51
|
+
let type = "";
|
|
49
52
|
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
50
|
-
|
|
53
|
+
type += `decimal(${this.precision},${this.scale})`;
|
|
51
54
|
} else if (this.precision === void 0) {
|
|
52
|
-
|
|
55
|
+
type += "decimal";
|
|
53
56
|
} else {
|
|
54
|
-
|
|
57
|
+
type += `decimal(${this.precision})`;
|
|
55
58
|
}
|
|
59
|
+
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
|
|
60
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
function decimal(a, b = {}) {
|
|
59
64
|
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
60
|
-
return new MySqlDecimalBuilder(name, config
|
|
65
|
+
return new MySqlDecimalBuilder(name, config);
|
|
61
66
|
}
|
|
62
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
68
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/decimal.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MySqlDecimal';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDecimalBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>,\n> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {\n\tstatic override readonly [entityKind]: string = 'MySqlDecimalBuilder';\n\n\tconstructor(name: T['name'],
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/decimal.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MySqlDecimal';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDecimalBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>,\n> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {\n\tstatic override readonly [entityKind]: string = 'MySqlDecimalBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDecimalConfig | undefined) {\n\t\tsuper(name, 'string', 'MySqlDecimal');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDecimal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDecimal<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class MySqlDecimal<T extends ColumnBaseConfig<'string', 'MySqlDecimal'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDecimalConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDecimal';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `decimal(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'decimal';\n\t\t} else {\n\t\t\ttype += `decimal(${this.precision})`;\n\t\t}\n\t\ttype = type === 'decimal(10,0)' || type === 'decimal(10)' ? 'decimal' : type;\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlDecimalConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function decimal(): MySqlDecimalBuilderInitial<''>;\nexport function decimal(\n\tconfig: MySqlDecimalConfig,\n): MySqlDecimalBuilderInitial<''>;\nexport function decimal<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlDecimalConfig,\n): MySqlDecimalBuilderInitial<TName>;\nexport function decimal(a?: string | MySqlDecimalConfig, b: MySqlDecimalConfig = {}) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlDecimalConfig>(a, b);\n\treturn new MySqlDecimalBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAAkF;AAY3E,MAAM,4BAEH,kDAA2D;AAAA,EACpE,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAwC;AACpE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,2CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,WAAW,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAChD,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,WAAW,KAAK,SAAS;AAAA,IAClC;AACA,WAAO,SAAS,mBAAmB,SAAS,gBAAgB,YAAY;AACxE,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,QAAQ,GAAiC,IAAwB,CAAC,GAAG;AACpF,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,MAAM;AAC5C;","names":[]}
|
|
@@ -13,17 +13,19 @@ export type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuild
|
|
|
13
13
|
}>;
|
|
14
14
|
export declare class MySqlDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {
|
|
15
15
|
static readonly [entityKind]: string;
|
|
16
|
-
constructor(name: T['name'],
|
|
16
|
+
constructor(name: T['name'], config: MySqlDecimalConfig | undefined);
|
|
17
17
|
}
|
|
18
18
|
export declare class MySqlDecimal<T extends ColumnBaseConfig<'string', 'MySqlDecimal'>> extends MySqlColumnWithAutoIncrement<T, MySqlDecimalConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
20
|
readonly precision: number | undefined;
|
|
21
21
|
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
22
23
|
getSQLType(): string;
|
|
23
24
|
}
|
|
24
25
|
export interface MySqlDecimalConfig {
|
|
25
26
|
precision?: number;
|
|
26
27
|
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare function decimal(): MySqlDecimalBuilderInitial<''>;
|
|
29
31
|
export declare function decimal(config: MySqlDecimalConfig): MySqlDecimalBuilderInitial<''>;
|
|
@@ -13,17 +13,19 @@ export type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuild
|
|
|
13
13
|
}>;
|
|
14
14
|
export declare class MySqlDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {
|
|
15
15
|
static readonly [entityKind]: string;
|
|
16
|
-
constructor(name: T['name'],
|
|
16
|
+
constructor(name: T['name'], config: MySqlDecimalConfig | undefined);
|
|
17
17
|
}
|
|
18
18
|
export declare class MySqlDecimal<T extends ColumnBaseConfig<'string', 'MySqlDecimal'>> extends MySqlColumnWithAutoIncrement<T, MySqlDecimalConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
20
|
readonly precision: number | undefined;
|
|
21
21
|
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
22
23
|
getSQLType(): string;
|
|
23
24
|
}
|
|
24
25
|
export interface MySqlDecimalConfig {
|
|
25
26
|
precision?: number;
|
|
26
27
|
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare function decimal(): MySqlDecimalBuilderInitial<''>;
|
|
29
31
|
export declare function decimal(config: MySqlDecimalConfig): MySqlDecimalBuilderInitial<''>;
|
|
@@ -3,10 +3,11 @@ import { getColumnNameAndConfig } from "../../utils.js";
|
|
|
3
3
|
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
|
|
4
4
|
class MySqlDecimalBuilder extends MySqlColumnBuilderWithAutoIncrement {
|
|
5
5
|
static [entityKind] = "MySqlDecimalBuilder";
|
|
6
|
-
constructor(name,
|
|
6
|
+
constructor(name, config) {
|
|
7
7
|
super(name, "string", "MySqlDecimal");
|
|
8
|
-
this.config.precision = precision;
|
|
9
|
-
this.config.scale = scale;
|
|
8
|
+
this.config.precision = config?.precision;
|
|
9
|
+
this.config.scale = config?.scale;
|
|
10
|
+
this.config.unsigned = config?.unsigned;
|
|
10
11
|
}
|
|
11
12
|
/** @internal */
|
|
12
13
|
build(table) {
|
|
@@ -20,19 +21,23 @@ class MySqlDecimal extends MySqlColumnWithAutoIncrement {
|
|
|
20
21
|
static [entityKind] = "MySqlDecimal";
|
|
21
22
|
precision = this.config.precision;
|
|
22
23
|
scale = this.config.scale;
|
|
24
|
+
unsigned = this.config.unsigned;
|
|
23
25
|
getSQLType() {
|
|
26
|
+
let type = "";
|
|
24
27
|
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
25
|
-
|
|
28
|
+
type += `decimal(${this.precision},${this.scale})`;
|
|
26
29
|
} else if (this.precision === void 0) {
|
|
27
|
-
|
|
30
|
+
type += "decimal";
|
|
28
31
|
} else {
|
|
29
|
-
|
|
32
|
+
type += `decimal(${this.precision})`;
|
|
30
33
|
}
|
|
34
|
+
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
|
|
35
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
function decimal(a, b = {}) {
|
|
34
39
|
const { name, config } = getColumnNameAndConfig(a, b);
|
|
35
|
-
return new MySqlDecimalBuilder(name, config
|
|
40
|
+
return new MySqlDecimalBuilder(name, config);
|
|
36
41
|
}
|
|
37
42
|
export {
|
|
38
43
|
MySqlDecimal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/decimal.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MySqlDecimal';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDecimalBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>,\n> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {\n\tstatic override readonly [entityKind]: string = 'MySqlDecimalBuilder';\n\n\tconstructor(name: T['name'],
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/decimal.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MySqlDecimal';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDecimalBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'MySqlDecimal'>,\n> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlDecimalConfig> {\n\tstatic override readonly [entityKind]: string = 'MySqlDecimalBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDecimalConfig | undefined) {\n\t\tsuper(name, 'string', 'MySqlDecimal');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDecimal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDecimal<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class MySqlDecimal<T extends ColumnBaseConfig<'string', 'MySqlDecimal'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDecimalConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDecimal';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `decimal(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'decimal';\n\t\t} else {\n\t\t\ttype += `decimal(${this.precision})`;\n\t\t}\n\t\ttype = type === 'decimal(10,0)' || type === 'decimal(10)' ? 'decimal' : type;\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlDecimalConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function decimal(): MySqlDecimalBuilderInitial<''>;\nexport function decimal(\n\tconfig: MySqlDecimalConfig,\n): MySqlDecimalBuilderInitial<''>;\nexport function decimal<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlDecimalConfig,\n): MySqlDecimalBuilderInitial<TName>;\nexport function decimal(a?: string | MySqlDecimalConfig, b: MySqlDecimalConfig = {}) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlDecimalConfig>(a, b);\n\treturn new MySqlDecimalBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,qCAAqC,oCAAoC;AAY3E,MAAM,4BAEH,oCAA2D;AAAA,EACpE,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAwC;AACpE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,6BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,WAAW,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAChD,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,WAAW,KAAK,SAAS;AAAA,IAClC;AACA,WAAO,SAAS,mBAAmB,SAAS,gBAAgB,YAAY;AACxE,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,QAAQ,GAAiC,IAAwB,CAAC,GAAG;AACpF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,MAAM;AAC5C;","names":[]}
|
|
@@ -32,6 +32,7 @@ class MySqlDoubleBuilder extends import_common.MySqlColumnBuilderWithAutoIncreme
|
|
|
32
32
|
super(name, "number", "MySqlDouble");
|
|
33
33
|
this.config.precision = config?.precision;
|
|
34
34
|
this.config.scale = config?.scale;
|
|
35
|
+
this.config.unsigned = config?.unsigned;
|
|
35
36
|
}
|
|
36
37
|
/** @internal */
|
|
37
38
|
build(table) {
|
|
@@ -42,14 +43,17 @@ class MySqlDouble extends import_common.MySqlColumnWithAutoIncrement {
|
|
|
42
43
|
static [import_entity.entityKind] = "MySqlDouble";
|
|
43
44
|
precision = this.config.precision;
|
|
44
45
|
scale = this.config.scale;
|
|
46
|
+
unsigned = this.config.unsigned;
|
|
45
47
|
getSQLType() {
|
|
48
|
+
let type = "";
|
|
46
49
|
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
47
|
-
|
|
50
|
+
type += `double(${this.precision},${this.scale})`;
|
|
48
51
|
} else if (this.precision === void 0) {
|
|
49
|
-
|
|
52
|
+
type += "double";
|
|
50
53
|
} else {
|
|
51
|
-
|
|
54
|
+
type += `double(${this.precision})`;
|
|
52
55
|
}
|
|
56
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
function double(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/double.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlDouble';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDoubleBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDoubleConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlDouble');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDouble<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDouble<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDouble';\n\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/double.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlDouble';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDoubleBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDoubleConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlDouble');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDouble<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDouble<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDouble';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `double(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'double';\n\t\t} else {\n\t\t\ttype += `double(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlDoubleConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function double(): MySqlDoubleBuilderInitial<''>;\nexport function double(\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<''>;\nexport function double<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<TName>;\nexport function double(a?: string | MySqlDoubleConfig, b?: MySqlDoubleConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlDoubleConfig>(a, b);\n\treturn new MySqlDoubleBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAAkF;AAY3E,MAAM,2BACJ,kDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAuC;AACnE,UAAM,MAAM,UAAU,aAAa;AACnC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBACJ,2CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,UAAU,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC/C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,UAAU,KAAK,SAAS;AAAA,IACjC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,OAAO,GAAgC,GAAuB;AAC7E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA0C,GAAG,CAAC;AACvE,SAAO,IAAI,mBAAmB,MAAM,MAAM;AAC3C;","names":[]}
|
|
@@ -17,13 +17,15 @@ export declare class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'numbe
|
|
|
17
17
|
}
|
|
18
18
|
export declare class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>> extends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
|
-
precision: number | undefined;
|
|
21
|
-
scale: number | undefined;
|
|
20
|
+
readonly precision: number | undefined;
|
|
21
|
+
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
22
23
|
getSQLType(): string;
|
|
23
24
|
}
|
|
24
25
|
export interface MySqlDoubleConfig {
|
|
25
26
|
precision?: number;
|
|
26
27
|
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare function double(): MySqlDoubleBuilderInitial<''>;
|
|
29
31
|
export declare function double(config?: MySqlDoubleConfig): MySqlDoubleBuilderInitial<''>;
|
|
@@ -17,13 +17,15 @@ export declare class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'numbe
|
|
|
17
17
|
}
|
|
18
18
|
export declare class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>> extends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
|
-
precision: number | undefined;
|
|
21
|
-
scale: number | undefined;
|
|
20
|
+
readonly precision: number | undefined;
|
|
21
|
+
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
22
23
|
getSQLType(): string;
|
|
23
24
|
}
|
|
24
25
|
export interface MySqlDoubleConfig {
|
|
25
26
|
precision?: number;
|
|
26
27
|
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare function double(): MySqlDoubleBuilderInitial<''>;
|
|
29
31
|
export declare function double(config?: MySqlDoubleConfig): MySqlDoubleBuilderInitial<''>;
|
|
@@ -7,6 +7,7 @@ class MySqlDoubleBuilder extends MySqlColumnBuilderWithAutoIncrement {
|
|
|
7
7
|
super(name, "number", "MySqlDouble");
|
|
8
8
|
this.config.precision = config?.precision;
|
|
9
9
|
this.config.scale = config?.scale;
|
|
10
|
+
this.config.unsigned = config?.unsigned;
|
|
10
11
|
}
|
|
11
12
|
/** @internal */
|
|
12
13
|
build(table) {
|
|
@@ -17,14 +18,17 @@ class MySqlDouble extends MySqlColumnWithAutoIncrement {
|
|
|
17
18
|
static [entityKind] = "MySqlDouble";
|
|
18
19
|
precision = this.config.precision;
|
|
19
20
|
scale = this.config.scale;
|
|
21
|
+
unsigned = this.config.unsigned;
|
|
20
22
|
getSQLType() {
|
|
23
|
+
let type = "";
|
|
21
24
|
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
22
|
-
|
|
25
|
+
type += `double(${this.precision},${this.scale})`;
|
|
23
26
|
} else if (this.precision === void 0) {
|
|
24
|
-
|
|
27
|
+
type += "double";
|
|
25
28
|
} else {
|
|
26
|
-
|
|
29
|
+
type += `double(${this.precision})`;
|
|
27
30
|
}
|
|
31
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
function double(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/double.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlDouble';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDoubleBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDoubleConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlDouble');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDouble<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDouble<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDouble';\n\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/double.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlDouble';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDoubleBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDoubleConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlDouble');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDouble<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDouble<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDouble';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `double(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'double';\n\t\t} else {\n\t\t\ttype += `double(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlDoubleConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function double(): MySqlDoubleBuilderInitial<''>;\nexport function double(\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<''>;\nexport function double<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<TName>;\nexport function double(a?: string | MySqlDoubleConfig, b?: MySqlDoubleConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlDoubleConfig>(a, b);\n\treturn new MySqlDoubleBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,qCAAqC,oCAAoC;AAY3E,MAAM,2BACJ,oCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAuC;AACnE,UAAM,MAAM,UAAU,aAAa;AACnC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBACJ,6BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,UAAU,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC/C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,UAAU,KAAK,SAAS;AAAA,IACjC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,OAAO,GAAgC,GAAuB;AAC7E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA0C,GAAG,CAAC;AACvE,SAAO,IAAI,mBAAmB,MAAM,MAAM;AAC3C;","names":[]}
|
|
@@ -24,11 +24,15 @@ __export(float_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(float_exports);
|
|
26
26
|
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_utils = require("../../utils.cjs");
|
|
27
28
|
var import_common = require("./common.cjs");
|
|
28
29
|
class MySqlFloatBuilder extends import_common.MySqlColumnBuilderWithAutoIncrement {
|
|
29
30
|
static [import_entity.entityKind] = "MySqlFloatBuilder";
|
|
30
|
-
constructor(name) {
|
|
31
|
+
constructor(name, config) {
|
|
31
32
|
super(name, "number", "MySqlFloat");
|
|
33
|
+
this.config.precision = config?.precision;
|
|
34
|
+
this.config.scale = config?.scale;
|
|
35
|
+
this.config.unsigned = config?.unsigned;
|
|
32
36
|
}
|
|
33
37
|
/** @internal */
|
|
34
38
|
build(table) {
|
|
@@ -37,12 +41,24 @@ class MySqlFloatBuilder extends import_common.MySqlColumnBuilderWithAutoIncremen
|
|
|
37
41
|
}
|
|
38
42
|
class MySqlFloat extends import_common.MySqlColumnWithAutoIncrement {
|
|
39
43
|
static [import_entity.entityKind] = "MySqlFloat";
|
|
44
|
+
precision = this.config.precision;
|
|
45
|
+
scale = this.config.scale;
|
|
46
|
+
unsigned = this.config.unsigned;
|
|
40
47
|
getSQLType() {
|
|
41
|
-
|
|
48
|
+
let type = "";
|
|
49
|
+
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
50
|
+
type += `float(${this.precision},${this.scale})`;
|
|
51
|
+
} else if (this.precision === void 0) {
|
|
52
|
+
type += "float";
|
|
53
|
+
} else {
|
|
54
|
+
type += `float(${this.precision})`;
|
|
55
|
+
}
|
|
56
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
42
57
|
}
|
|
43
58
|
}
|
|
44
|
-
function float(
|
|
45
|
-
|
|
59
|
+
function float(a, b) {
|
|
60
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
61
|
+
return new MySqlFloatBuilder(name, config);
|
|
46
62
|
}
|
|
47
63
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
64
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/float.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlFloat';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloatBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MySqlFloat');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlFloat<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlFloat<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/float.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlFloat';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloatBuilder';\n\n\tconstructor(name: T['name'], config: MySqlFloatConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlFloat');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlFloat<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlFloat<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloat';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `float(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'float';\n\t\t} else {\n\t\t\ttype += `float(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlFloatConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function float(): MySqlFloatBuilderInitial<''>;\nexport function float(\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<''>;\nexport function float<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<TName>;\nexport function float(a?: string | MySqlFloatConfig, b?: MySqlFloatConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlFloatConfig>(a, b);\n\treturn new MySqlFloatBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAAkF;AAY3E,MAAM,0BACJ,kDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAsC;AAClE,UAAM,MAAM,UAAU,YAAY;AAClC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBACJ,2CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC9C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,SAAS,KAAK,SAAS;AAAA,IAChC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,MAAM,GAA+B,GAAsB;AAC1E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAyC,GAAG,CAAC;AACtE,SAAO,IAAI,kBAAkB,MAAM,MAAM;AAC1C;","names":[]}
|
|
@@ -11,13 +11,22 @@ export type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{
|
|
|
11
11
|
enumValues: undefined;
|
|
12
12
|
generated: undefined;
|
|
13
13
|
}>;
|
|
14
|
-
export declare class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnBuilderWithAutoIncrement<T> {
|
|
14
|
+
export declare class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig> {
|
|
15
15
|
static readonly [entityKind]: string;
|
|
16
|
-
constructor(name: T['name']);
|
|
16
|
+
constructor(name: T['name'], config: MySqlFloatConfig | undefined);
|
|
17
17
|
}
|
|
18
|
-
export declare class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnWithAutoIncrement<T> {
|
|
18
|
+
export declare class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
|
+
readonly precision: number | undefined;
|
|
21
|
+
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
20
23
|
getSQLType(): string;
|
|
21
24
|
}
|
|
25
|
+
export interface MySqlFloatConfig {
|
|
26
|
+
precision?: number;
|
|
27
|
+
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
29
|
+
}
|
|
22
30
|
export declare function float(): MySqlFloatBuilderInitial<''>;
|
|
23
|
-
export declare function float
|
|
31
|
+
export declare function float(config?: MySqlFloatConfig): MySqlFloatBuilderInitial<''>;
|
|
32
|
+
export declare function float<TName extends string>(name: TName, config?: MySqlFloatConfig): MySqlFloatBuilderInitial<TName>;
|
|
@@ -11,13 +11,22 @@ export type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{
|
|
|
11
11
|
enumValues: undefined;
|
|
12
12
|
generated: undefined;
|
|
13
13
|
}>;
|
|
14
|
-
export declare class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnBuilderWithAutoIncrement<T> {
|
|
14
|
+
export declare class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig> {
|
|
15
15
|
static readonly [entityKind]: string;
|
|
16
|
-
constructor(name: T['name']);
|
|
16
|
+
constructor(name: T['name'], config: MySqlFloatConfig | undefined);
|
|
17
17
|
}
|
|
18
|
-
export declare class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnWithAutoIncrement<T> {
|
|
18
|
+
export declare class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig> {
|
|
19
19
|
static readonly [entityKind]: string;
|
|
20
|
+
readonly precision: number | undefined;
|
|
21
|
+
readonly scale: number | undefined;
|
|
22
|
+
readonly unsigned: boolean | undefined;
|
|
20
23
|
getSQLType(): string;
|
|
21
24
|
}
|
|
25
|
+
export interface MySqlFloatConfig {
|
|
26
|
+
precision?: number;
|
|
27
|
+
scale?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
29
|
+
}
|
|
22
30
|
export declare function float(): MySqlFloatBuilderInitial<''>;
|
|
23
|
-
export declare function float
|
|
31
|
+
export declare function float(config?: MySqlFloatConfig): MySqlFloatBuilderInitial<''>;
|
|
32
|
+
export declare function float<TName extends string>(name: TName, config?: MySqlFloatConfig): MySqlFloatBuilderInitial<TName>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { getColumnNameAndConfig } from "../../utils.js";
|
|
2
3
|
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
|
|
3
4
|
class MySqlFloatBuilder extends MySqlColumnBuilderWithAutoIncrement {
|
|
4
5
|
static [entityKind] = "MySqlFloatBuilder";
|
|
5
|
-
constructor(name) {
|
|
6
|
+
constructor(name, config) {
|
|
6
7
|
super(name, "number", "MySqlFloat");
|
|
8
|
+
this.config.precision = config?.precision;
|
|
9
|
+
this.config.scale = config?.scale;
|
|
10
|
+
this.config.unsigned = config?.unsigned;
|
|
7
11
|
}
|
|
8
12
|
/** @internal */
|
|
9
13
|
build(table) {
|
|
@@ -12,12 +16,24 @@ class MySqlFloatBuilder extends MySqlColumnBuilderWithAutoIncrement {
|
|
|
12
16
|
}
|
|
13
17
|
class MySqlFloat extends MySqlColumnWithAutoIncrement {
|
|
14
18
|
static [entityKind] = "MySqlFloat";
|
|
19
|
+
precision = this.config.precision;
|
|
20
|
+
scale = this.config.scale;
|
|
21
|
+
unsigned = this.config.unsigned;
|
|
15
22
|
getSQLType() {
|
|
16
|
-
|
|
23
|
+
let type = "";
|
|
24
|
+
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
25
|
+
type += `float(${this.precision},${this.scale})`;
|
|
26
|
+
} else if (this.precision === void 0) {
|
|
27
|
+
type += "float";
|
|
28
|
+
} else {
|
|
29
|
+
type += `float(${this.precision})`;
|
|
30
|
+
}
|
|
31
|
+
return this.unsigned ? `${type} unsigned` : type;
|
|
17
32
|
}
|
|
18
33
|
}
|
|
19
|
-
function float(
|
|
20
|
-
|
|
34
|
+
function float(a, b) {
|
|
35
|
+
const { name, config } = getColumnNameAndConfig(a, b);
|
|
36
|
+
return new MySqlFloatBuilder(name, config);
|
|
21
37
|
}
|
|
22
38
|
export {
|
|
23
39
|
MySqlFloat,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mysql-core/columns/float.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlFloat';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloatBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MySqlFloat');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlFloat<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlFloat<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'
|
|
1
|
+
{"version":3,"sources":["../../../src/mysql-core/columns/float.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlFloat';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloatBuilder';\n\n\tconstructor(name: T['name'], config: MySqlFloatConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlFloat');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlFloat<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlFloat<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloat';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `float(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'float';\n\t\t} else {\n\t\t\ttype += `float(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlFloatConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function float(): MySqlFloatBuilderInitial<''>;\nexport function float(\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<''>;\nexport function float<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<TName>;\nexport function float(a?: string | MySqlFloatConfig, b?: MySqlFloatConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlFloatConfig>(a, b);\n\treturn new MySqlFloatBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,qCAAqC,oCAAoC;AAY3E,MAAM,0BACJ,oCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAsC;AAClE,UAAM,MAAM,UAAU,YAAY;AAClC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBACJ,6BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC9C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,SAAS,KAAK,SAAS;AAAA,IAChC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,MAAM,GAA+B,GAAsB;AAC1E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAyC,GAAG,CAAC;AACtE,SAAO,IAAI,kBAAkB,MAAM,MAAM;AAC1C;","names":[]}
|
|
@@ -103,7 +103,7 @@ class MySqlInsertBase extends import_query_promise.QueryPromise {
|
|
|
103
103
|
returning.push({ field: value, path: [key] });
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
this.config.returning =
|
|
106
|
+
this.config.returning = returning;
|
|
107
107
|
return this;
|
|
108
108
|
}
|
|
109
109
|
/** @internal */
|