drizzle-orm 0.43.0-e2b296d → 0.43.1-08e3953
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/column-builder.cjs.map +1 -1
- package/column-builder.d.cts +4 -3
- package/column-builder.d.ts +4 -3
- package/column-builder.js.map +1 -1
- package/gel-core/dialect.cjs +1 -1
- package/gel-core/dialect.cjs.map +1 -1
- package/gel-core/dialect.js +1 -1
- package/gel-core/dialect.js.map +1 -1
- package/mssql-core/alias.cjs +32 -0
- package/mssql-core/alias.cjs.map +1 -0
- package/mssql-core/alias.d.cts +4 -0
- package/mssql-core/alias.d.ts +4 -0
- package/mssql-core/alias.js +8 -0
- package/mssql-core/alias.js.map +1 -0
- package/mssql-core/checks.cjs +58 -0
- package/mssql-core/checks.cjs.map +1 -0
- package/mssql-core/checks.d.cts +18 -0
- package/mssql-core/checks.d.ts +18 -0
- package/mssql-core/checks.js +32 -0
- package/mssql-core/checks.js.map +1 -0
- package/mssql-core/columns/all.cjs +72 -0
- package/mssql-core/columns/all.cjs.map +1 -0
- package/mssql-core/columns/all.d.cts +43 -0
- package/mssql-core/columns/all.d.ts +43 -0
- package/mssql-core/columns/all.js +48 -0
- package/mssql-core/columns/all.js.map +1 -0
- package/mssql-core/columns/bigint.cjs +67 -0
- package/mssql-core/columns/bigint.cjs.map +1 -0
- package/mssql-core/columns/bigint.d.cts +33 -0
- package/mssql-core/columns/bigint.d.ts +33 -0
- package/mssql-core/columns/bigint.js +41 -0
- package/mssql-core/columns/bigint.js.map +1 -0
- package/mssql-core/columns/binary.cjs +57 -0
- package/mssql-core/columns/binary.cjs.map +1 -0
- package/mssql-core/columns/binary.d.cts +28 -0
- package/mssql-core/columns/binary.d.ts +28 -0
- package/mssql-core/columns/binary.js +31 -0
- package/mssql-core/columns/binary.js.map +1 -0
- package/mssql-core/columns/bit.cjs +54 -0
- package/mssql-core/columns/bit.cjs.map +1 -0
- package/mssql-core/columns/bit.d.cts +24 -0
- package/mssql-core/columns/bit.d.ts +24 -0
- package/mssql-core/columns/bit.js +28 -0
- package/mssql-core/columns/bit.js.map +1 -0
- package/mssql-core/columns/char.cjs +74 -0
- package/mssql-core/columns/char.cjs.map +1 -0
- package/mssql-core/columns/char.d.cts +37 -0
- package/mssql-core/columns/char.d.ts +37 -0
- package/mssql-core/columns/char.js +47 -0
- package/mssql-core/columns/char.js.map +1 -0
- package/mssql-core/columns/common.cjs +117 -0
- package/mssql-core/columns/common.cjs.map +1 -0
- package/mssql-core/columns/common.d.cts +67 -0
- package/mssql-core/columns/common.d.ts +67 -0
- package/mssql-core/columns/common.js +90 -0
- package/mssql-core/columns/common.js.map +1 -0
- package/mssql-core/columns/custom.cjs +75 -0
- package/mssql-core/columns/custom.cjs.map +1 -0
- package/mssql-core/columns/custom.d.cts +149 -0
- package/mssql-core/columns/custom.d.ts +149 -0
- package/mssql-core/columns/custom.js +49 -0
- package/mssql-core/columns/custom.js.map +1 -0
- package/mssql-core/columns/date.cjs +94 -0
- package/mssql-core/columns/date.cjs.map +1 -0
- package/mssql-core/columns/date.common.cjs +37 -0
- package/mssql-core/columns/date.common.cjs.map +1 -0
- package/mssql-core/columns/date.common.d.cts +12 -0
- package/mssql-core/columns/date.common.d.ts +12 -0
- package/mssql-core/columns/date.common.js +13 -0
- package/mssql-core/columns/date.common.js.map +1 -0
- package/mssql-core/columns/date.d.cts +55 -0
- package/mssql-core/columns/date.d.ts +55 -0
- package/mssql-core/columns/date.js +66 -0
- package/mssql-core/columns/date.js.map +1 -0
- package/mssql-core/columns/datetime.cjs +94 -0
- package/mssql-core/columns/datetime.cjs.map +1 -0
- package/mssql-core/columns/datetime.d.cts +54 -0
- package/mssql-core/columns/datetime.d.ts +54 -0
- package/mssql-core/columns/datetime.js +66 -0
- package/mssql-core/columns/datetime.js.map +1 -0
- package/mssql-core/columns/datetime2.cjs +102 -0
- package/mssql-core/columns/datetime2.cjs.map +1 -0
- package/mssql-core/columns/datetime2.d.cts +54 -0
- package/mssql-core/columns/datetime2.d.ts +54 -0
- package/mssql-core/columns/datetime2.js +74 -0
- package/mssql-core/columns/datetime2.js.map +1 -0
- package/mssql-core/columns/datetimeoffset.cjs +102 -0
- package/mssql-core/columns/datetimeoffset.cjs.map +1 -0
- package/mssql-core/columns/datetimeoffset.d.cts +54 -0
- package/mssql-core/columns/datetimeoffset.d.ts +54 -0
- package/mssql-core/columns/datetimeoffset.js +74 -0
- package/mssql-core/columns/datetimeoffset.js.map +1 -0
- package/mssql-core/columns/decimal.cjs +68 -0
- package/mssql-core/columns/decimal.cjs.map +1 -0
- package/mssql-core/columns/decimal.d.cts +30 -0
- package/mssql-core/columns/decimal.d.ts +30 -0
- package/mssql-core/columns/decimal.js +42 -0
- package/mssql-core/columns/decimal.js.map +1 -0
- package/mssql-core/columns/float.cjs +58 -0
- package/mssql-core/columns/float.cjs.map +1 -0
- package/mssql-core/columns/float.d.cts +28 -0
- package/mssql-core/columns/float.d.ts +28 -0
- package/mssql-core/columns/float.js +32 -0
- package/mssql-core/columns/float.js.map +1 -0
- package/mssql-core/columns/index.cjs +63 -0
- package/mssql-core/columns/index.cjs.map +1 -0
- package/mssql-core/columns/index.d.cts +21 -0
- package/mssql-core/columns/index.d.ts +21 -0
- package/mssql-core/columns/index.js +22 -0
- package/mssql-core/columns/index.js.map +1 -0
- package/mssql-core/columns/int.cjs +53 -0
- package/mssql-core/columns/int.cjs.map +1 -0
- package/mssql-core/columns/int.d.cts +23 -0
- package/mssql-core/columns/int.d.ts +23 -0
- package/mssql-core/columns/int.js +27 -0
- package/mssql-core/columns/int.js.map +1 -0
- package/mssql-core/columns/numeric.cjs +68 -0
- package/mssql-core/columns/numeric.cjs.map +1 -0
- package/mssql-core/columns/numeric.d.cts +27 -0
- package/mssql-core/columns/numeric.d.ts +27 -0
- package/mssql-core/columns/numeric.js +42 -0
- package/mssql-core/columns/numeric.js.map +1 -0
- package/mssql-core/columns/real.cjs +53 -0
- package/mssql-core/columns/real.cjs.map +1 -0
- package/mssql-core/columns/real.d.cts +23 -0
- package/mssql-core/columns/real.d.ts +23 -0
- package/mssql-core/columns/real.js +27 -0
- package/mssql-core/columns/real.js.map +1 -0
- package/mssql-core/columns/smallint.cjs +62 -0
- package/mssql-core/columns/smallint.cjs.map +1 -0
- package/mssql-core/columns/smallint.d.cts +24 -0
- package/mssql-core/columns/smallint.d.ts +24 -0
- package/mssql-core/columns/smallint.js +36 -0
- package/mssql-core/columns/smallint.js.map +1 -0
- package/mssql-core/columns/text.cjs +68 -0
- package/mssql-core/columns/text.cjs.map +1 -0
- package/mssql-core/columns/text.d.cts +45 -0
- package/mssql-core/columns/text.d.ts +45 -0
- package/mssql-core/columns/text.js +41 -0
- package/mssql-core/columns/text.js.map +1 -0
- package/mssql-core/columns/time.cjs +90 -0
- package/mssql-core/columns/time.cjs.map +1 -0
- package/mssql-core/columns/time.d.cts +49 -0
- package/mssql-core/columns/time.d.ts +49 -0
- package/mssql-core/columns/time.js +62 -0
- package/mssql-core/columns/time.js.map +1 -0
- package/mssql-core/columns/tinyint.cjs +62 -0
- package/mssql-core/columns/tinyint.cjs.map +1 -0
- package/mssql-core/columns/tinyint.d.cts +24 -0
- package/mssql-core/columns/tinyint.d.ts +24 -0
- package/mssql-core/columns/tinyint.js +36 -0
- package/mssql-core/columns/tinyint.js.map +1 -0
- package/mssql-core/columns/varbinary.cjs +61 -0
- package/mssql-core/columns/varbinary.cjs.map +1 -0
- package/mssql-core/columns/varbinary.d.cts +27 -0
- package/mssql-core/columns/varbinary.d.ts +27 -0
- package/mssql-core/columns/varbinary.js +35 -0
- package/mssql-core/columns/varbinary.js.map +1 -0
- package/mssql-core/columns/varchar.cjs +117 -0
- package/mssql-core/columns/varchar.cjs.map +1 -0
- package/mssql-core/columns/varchar.d.cts +66 -0
- package/mssql-core/columns/varchar.d.ts +66 -0
- package/mssql-core/columns/varchar.js +88 -0
- package/mssql-core/columns/varchar.js.map +1 -0
- package/mssql-core/db.cjs +254 -0
- package/mssql-core/db.cjs.map +1 -0
- package/mssql-core/db.d.cts +228 -0
- package/mssql-core/db.d.ts +228 -0
- package/mssql-core/db.js +235 -0
- package/mssql-core/db.js.map +1 -0
- package/mssql-core/dialect.cjs +611 -0
- package/mssql-core/dialect.cjs.map +1 -0
- package/mssql-core/dialect.d.cts +58 -0
- package/mssql-core/dialect.d.ts +58 -0
- package/mssql-core/dialect.js +593 -0
- package/mssql-core/dialect.js.map +1 -0
- package/mssql-core/expressions.cjs +49 -0
- package/mssql-core/expressions.cjs.map +1 -0
- package/mssql-core/expressions.d.cts +8 -0
- package/mssql-core/expressions.d.ts +8 -0
- package/mssql-core/expressions.js +22 -0
- package/mssql-core/expressions.js.map +1 -0
- package/mssql-core/foreign-keys.cjs +91 -0
- package/mssql-core/foreign-keys.cjs.map +1 -0
- package/mssql-core/foreign-keys.d.cts +51 -0
- package/mssql-core/foreign-keys.d.ts +51 -0
- package/mssql-core/foreign-keys.js +65 -0
- package/mssql-core/foreign-keys.js.map +1 -0
- package/mssql-core/index.cjs +55 -0
- package/mssql-core/index.cjs.map +1 -0
- package/mssql-core/index.d.cts +17 -0
- package/mssql-core/index.d.ts +17 -0
- package/mssql-core/index.js +18 -0
- package/mssql-core/index.js.map +1 -0
- package/mssql-core/indexes.cjs +80 -0
- package/mssql-core/indexes.cjs.map +1 -0
- package/mssql-core/indexes.d.cts +49 -0
- package/mssql-core/indexes.d.ts +49 -0
- package/mssql-core/indexes.js +52 -0
- package/mssql-core/indexes.js.map +1 -0
- package/mssql-core/primary-keys.cjs +64 -0
- package/mssql-core/primary-keys.cjs.map +1 -0
- package/mssql-core/primary-keys.d.cts +23 -0
- package/mssql-core/primary-keys.d.ts +23 -0
- package/mssql-core/primary-keys.js +38 -0
- package/mssql-core/primary-keys.js.map +1 -0
- package/mssql-core/query-builders/delete.cjs +107 -0
- package/mssql-core/query-builders/delete.cjs.map +1 -0
- package/mssql-core/query-builders/delete.d.cts +80 -0
- package/mssql-core/query-builders/delete.d.ts +80 -0
- package/mssql-core/query-builders/delete.js +83 -0
- package/mssql-core/query-builders/delete.js.map +1 -0
- package/mssql-core/query-builders/index.cjs +33 -0
- package/mssql-core/query-builders/index.cjs.map +1 -0
- package/mssql-core/query-builders/index.d.cts +6 -0
- package/mssql-core/query-builders/index.d.ts +6 -0
- package/mssql-core/query-builders/index.js +7 -0
- package/mssql-core/query-builders/index.js.map +1 -0
- package/mssql-core/query-builders/insert.cjs +105 -0
- package/mssql-core/query-builders/insert.cjs.map +1 -0
- package/mssql-core/query-builders/insert.d.cts +60 -0
- package/mssql-core/query-builders/insert.d.ts +60 -0
- package/mssql-core/query-builders/insert.js +80 -0
- package/mssql-core/query-builders/insert.js.map +1 -0
- package/mssql-core/query-builders/query-builder.cjs +95 -0
- package/mssql-core/query-builders/query-builder.cjs.map +1 -0
- package/mssql-core/query-builders/query-builder.d.cts +32 -0
- package/mssql-core/query-builders/query-builder.d.ts +32 -0
- package/mssql-core/query-builders/query-builder.js +71 -0
- package/mssql-core/query-builders/query-builder.js.map +1 -0
- package/mssql-core/query-builders/query.cjs +126 -0
- package/mssql-core/query-builders/query.cjs.map +1 -0
- package/mssql-core/query-builders/query.d.cts +42 -0
- package/mssql-core/query-builders/query.d.ts +42 -0
- package/mssql-core/query-builders/query.js +103 -0
- package/mssql-core/query-builders/query.js.map +1 -0
- package/mssql-core/query-builders/select.cjs +679 -0
- package/mssql-core/query-builders/select.cjs.map +1 -0
- package/mssql-core/query-builders/select.d.cts +549 -0
- package/mssql-core/query-builders/select.d.ts +549 -0
- package/mssql-core/query-builders/select.js +649 -0
- package/mssql-core/query-builders/select.js.map +1 -0
- package/mssql-core/query-builders/select.types.cjs +17 -0
- package/mssql-core/query-builders/select.types.cjs.map +1 -0
- package/mssql-core/query-builders/select.types.d.cts +142 -0
- package/mssql-core/query-builders/select.types.d.ts +142 -0
- package/mssql-core/query-builders/select.types.js +1 -0
- package/mssql-core/query-builders/select.types.js.map +1 -0
- package/mssql-core/query-builders/update.cjs +138 -0
- package/mssql-core/query-builders/update.cjs.map +1 -0
- package/mssql-core/query-builders/update.d.cts +109 -0
- package/mssql-core/query-builders/update.d.ts +109 -0
- package/mssql-core/query-builders/update.js +113 -0
- package/mssql-core/query-builders/update.js.map +1 -0
- package/mssql-core/schema.cjs +51 -0
- package/mssql-core/schema.cjs.map +1 -0
- package/mssql-core/schema.d.cts +22 -0
- package/mssql-core/schema.d.ts +22 -0
- package/mssql-core/schema.js +25 -0
- package/mssql-core/schema.js.map +1 -0
- package/mssql-core/session.cjs +74 -0
- package/mssql-core/session.cjs.map +1 -0
- package/mssql-core/session.d.cts +63 -0
- package/mssql-core/session.d.ts +63 -0
- package/mssql-core/session.js +48 -0
- package/mssql-core/session.js.map +1 -0
- package/mssql-core/subquery.cjs +17 -0
- package/mssql-core/subquery.cjs.map +1 -0
- package/mssql-core/subquery.d.cts +18 -0
- package/mssql-core/subquery.d.ts +18 -0
- package/mssql-core/subquery.js +1 -0
- package/mssql-core/subquery.js.map +1 -0
- package/mssql-core/table.cjs +81 -0
- package/mssql-core/table.cjs.map +1 -0
- package/mssql-core/table.d.cts +43 -0
- package/mssql-core/table.d.ts +43 -0
- package/mssql-core/table.js +53 -0
- package/mssql-core/table.js.map +1 -0
- package/mssql-core/unique-constraint.cjs +76 -0
- package/mssql-core/unique-constraint.cjs.map +1 -0
- package/mssql-core/unique-constraint.d.cts +23 -0
- package/mssql-core/unique-constraint.d.ts +23 -0
- package/mssql-core/unique-constraint.js +49 -0
- package/mssql-core/unique-constraint.js.map +1 -0
- package/mssql-core/utils.cjs +85 -0
- package/mssql-core/utils.cjs.map +1 -0
- package/mssql-core/utils.d.cts +31 -0
- package/mssql-core/utils.d.ts +31 -0
- package/mssql-core/utils.js +60 -0
- package/mssql-core/utils.js.map +1 -0
- package/mssql-core/view-base.cjs +33 -0
- package/mssql-core/view-base.cjs.map +1 -0
- package/mssql-core/view-base.d.cts +9 -0
- package/mssql-core/view-base.d.ts +9 -0
- package/mssql-core/view-base.js +9 -0
- package/mssql-core/view-base.js.map +1 -0
- package/mssql-core/view-common.cjs +29 -0
- package/mssql-core/view-common.cjs.map +1 -0
- package/mssql-core/view-common.d.cts +1 -0
- package/mssql-core/view-common.d.ts +1 -0
- package/mssql-core/view-common.js +5 -0
- package/mssql-core/view-common.js.map +1 -0
- package/mssql-core/view.cjs +154 -0
- package/mssql-core/view.cjs.map +1 -0
- package/mssql-core/view.d.cts +64 -0
- package/mssql-core/view.d.ts +64 -0
- package/mssql-core/view.js +125 -0
- package/mssql-core/view.js.map +1 -0
- package/mysql-core/dialect.cjs +1 -1
- package/mysql-core/dialect.cjs.map +1 -1
- package/mysql-core/dialect.js +1 -1
- package/mysql-core/dialect.js.map +1 -1
- package/node-mssql/driver.cjs +88 -0
- package/node-mssql/driver.cjs.map +1 -0
- package/node-mssql/driver.d.cts +34 -0
- package/node-mssql/driver.d.ts +34 -0
- package/node-mssql/driver.js +65 -0
- package/node-mssql/driver.js.map +1 -0
- package/node-mssql/index.cjs +25 -0
- package/node-mssql/index.cjs.map +1 -0
- package/node-mssql/index.d.cts +2 -0
- package/node-mssql/index.d.ts +2 -0
- package/node-mssql/index.js +3 -0
- package/node-mssql/index.js.map +1 -0
- package/node-mssql/migrator.cjs +33 -0
- package/node-mssql/migrator.cjs.map +1 -0
- package/node-mssql/migrator.d.cts +3 -0
- package/node-mssql/migrator.d.ts +3 -0
- package/node-mssql/migrator.js +9 -0
- package/node-mssql/migrator.js.map +1 -0
- package/node-mssql/session.cjs +243 -0
- package/node-mssql/session.cjs.map +1 -0
- package/node-mssql/session.d.cts +47 -0
- package/node-mssql/session.d.ts +47 -0
- package/node-mssql/session.js +211 -0
- package/node-mssql/session.js.map +1 -0
- package/package.json +653 -1
- package/pg-core/dialect.cjs +1 -1
- package/pg-core/dialect.cjs.map +1 -1
- package/pg-core/dialect.js +1 -1
- package/pg-core/dialect.js.map +1 -1
- package/pg-core/schema.cjs +2 -2
- package/pg-core/schema.cjs.map +1 -1
- package/pg-core/schema.d.cts +4 -1
- package/pg-core/schema.d.ts +4 -1
- package/pg-core/schema.js +2 -2
- package/pg-core/schema.js.map +1 -1
- package/relations.cjs +48 -0
- package/relations.cjs.map +1 -1
- package/relations.d.cts +1 -0
- package/relations.d.ts +1 -0
- package/relations.js +47 -0
- package/relations.js.map +1 -1
- package/singlestore-core/dialect.cjs +1 -1
- package/singlestore-core/dialect.cjs.map +1 -1
- package/singlestore-core/dialect.js +1 -1
- package/singlestore-core/dialect.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/int.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\n\nexport type MsSqlIntBuilderInitial<TName extends string> = MsSqlIntBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlInt';\n\t\tdata: number;\n\t\tdriverParam: number;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlInt'>>\n\textends MsSqlColumnBuilderWithIdentity<T>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MsSqlInt');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlInt<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MsSqlInt<T extends ColumnBaseConfig<'number', 'MsSqlInt'>> extends MsSqlColumnWithIdentity<T> {\n\tstatic override readonly [entityKind]: string = 'MsSqlInt';\n\n\t_getSQLType(): string {\n\t\treturn `int`;\n\t}\n}\n\nexport function int(): MsSqlIntBuilderInitial<''>;\nexport function int<TName extends string>(name: TName): MsSqlIntBuilderInitial<TName>;\nexport function int(name?: string) {\n\treturn new MsSqlIntBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,gCAAgC,+BAA+B;AAcjE,MAAM,wBACJ,+BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,UAAU;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OAC4C;AAC5C,WAAO,IAAI,SAA0C,OAAO,KAAK,MAA8C;AAAA,EAChH;AACD;AAEO,MAAM,iBAAmE,wBAA2B;AAAA,EAC1G,QAA0B,UAAU,IAAY;AAAA,EAEhD,cAAsB;AACrB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,IAAI,MAAe;AAClC,SAAO,IAAI,gBAAgB,QAAQ,EAAE;AACtC;","names":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var numeric_exports = {};
|
|
20
|
+
__export(numeric_exports, {
|
|
21
|
+
MsSqlNumeric: () => MsSqlNumeric,
|
|
22
|
+
MsSqlNumericBuilder: () => MsSqlNumericBuilder,
|
|
23
|
+
numeric: () => numeric
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(numeric_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_utils = require("../../utils.cjs");
|
|
28
|
+
var import_common = require("./common.cjs");
|
|
29
|
+
class MsSqlNumericBuilder extends import_common.MsSqlColumnBuilderWithIdentity {
|
|
30
|
+
static [import_entity.entityKind] = "MsSqlNumericBuilder";
|
|
31
|
+
constructor(name, precision, scale) {
|
|
32
|
+
super(name, "number", "MsSqlNumeric");
|
|
33
|
+
this.config.precision = precision;
|
|
34
|
+
this.config.scale = scale;
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
build(table) {
|
|
38
|
+
return new MsSqlNumeric(
|
|
39
|
+
table,
|
|
40
|
+
this.config
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
class MsSqlNumeric extends import_common.MsSqlColumnWithIdentity {
|
|
45
|
+
static [import_entity.entityKind] = "MsSqlNumeric";
|
|
46
|
+
precision = this.config.precision;
|
|
47
|
+
scale = this.config.scale;
|
|
48
|
+
_getSQLType() {
|
|
49
|
+
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
50
|
+
return `numeric(${this.precision},${this.scale})`;
|
|
51
|
+
} else if (this.precision === void 0) {
|
|
52
|
+
return "numeric";
|
|
53
|
+
} else {
|
|
54
|
+
return `numeric(${this.precision})`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function numeric(a, b) {
|
|
59
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
60
|
+
return new MsSqlNumericBuilder(name, config?.precision, config?.scale);
|
|
61
|
+
}
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
MsSqlNumeric,
|
|
65
|
+
MsSqlNumericBuilder,
|
|
66
|
+
numeric
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=numeric.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/numeric.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\nimport type { MsSqlDecimalConfig as MsSqlNumericConfig } from './decimal.ts';\n\nexport type MsSqlNumericBuilderInitial<TName extends string> = MsSqlNumericBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlNumeric';\n\t\tdata: number;\n\t\tdriverParam: number;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlNumericBuilder<\n\tT extends ColumnBuilderBaseConfig<'number', 'MsSqlNumeric'>,\n> extends MsSqlColumnBuilderWithIdentity<T, MsSqlNumericConfig> {\n\tstatic override readonly [entityKind]: string = 'MsSqlNumericBuilder';\n\n\tconstructor(name: T['name'], precision?: number, scale?: number) {\n\t\tsuper(name, 'number', 'MsSqlNumeric');\n\t\tthis.config.precision = precision;\n\t\tthis.config.scale = scale;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlNumeric<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlNumeric<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 MsSqlNumeric<T extends ColumnBaseConfig<'number', 'MsSqlNumeric'>>\n\textends MsSqlColumnWithIdentity<T, MsSqlNumericConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlNumeric';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\n\t_getSQLType(): string {\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\treturn `numeric(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\treturn 'numeric';\n\t\t} else {\n\t\t\treturn `numeric(${this.precision})`;\n\t\t}\n\t}\n}\n\nexport function numeric(): MsSqlNumericBuilderInitial<''>;\nexport function numeric(\n\tconfig?: MsSqlNumericConfig,\n): MsSqlNumericBuilderInitial<''>;\nexport function numeric<TName extends string>(\n\tname: TName,\n\tconfig?: MsSqlNumericConfig,\n): MsSqlNumericBuilderInitial<TName>;\nexport function numeric(a?: string | MsSqlNumericConfig, b?: MsSqlNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MsSqlNumericConfig>(a, b);\n\treturn new MsSqlNumericBuilder(name, config?.precision, config?.scale);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAAwE;AAejE,MAAM,4BAEH,6CAAsD;AAAA,EAC/D,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,WAAoB,OAAgB;AAChE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,YAAY;AACxB,SAAK,OAAO,QAAQ;AAAA,EACrB;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,sCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EAEjD,cAAsB;AACrB,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,aAAO,WAAW,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC/C,WAAW,KAAK,cAAc,QAAW;AACxC,aAAO;AAAA,IACR,OAAO;AACN,aAAO,WAAW,KAAK,SAAS;AAAA,IACjC;AAAA,EACD;AACD;AAUO,SAAS,QAAQ,GAAiC,GAAwB;AAChF,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,QAAQ,WAAW,QAAQ,KAAK;AACtE;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.cjs";
|
|
5
|
+
import type { MsSqlDecimalConfig as MsSqlNumericConfig } from "./decimal.cjs";
|
|
6
|
+
export type MsSqlNumericBuilderInitial<TName extends string> = MsSqlNumericBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'number';
|
|
9
|
+
columnType: 'MsSqlNumeric';
|
|
10
|
+
data: number;
|
|
11
|
+
driverParam: number;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class MsSqlNumericBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlNumeric'>> extends MsSqlColumnBuilderWithIdentity<T, MsSqlNumericConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name'], precision?: number, scale?: number);
|
|
18
|
+
}
|
|
19
|
+
export declare class MsSqlNumeric<T extends ColumnBaseConfig<'number', 'MsSqlNumeric'>> extends MsSqlColumnWithIdentity<T, MsSqlNumericConfig> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
readonly precision: number | undefined;
|
|
22
|
+
readonly scale: number | undefined;
|
|
23
|
+
_getSQLType(): string;
|
|
24
|
+
}
|
|
25
|
+
export declare function numeric(): MsSqlNumericBuilderInitial<''>;
|
|
26
|
+
export declare function numeric(config?: MsSqlNumericConfig): MsSqlNumericBuilderInitial<''>;
|
|
27
|
+
export declare function numeric<TName extends string>(name: TName, config?: MsSqlNumericConfig): MsSqlNumericBuilderInitial<TName>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
5
|
+
import type { MsSqlDecimalConfig as MsSqlNumericConfig } from "./decimal.js";
|
|
6
|
+
export type MsSqlNumericBuilderInitial<TName extends string> = MsSqlNumericBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'number';
|
|
9
|
+
columnType: 'MsSqlNumeric';
|
|
10
|
+
data: number;
|
|
11
|
+
driverParam: number;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class MsSqlNumericBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlNumeric'>> extends MsSqlColumnBuilderWithIdentity<T, MsSqlNumericConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name'], precision?: number, scale?: number);
|
|
18
|
+
}
|
|
19
|
+
export declare class MsSqlNumeric<T extends ColumnBaseConfig<'number', 'MsSqlNumeric'>> extends MsSqlColumnWithIdentity<T, MsSqlNumericConfig> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
readonly precision: number | undefined;
|
|
22
|
+
readonly scale: number | undefined;
|
|
23
|
+
_getSQLType(): string;
|
|
24
|
+
}
|
|
25
|
+
export declare function numeric(): MsSqlNumericBuilderInitial<''>;
|
|
26
|
+
export declare function numeric(config?: MsSqlNumericConfig): MsSqlNumericBuilderInitial<''>;
|
|
27
|
+
export declare function numeric<TName extends string>(name: TName, config?: MsSqlNumericConfig): MsSqlNumericBuilderInitial<TName>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { getColumnNameAndConfig } from "../../utils.js";
|
|
3
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
4
|
+
class MsSqlNumericBuilder extends MsSqlColumnBuilderWithIdentity {
|
|
5
|
+
static [entityKind] = "MsSqlNumericBuilder";
|
|
6
|
+
constructor(name, precision, scale) {
|
|
7
|
+
super(name, "number", "MsSqlNumeric");
|
|
8
|
+
this.config.precision = precision;
|
|
9
|
+
this.config.scale = scale;
|
|
10
|
+
}
|
|
11
|
+
/** @internal */
|
|
12
|
+
build(table) {
|
|
13
|
+
return new MsSqlNumeric(
|
|
14
|
+
table,
|
|
15
|
+
this.config
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
class MsSqlNumeric extends MsSqlColumnWithIdentity {
|
|
20
|
+
static [entityKind] = "MsSqlNumeric";
|
|
21
|
+
precision = this.config.precision;
|
|
22
|
+
scale = this.config.scale;
|
|
23
|
+
_getSQLType() {
|
|
24
|
+
if (this.precision !== void 0 && this.scale !== void 0) {
|
|
25
|
+
return `numeric(${this.precision},${this.scale})`;
|
|
26
|
+
} else if (this.precision === void 0) {
|
|
27
|
+
return "numeric";
|
|
28
|
+
} else {
|
|
29
|
+
return `numeric(${this.precision})`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function numeric(a, b) {
|
|
34
|
+
const { name, config } = getColumnNameAndConfig(a, b);
|
|
35
|
+
return new MsSqlNumericBuilder(name, config?.precision, config?.scale);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
MsSqlNumeric,
|
|
39
|
+
MsSqlNumericBuilder,
|
|
40
|
+
numeric
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=numeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/numeric.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\nimport type { MsSqlDecimalConfig as MsSqlNumericConfig } from './decimal.ts';\n\nexport type MsSqlNumericBuilderInitial<TName extends string> = MsSqlNumericBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlNumeric';\n\t\tdata: number;\n\t\tdriverParam: number;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlNumericBuilder<\n\tT extends ColumnBuilderBaseConfig<'number', 'MsSqlNumeric'>,\n> extends MsSqlColumnBuilderWithIdentity<T, MsSqlNumericConfig> {\n\tstatic override readonly [entityKind]: string = 'MsSqlNumericBuilder';\n\n\tconstructor(name: T['name'], precision?: number, scale?: number) {\n\t\tsuper(name, 'number', 'MsSqlNumeric');\n\t\tthis.config.precision = precision;\n\t\tthis.config.scale = scale;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlNumeric<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlNumeric<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 MsSqlNumeric<T extends ColumnBaseConfig<'number', 'MsSqlNumeric'>>\n\textends MsSqlColumnWithIdentity<T, MsSqlNumericConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlNumeric';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\n\t_getSQLType(): string {\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\treturn `numeric(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\treturn 'numeric';\n\t\t} else {\n\t\t\treturn `numeric(${this.precision})`;\n\t\t}\n\t}\n}\n\nexport function numeric(): MsSqlNumericBuilderInitial<''>;\nexport function numeric(\n\tconfig?: MsSqlNumericConfig,\n): MsSqlNumericBuilderInitial<''>;\nexport function numeric<TName extends string>(\n\tname: TName,\n\tconfig?: MsSqlNumericConfig,\n): MsSqlNumericBuilderInitial<TName>;\nexport function numeric(a?: string | MsSqlNumericConfig, b?: MsSqlNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MsSqlNumericConfig>(a, b);\n\treturn new MsSqlNumericBuilder(name, config?.precision, config?.scale);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,gCAAgC,+BAA+B;AAejE,MAAM,4BAEH,+BAAsD;AAAA,EAC/D,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,WAAoB,OAAgB;AAChE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,YAAY;AACxB,SAAK,OAAO,QAAQ;AAAA,EACrB;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,wBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EAEjD,cAAsB;AACrB,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,aAAO,WAAW,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC/C,WAAW,KAAK,cAAc,QAAW;AACxC,aAAO;AAAA,IACR,OAAO;AACN,aAAO,WAAW,KAAK,SAAS;AAAA,IACjC;AAAA,EACD;AACD;AAUO,SAAS,QAAQ,GAAiC,GAAwB;AAChF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,QAAQ,WAAW,QAAQ,KAAK;AACtE;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var real_exports = {};
|
|
20
|
+
__export(real_exports, {
|
|
21
|
+
MsSqlReal: () => MsSqlReal,
|
|
22
|
+
MsSqlRealBuilder: () => MsSqlRealBuilder,
|
|
23
|
+
real: () => real
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(real_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
class MsSqlRealBuilder extends import_common.MsSqlColumnBuilderWithIdentity {
|
|
29
|
+
static [import_entity.entityKind] = "MsSqlRealBuilder";
|
|
30
|
+
constructor(name) {
|
|
31
|
+
super(name, "number", "MsSqlReal");
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
build(table) {
|
|
35
|
+
return new MsSqlReal(table, this.config);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class MsSqlReal extends import_common.MsSqlColumnWithIdentity {
|
|
39
|
+
static [import_entity.entityKind] = "MsSqlReal";
|
|
40
|
+
_getSQLType() {
|
|
41
|
+
return "real";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function real(name) {
|
|
45
|
+
return new MsSqlRealBuilder(name ?? "");
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
MsSqlReal,
|
|
50
|
+
MsSqlRealBuilder,
|
|
51
|
+
real
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=real.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/real.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\n\nexport type MsSqlRealBuilderInitial<TName extends string> = MsSqlRealBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlReal';\n\t\tdata: number;\n\t\tdriverParam: number;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlReal'>>\n\textends MsSqlColumnBuilderWithIdentity<T>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MsSqlReal');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlReal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlReal<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MsSqlReal<T extends ColumnBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnWithIdentity<T> {\n\tstatic override readonly [entityKind]: string = 'MsSqlReal';\n\n\t_getSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): MsSqlRealBuilderInitial<''>;\nexport function real<TName extends string>(name: TName): MsSqlRealBuilderInitial<TName>;\nexport function real(name?: string) {\n\treturn new MsSqlRealBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAAwE;AAcjE,MAAM,yBACJ,6CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,WAAW;AAAA,EAClC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAAqE,sCAA2B;AAAA,EAC5G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,cAAsB;AACrB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,iBAAiB,QAAQ,EAAE;AACvC;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.cjs";
|
|
5
|
+
export type MsSqlRealBuilderInitial<TName extends string> = MsSqlRealBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'number';
|
|
8
|
+
columnType: 'MsSqlReal';
|
|
9
|
+
data: number;
|
|
10
|
+
driverParam: number;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class MsSqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnBuilderWithIdentity<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class MsSqlReal<T extends ColumnBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnWithIdentity<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
_getSQLType(): string;
|
|
21
|
+
}
|
|
22
|
+
export declare function real(): MsSqlRealBuilderInitial<''>;
|
|
23
|
+
export declare function real<TName extends string>(name: TName): MsSqlRealBuilderInitial<TName>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
5
|
+
export type MsSqlRealBuilderInitial<TName extends string> = MsSqlRealBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'number';
|
|
8
|
+
columnType: 'MsSqlReal';
|
|
9
|
+
data: number;
|
|
10
|
+
driverParam: number;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class MsSqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnBuilderWithIdentity<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class MsSqlReal<T extends ColumnBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnWithIdentity<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
_getSQLType(): string;
|
|
21
|
+
}
|
|
22
|
+
export declare function real(): MsSqlRealBuilderInitial<''>;
|
|
23
|
+
export declare function real<TName extends string>(name: TName): MsSqlRealBuilderInitial<TName>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
3
|
+
class MsSqlRealBuilder extends MsSqlColumnBuilderWithIdentity {
|
|
4
|
+
static [entityKind] = "MsSqlRealBuilder";
|
|
5
|
+
constructor(name) {
|
|
6
|
+
super(name, "number", "MsSqlReal");
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
build(table) {
|
|
10
|
+
return new MsSqlReal(table, this.config);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class MsSqlReal extends MsSqlColumnWithIdentity {
|
|
14
|
+
static [entityKind] = "MsSqlReal";
|
|
15
|
+
_getSQLType() {
|
|
16
|
+
return "real";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function real(name) {
|
|
20
|
+
return new MsSqlRealBuilder(name ?? "");
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
MsSqlReal,
|
|
24
|
+
MsSqlRealBuilder,
|
|
25
|
+
real
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=real.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/real.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\n\nexport type MsSqlRealBuilderInitial<TName extends string> = MsSqlRealBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlReal';\n\t\tdata: number;\n\t\tdriverParam: number;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlReal'>>\n\textends MsSqlColumnBuilderWithIdentity<T>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MsSqlReal');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlReal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlReal<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MsSqlReal<T extends ColumnBaseConfig<'number', 'MsSqlReal'>> extends MsSqlColumnWithIdentity<T> {\n\tstatic override readonly [entityKind]: string = 'MsSqlReal';\n\n\t_getSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): MsSqlRealBuilderInitial<''>;\nexport function real<TName extends string>(name: TName): MsSqlRealBuilderInitial<TName>;\nexport function real(name?: string) {\n\treturn new MsSqlRealBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,gCAAgC,+BAA+B;AAcjE,MAAM,yBACJ,+BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,WAAW;AAAA,EAClC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAAqE,wBAA2B;AAAA,EAC5G,QAA0B,UAAU,IAAY;AAAA,EAEhD,cAAsB;AACrB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,iBAAiB,QAAQ,EAAE;AACvC;","names":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var smallint_exports = {};
|
|
20
|
+
__export(smallint_exports, {
|
|
21
|
+
MsSqlSmallInt: () => MsSqlSmallInt,
|
|
22
|
+
MsSqlSmallIntBuilder: () => MsSqlSmallIntBuilder,
|
|
23
|
+
smallint: () => smallint
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(smallint_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
class MsSqlSmallIntBuilder extends import_common.MsSqlColumnBuilderWithIdentity {
|
|
29
|
+
static [import_entity.entityKind] = "MsSqlSmallIntBuilder";
|
|
30
|
+
constructor(name) {
|
|
31
|
+
super(name, "number", "MsSqlSmallInt");
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
build(table) {
|
|
35
|
+
return new MsSqlSmallInt(
|
|
36
|
+
table,
|
|
37
|
+
this.config
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class MsSqlSmallInt extends import_common.MsSqlColumnWithIdentity {
|
|
42
|
+
static [import_entity.entityKind] = "MsSqlSmallInt";
|
|
43
|
+
_getSQLType() {
|
|
44
|
+
return `smallint`;
|
|
45
|
+
}
|
|
46
|
+
mapFromDriverValue(value) {
|
|
47
|
+
if (typeof value === "string") {
|
|
48
|
+
return Number(value);
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function smallint(name) {
|
|
54
|
+
return new MsSqlSmallIntBuilder(name ?? "");
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
MsSqlSmallInt,
|
|
59
|
+
MsSqlSmallIntBuilder,
|
|
60
|
+
smallint
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=smallint.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/smallint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\n\nexport type MsSqlSmallIntBuilderInitial<TName extends string> = MsSqlSmallIntBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlSmallInt';\n\t\tdata: number;\n\t\tdriverParam: number | string;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlSmallInt'>>\n\textends MsSqlColumnBuilderWithIdentity<T>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlSmallIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MsSqlSmallInt');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlSmallInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlSmallInt<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 MsSqlSmallInt<T extends ColumnBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnWithIdentity<T> {\n\tstatic override readonly [entityKind]: string = 'MsSqlSmallInt';\n\n\t_getSQLType(): string {\n\t\treturn `smallint`;\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function smallint(): MsSqlSmallIntBuilderInitial<''>;\nexport function smallint<TName extends string>(name: TName): MsSqlSmallIntBuilderInitial<TName>;\nexport function smallint(name?: string) {\n\treturn new MsSqlSmallIntBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAAwE;AAcjE,MAAM,6BACJ,6CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,eAAe;AAAA,EACtC;AAAA;AAAA,EAGS,MACR,OACiD;AACjD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,sBAA6E,sCAA2B;AAAA,EACpH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,cAAsB;AACrB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,qBAAqB,QAAQ,EAAE;AAC3C;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.cjs";
|
|
5
|
+
export type MsSqlSmallIntBuilderInitial<TName extends string> = MsSqlSmallIntBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'number';
|
|
8
|
+
columnType: 'MsSqlSmallInt';
|
|
9
|
+
data: number;
|
|
10
|
+
driverParam: number | string;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class MsSqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnBuilderWithIdentity<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class MsSqlSmallInt<T extends ColumnBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnWithIdentity<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
_getSQLType(): string;
|
|
21
|
+
mapFromDriverValue(value: number | string): number;
|
|
22
|
+
}
|
|
23
|
+
export declare function smallint(): MsSqlSmallIntBuilderInitial<''>;
|
|
24
|
+
export declare function smallint<TName extends string>(name: TName): MsSqlSmallIntBuilderInitial<TName>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
5
|
+
export type MsSqlSmallIntBuilderInitial<TName extends string> = MsSqlSmallIntBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'number';
|
|
8
|
+
columnType: 'MsSqlSmallInt';
|
|
9
|
+
data: number;
|
|
10
|
+
driverParam: number | string;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class MsSqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnBuilderWithIdentity<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class MsSqlSmallInt<T extends ColumnBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnWithIdentity<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
_getSQLType(): string;
|
|
21
|
+
mapFromDriverValue(value: number | string): number;
|
|
22
|
+
}
|
|
23
|
+
export declare function smallint(): MsSqlSmallIntBuilderInitial<''>;
|
|
24
|
+
export declare function smallint<TName extends string>(name: TName): MsSqlSmallIntBuilderInitial<TName>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
|
|
3
|
+
class MsSqlSmallIntBuilder extends MsSqlColumnBuilderWithIdentity {
|
|
4
|
+
static [entityKind] = "MsSqlSmallIntBuilder";
|
|
5
|
+
constructor(name) {
|
|
6
|
+
super(name, "number", "MsSqlSmallInt");
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
build(table) {
|
|
10
|
+
return new MsSqlSmallInt(
|
|
11
|
+
table,
|
|
12
|
+
this.config
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class MsSqlSmallInt extends MsSqlColumnWithIdentity {
|
|
17
|
+
static [entityKind] = "MsSqlSmallInt";
|
|
18
|
+
_getSQLType() {
|
|
19
|
+
return `smallint`;
|
|
20
|
+
}
|
|
21
|
+
mapFromDriverValue(value) {
|
|
22
|
+
if (typeof value === "string") {
|
|
23
|
+
return Number(value);
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function smallint(name) {
|
|
29
|
+
return new MsSqlSmallIntBuilder(name ?? "");
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
MsSqlSmallInt,
|
|
33
|
+
MsSqlSmallIntBuilder,
|
|
34
|
+
smallint
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=smallint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/smallint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from './common.ts';\n\nexport type MsSqlSmallIntBuilderInitial<TName extends string> = MsSqlSmallIntBuilder<\n\t{\n\t\tname: TName;\n\t\tdataType: 'number';\n\t\tcolumnType: 'MsSqlSmallInt';\n\t\tdata: number;\n\t\tdriverParam: number | string;\n\t\tenumValues: undefined;\n\t\tgenerated: undefined;\n\t}\n>;\n\nexport class MsSqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MsSqlSmallInt'>>\n\textends MsSqlColumnBuilderWithIdentity<T>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlSmallIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'MsSqlSmallInt');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlSmallInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlSmallInt<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 MsSqlSmallInt<T extends ColumnBaseConfig<'number', 'MsSqlSmallInt'>> extends MsSqlColumnWithIdentity<T> {\n\tstatic override readonly [entityKind]: string = 'MsSqlSmallInt';\n\n\t_getSQLType(): string {\n\t\treturn `smallint`;\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function smallint(): MsSqlSmallIntBuilderInitial<''>;\nexport function smallint<TName extends string>(name: TName): MsSqlSmallIntBuilderInitial<TName>;\nexport function smallint(name?: string) {\n\treturn new MsSqlSmallIntBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,gCAAgC,+BAA+B;AAcjE,MAAM,6BACJ,+BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,eAAe;AAAA,EACtC;AAAA;AAAA,EAGS,MACR,OACiD;AACjD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,sBAA6E,wBAA2B;AAAA,EACpH,QAA0B,UAAU,IAAY;AAAA,EAEhD,cAAsB;AACrB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,qBAAqB,QAAQ,EAAE;AAC3C;","names":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var text_exports = {};
|
|
20
|
+
__export(text_exports, {
|
|
21
|
+
MsSqlText: () => MsSqlText,
|
|
22
|
+
MsSqlTextBuilder: () => MsSqlTextBuilder,
|
|
23
|
+
nText: () => nText,
|
|
24
|
+
text: () => text
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(text_exports);
|
|
27
|
+
var import_entity = require("../../entity.cjs");
|
|
28
|
+
var import_utils = require("../../utils.cjs");
|
|
29
|
+
var import_common = require("./common.cjs");
|
|
30
|
+
class MsSqlTextBuilder extends import_common.MsSqlColumnBuilder {
|
|
31
|
+
static [import_entity.entityKind] = "MsSqlTextBuilder";
|
|
32
|
+
constructor(name, config) {
|
|
33
|
+
super(name, "string", "MsSqlText");
|
|
34
|
+
this.config.enumValues = config.enum;
|
|
35
|
+
this.config.nonUnicode = config.nonUnicode;
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
build(table) {
|
|
39
|
+
return new MsSqlText(table, this.config);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class MsSqlText extends import_common.MsSqlColumn {
|
|
43
|
+
static [import_entity.entityKind] = "MsSqlText";
|
|
44
|
+
enumValues = this.config.enumValues;
|
|
45
|
+
nonUnicode = this.config.nonUnicode;
|
|
46
|
+
constructor(table, config) {
|
|
47
|
+
super(table, config);
|
|
48
|
+
}
|
|
49
|
+
getSQLType() {
|
|
50
|
+
return `${this.nonUnicode ? "n" : ""}text`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function text(a, b) {
|
|
54
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
55
|
+
return new MsSqlTextBuilder(name, { ...config, nonUnicode: false });
|
|
56
|
+
}
|
|
57
|
+
function nText(a, b) {
|
|
58
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
59
|
+
return new MsSqlTextBuilder(name, { ...config, nonUnicode: true });
|
|
60
|
+
}
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
MsSqlText,
|
|
64
|
+
MsSqlTextBuilder,
|
|
65
|
+
nText,
|
|
66
|
+
text
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=text.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/mssql-core/columns/text.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMsSqlTable } from '~/mssql-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { MsSqlColumn, MsSqlColumnBuilder } from './common.ts';\n\nexport type MsSqlTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = MsSqlTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MsSqlText';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tgenerated: undefined;\n}>;\n\nexport class MsSqlTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'MsSqlText'>> extends MsSqlColumnBuilder<\n\tT,\n\t{ enumValues: T['enumValues']; nonUnicode: boolean }\n> {\n\tstatic override readonly [entityKind]: string = 'MsSqlTextBuilder';\n\n\tconstructor(name: T['name'], config: MsSqlTextConfig<T['enumValues']> & { nonUnicode: boolean }) {\n\t\tsuper(name, 'string', 'MsSqlText');\n\t\tthis.config.enumValues = config.enum;\n\t\tthis.config.nonUnicode = config.nonUnicode;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMsSqlTable<{ name: TTableName }>,\n\t): MsSqlText<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MsSqlText<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MsSqlText<T extends ColumnBaseConfig<'string', 'MsSqlText'>>\n\textends MsSqlColumn<T, { enumValues: T['enumValues']; nonUnicode: boolean }>\n{\n\tstatic override readonly [entityKind]: string = 'MsSqlText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\treadonly nonUnicode: boolean = this.config.nonUnicode;\n\n\tconstructor(\n\t\ttable: AnyMsSqlTable<{ name: T['tableName'] }>,\n\t\tconfig: MsSqlTextBuilder<T>['config'],\n\t) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `${this.nonUnicode ? 'n' : ''}text`;\n\t}\n}\n\nexport type MsSqlTextConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n> = {\n\tenum?: TEnum;\n};\n\nexport function text(): MsSqlTextBuilderInitial<'', [string, ...string[]]>;\nexport function text<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tconfig?: MsSqlTextConfig<T | Writable<T>>,\n): MsSqlTextBuilderInitial<'', Writable<T>>;\nexport function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(\n\tname: TName,\n\tconfig?: MsSqlTextConfig<T | Writable<T>>,\n): MsSqlTextBuilderInitial<TName, Writable<T>>;\nexport function text(\n\ta?: string | MsSqlTextConfig,\n\tb?: MsSqlTextConfig,\n): any {\n\tconst { name, config } = getColumnNameAndConfig<MsSqlTextConfig>(a, b);\n\n\treturn new MsSqlTextBuilder(name, { ...config, nonUnicode: false } as any);\n}\n\nexport function nText(): MsSqlTextBuilderInitial<'', [string, ...string[]]>;\nexport function nText<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tconfig?: MsSqlTextConfig<T | Writable<T>>,\n): MsSqlTextBuilderInitial<'', [string, ...string[]]>;\nexport function nText<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(\n\tname: TName,\n\tconfig?: MsSqlTextConfig<T | Writable<T>>,\n): MsSqlTextBuilderInitial<TName, Writable<T>>;\nexport function nText(\n\ta?: string | MsSqlTextConfig,\n\tb?: MsSqlTextConfig,\n): any {\n\tconst { name, config } = getColumnNameAndConfig<MsSqlTextConfig>(a, b);\n\n\treturn new MsSqlTextBuilder(name, { ...config, nonUnicode: true } as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAsD;AACtD,oBAAgD;AAYzC,MAAM,yBAAmF,iCAG9F;AAAA,EACD,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAoE;AAChG,UAAM,MAAM,UAAU,WAAW;AACjC,SAAK,OAAO,aAAa,OAAO;AAChC,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBACJ,0BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAE9B,aAAa,KAAK,OAAO;AAAA,EAElC,aAAsB,KAAK,OAAO;AAAA,EAE3C,YACC,OACA,QACC;AACD,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO,GAAG,KAAK,aAAa,MAAM,EAAE;AAAA,EACrC;AACD;AAgBO,SAAS,KACf,GACA,GACM;AACN,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAwC,GAAG,CAAC;AAErE,SAAO,IAAI,iBAAiB,MAAM,EAAE,GAAG,QAAQ,YAAY,MAAM,CAAQ;AAC1E;AAUO,SAAS,MACf,GACA,GACM;AACN,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAwC,GAAG,CAAC;AAErE,SAAO,IAAI,iBAAiB,MAAM,EAAE,GAAG,QAAQ,YAAY,KAAK,CAAQ;AACzE;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import type { AnyMsSqlTable } from "../table.cjs";
|
|
5
|
+
import { type Writable } from "../../utils.cjs";
|
|
6
|
+
import { MsSqlColumn, MsSqlColumnBuilder } from "./common.cjs";
|
|
7
|
+
export type MsSqlTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = MsSqlTextBuilder<{
|
|
8
|
+
name: TName;
|
|
9
|
+
dataType: 'string';
|
|
10
|
+
columnType: 'MsSqlText';
|
|
11
|
+
data: TEnum[number];
|
|
12
|
+
driverParam: string;
|
|
13
|
+
enumValues: TEnum;
|
|
14
|
+
generated: undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export declare class MsSqlTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'MsSqlText'>> extends MsSqlColumnBuilder<T, {
|
|
17
|
+
enumValues: T['enumValues'];
|
|
18
|
+
nonUnicode: boolean;
|
|
19
|
+
}> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
constructor(name: T['name'], config: MsSqlTextConfig<T['enumValues']> & {
|
|
22
|
+
nonUnicode: boolean;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export declare class MsSqlText<T extends ColumnBaseConfig<'string', 'MsSqlText'>> extends MsSqlColumn<T, {
|
|
26
|
+
enumValues: T['enumValues'];
|
|
27
|
+
nonUnicode: boolean;
|
|
28
|
+
}> {
|
|
29
|
+
static readonly [entityKind]: string;
|
|
30
|
+
readonly enumValues: T["enumValues"];
|
|
31
|
+
readonly nonUnicode: boolean;
|
|
32
|
+
constructor(table: AnyMsSqlTable<{
|
|
33
|
+
name: T['tableName'];
|
|
34
|
+
}>, config: MsSqlTextBuilder<T>['config']);
|
|
35
|
+
getSQLType(): string;
|
|
36
|
+
}
|
|
37
|
+
export type MsSqlTextConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined> = {
|
|
38
|
+
enum?: TEnum;
|
|
39
|
+
};
|
|
40
|
+
export declare function text(): MsSqlTextBuilderInitial<'', [string, ...string[]]>;
|
|
41
|
+
export declare function text<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MsSqlTextConfig<T | Writable<T>>): MsSqlTextBuilderInitial<'', Writable<T>>;
|
|
42
|
+
export declare function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MsSqlTextConfig<T | Writable<T>>): MsSqlTextBuilderInitial<TName, Writable<T>>;
|
|
43
|
+
export declare function nText(): MsSqlTextBuilderInitial<'', [string, ...string[]]>;
|
|
44
|
+
export declare function nText<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MsSqlTextConfig<T | Writable<T>>): MsSqlTextBuilderInitial<'', [string, ...string[]]>;
|
|
45
|
+
export declare function nText<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MsSqlTextConfig<T | Writable<T>>): MsSqlTextBuilderInitial<TName, Writable<T>>;
|