drizzle-orm 0.36.4-ddb97ec → 0.37.0-3f3eb73
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/durable-sqlite/driver.cjs +64 -0
- package/durable-sqlite/driver.cjs.map +1 -0
- package/durable-sqlite/driver.d.cts +9 -0
- package/durable-sqlite/driver.d.ts +9 -0
- package/durable-sqlite/driver.js +42 -0
- package/durable-sqlite/driver.js.map +1 -0
- package/durable-sqlite/index.cjs +25 -0
- package/durable-sqlite/index.cjs.map +1 -0
- package/durable-sqlite/index.d.cts +2 -0
- package/durable-sqlite/index.d.ts +2 -0
- package/durable-sqlite/index.js +3 -0
- package/durable-sqlite/index.js.map +1 -0
- package/durable-sqlite/migrator.cjs +85 -0
- package/durable-sqlite/migrator.cjs.map +1 -0
- package/durable-sqlite/migrator.d.cts +14 -0
- package/durable-sqlite/migrator.d.ts +14 -0
- package/durable-sqlite/migrator.js +61 -0
- package/durable-sqlite/migrator.js.map +1 -0
- package/durable-sqlite/session.cjs +131 -0
- package/durable-sqlite/session.cjs.map +1 -0
- package/durable-sqlite/session.d.cts +46 -0
- package/durable-sqlite/session.d.ts +46 -0
- package/durable-sqlite/session.js +107 -0
- package/durable-sqlite/session.js.map +1 -0
- package/mysql-core/utils.d.cts +1 -2
- package/mysql-core/utils.d.ts +1 -2
- package/mysql-core/view.cjs.map +1 -1
- package/mysql-core/view.d.cts +2 -3
- package/mysql-core/view.d.ts +2 -3
- package/mysql-core/view.js.map +1 -1
- package/neon-http/driver.cjs.map +1 -1
- package/neon-http/driver.d.cts +3 -3
- package/neon-http/driver.d.ts +3 -3
- package/neon-http/driver.js.map +1 -1
- package/package.json +784 -3
- package/pg-core/db.cjs +4 -2
- package/pg-core/db.cjs.map +1 -1
- package/pg-core/db.js +4 -2
- package/pg-core/db.js.map +1 -1
- package/pg-core/utils.d.cts +2 -3
- package/pg-core/utils.d.ts +2 -3
- package/pg-core/view.cjs.map +1 -1
- package/pg-core/view.d.cts +4 -5
- package/pg-core/view.d.ts +4 -5
- package/pg-core/view.js.map +1 -1
- package/query-builders/select.types.cjs.map +1 -1
- package/query-builders/select.types.d.cts +2 -2
- package/query-builders/select.types.d.ts +2 -2
- package/singlestore/driver.cjs +113 -0
- package/singlestore/driver.cjs.map +1 -0
- package/singlestore/driver.d.cts +52 -0
- package/singlestore/driver.d.ts +52 -0
- package/singlestore/driver.js +89 -0
- package/singlestore/driver.js.map +1 -0
- package/singlestore/index.cjs +25 -0
- package/singlestore/index.cjs.map +1 -0
- package/singlestore/index.d.cts +2 -0
- package/singlestore/index.d.ts +2 -0
- package/singlestore/index.js +3 -0
- package/singlestore/index.js.map +1 -0
- package/singlestore/migrator.cjs +33 -0
- package/singlestore/migrator.cjs.map +1 -0
- package/singlestore/migrator.d.cts +3 -0
- package/singlestore/migrator.d.ts +3 -0
- package/singlestore/migrator.js +9 -0
- package/singlestore/migrator.js.map +1 -0
- package/singlestore/session.cjs +258 -0
- package/singlestore/session.cjs.map +1 -0
- package/singlestore/session.d.cts +52 -0
- package/singlestore/session.d.ts +52 -0
- package/singlestore/session.js +236 -0
- package/singlestore/session.js.map +1 -0
- package/singlestore-core/alias.cjs +32 -0
- package/singlestore-core/alias.cjs.map +1 -0
- package/singlestore-core/alias.d.cts +4 -0
- package/singlestore-core/alias.d.ts +4 -0
- package/singlestore-core/alias.js +8 -0
- package/singlestore-core/alias.js.map +1 -0
- package/singlestore-core/columns/all.cjs +80 -0
- package/singlestore-core/columns/all.cjs.map +1 -0
- package/singlestore-core/columns/all.d.cts +51 -0
- package/singlestore-core/columns/all.d.ts +51 -0
- package/singlestore-core/columns/all.js +56 -0
- package/singlestore-core/columns/all.js.map +1 -0
- package/singlestore-core/columns/bigint.cjs +96 -0
- package/singlestore-core/columns/bigint.cjs.map +1 -0
- package/singlestore-core/columns/bigint.d.cts +54 -0
- package/singlestore-core/columns/bigint.d.ts +54 -0
- package/singlestore-core/columns/bigint.js +68 -0
- package/singlestore-core/columns/bigint.js.map +1 -0
- package/singlestore-core/columns/binary.cjs +60 -0
- package/singlestore-core/columns/binary.cjs.map +1 -0
- package/singlestore-core/columns/binary.d.cts +28 -0
- package/singlestore-core/columns/binary.d.ts +28 -0
- package/singlestore-core/columns/binary.js +34 -0
- package/singlestore-core/columns/binary.js.map +1 -0
- package/singlestore-core/columns/boolean.cjs +62 -0
- package/singlestore-core/columns/boolean.cjs.map +1 -0
- package/singlestore-core/columns/boolean.d.cts +24 -0
- package/singlestore-core/columns/boolean.d.ts +24 -0
- package/singlestore-core/columns/boolean.js +36 -0
- package/singlestore-core/columns/boolean.js.map +1 -0
- package/singlestore-core/columns/char.cjs +62 -0
- package/singlestore-core/columns/char.cjs.map +1 -0
- package/singlestore-core/columns/char.d.cts +31 -0
- package/singlestore-core/columns/char.d.ts +31 -0
- package/singlestore-core/columns/char.js +36 -0
- package/singlestore-core/columns/char.js.map +1 -0
- package/singlestore-core/columns/common.cjs +82 -0
- package/singlestore-core/columns/common.cjs.map +1 -0
- package/singlestore-core/columns/common.d.cts +42 -0
- package/singlestore-core/columns/common.d.ts +42 -0
- package/singlestore-core/columns/common.js +55 -0
- package/singlestore-core/columns/common.js.map +1 -0
- package/singlestore-core/columns/custom.cjs +77 -0
- package/singlestore-core/columns/custom.cjs.map +1 -0
- package/singlestore-core/columns/custom.d.cts +156 -0
- package/singlestore-core/columns/custom.d.ts +156 -0
- package/singlestore-core/columns/custom.js +51 -0
- package/singlestore-core/columns/custom.js.map +1 -0
- package/singlestore-core/columns/date.cjs +93 -0
- package/singlestore-core/columns/date.cjs.map +1 -0
- package/singlestore-core/columns/date.common.cjs +48 -0
- package/singlestore-core/columns/date.common.cjs.map +1 -0
- package/singlestore-core/columns/date.common.d.cts +16 -0
- package/singlestore-core/columns/date.common.d.ts +16 -0
- package/singlestore-core/columns/date.common.js +23 -0
- package/singlestore-core/columns/date.common.js.map +1 -0
- package/singlestore-core/columns/date.d.cts +53 -0
- package/singlestore-core/columns/date.d.ts +53 -0
- package/singlestore-core/columns/date.js +65 -0
- package/singlestore-core/columns/date.js.map +1 -0
- package/singlestore-core/columns/datetime.cjs +106 -0
- package/singlestore-core/columns/datetime.cjs.map +1 -0
- package/singlestore-core/columns/datetime.d.cts +54 -0
- package/singlestore-core/columns/datetime.d.ts +54 -0
- package/singlestore-core/columns/datetime.js +78 -0
- package/singlestore-core/columns/datetime.js.map +1 -0
- package/singlestore-core/columns/decimal.cjs +76 -0
- package/singlestore-core/columns/decimal.cjs.map +1 -0
- package/singlestore-core/columns/decimal.d.cts +32 -0
- package/singlestore-core/columns/decimal.d.ts +32 -0
- package/singlestore-core/columns/decimal.js +50 -0
- package/singlestore-core/columns/decimal.js.map +1 -0
- package/singlestore-core/columns/double.cjs +72 -0
- package/singlestore-core/columns/double.cjs.map +1 -0
- package/singlestore-core/columns/double.d.cts +32 -0
- package/singlestore-core/columns/double.d.ts +32 -0
- package/singlestore-core/columns/double.js +46 -0
- package/singlestore-core/columns/double.js.map +1 -0
- package/singlestore-core/columns/enum.cjs +67 -0
- package/singlestore-core/columns/enum.cjs.map +1 -0
- package/singlestore-core/columns/enum.d.cts +31 -0
- package/singlestore-core/columns/enum.d.ts +31 -0
- package/singlestore-core/columns/enum.js +41 -0
- package/singlestore-core/columns/enum.js.map +1 -0
- package/singlestore-core/columns/float.cjs +72 -0
- package/singlestore-core/columns/float.cjs.map +1 -0
- package/singlestore-core/columns/float.d.cts +32 -0
- package/singlestore-core/columns/float.d.ts +32 -0
- package/singlestore-core/columns/float.js +46 -0
- package/singlestore-core/columns/float.js.map +1 -0
- package/singlestore-core/columns/index.cjs +71 -0
- package/singlestore-core/columns/index.cjs.map +1 -0
- package/singlestore-core/columns/index.d.cts +25 -0
- package/singlestore-core/columns/index.d.ts +25 -0
- package/singlestore-core/columns/index.js +26 -0
- package/singlestore-core/columns/index.js.map +1 -0
- package/singlestore-core/columns/int.cjs +65 -0
- package/singlestore-core/columns/int.cjs.map +1 -0
- package/singlestore-core/columns/int.d.cts +28 -0
- package/singlestore-core/columns/int.d.ts +28 -0
- package/singlestore-core/columns/int.js +39 -0
- package/singlestore-core/columns/int.js.map +1 -0
- package/singlestore-core/columns/json.cjs +59 -0
- package/singlestore-core/columns/json.cjs.map +1 -0
- package/singlestore-core/columns/json.d.cts +24 -0
- package/singlestore-core/columns/json.d.ts +24 -0
- package/singlestore-core/columns/json.js +33 -0
- package/singlestore-core/columns/json.js.map +1 -0
- package/singlestore-core/columns/mediumint.cjs +65 -0
- package/singlestore-core/columns/mediumint.cjs.map +1 -0
- package/singlestore-core/columns/mediumint.d.cts +26 -0
- package/singlestore-core/columns/mediumint.d.ts +26 -0
- package/singlestore-core/columns/mediumint.js +39 -0
- package/singlestore-core/columns/mediumint.js.map +1 -0
- package/singlestore-core/columns/real.cjs +68 -0
- package/singlestore-core/columns/real.cjs.map +1 -0
- package/singlestore-core/columns/real.d.cts +30 -0
- package/singlestore-core/columns/real.d.ts +30 -0
- package/singlestore-core/columns/real.js +42 -0
- package/singlestore-core/columns/real.js.map +1 -0
- package/singlestore-core/columns/serial.cjs +64 -0
- package/singlestore-core/columns/serial.cjs.map +1 -0
- package/singlestore-core/columns/serial.d.cts +24 -0
- package/singlestore-core/columns/serial.d.ts +24 -0
- package/singlestore-core/columns/serial.js +38 -0
- package/singlestore-core/columns/serial.js.map +1 -0
- package/singlestore-core/columns/smallint.cjs +65 -0
- package/singlestore-core/columns/smallint.cjs.map +1 -0
- package/singlestore-core/columns/smallint.d.cts +26 -0
- package/singlestore-core/columns/smallint.d.ts +26 -0
- package/singlestore-core/columns/smallint.js +39 -0
- package/singlestore-core/columns/smallint.js.map +1 -0
- package/singlestore-core/columns/text.cjs +80 -0
- package/singlestore-core/columns/text.cjs.map +1 -0
- package/singlestore-core/columns/text.d.cts +46 -0
- package/singlestore-core/columns/text.d.ts +46 -0
- package/singlestore-core/columns/text.js +51 -0
- package/singlestore-core/columns/text.js.map +1 -0
- package/singlestore-core/columns/time.cjs +56 -0
- package/singlestore-core/columns/time.cjs.map +1 -0
- package/singlestore-core/columns/time.d.cts +23 -0
- package/singlestore-core/columns/time.d.ts +23 -0
- package/singlestore-core/columns/time.js +30 -0
- package/singlestore-core/columns/time.js.map +1 -0
- package/singlestore-core/columns/timestamp.cjs +97 -0
- package/singlestore-core/columns/timestamp.cjs.map +1 -0
- package/singlestore-core/columns/timestamp.d.cts +49 -0
- package/singlestore-core/columns/timestamp.d.ts +49 -0
- package/singlestore-core/columns/timestamp.js +69 -0
- package/singlestore-core/columns/timestamp.js.map +1 -0
- package/singlestore-core/columns/tinyint.cjs +65 -0
- package/singlestore-core/columns/tinyint.cjs.map +1 -0
- package/singlestore-core/columns/tinyint.d.cts +26 -0
- package/singlestore-core/columns/tinyint.d.ts +26 -0
- package/singlestore-core/columns/tinyint.js +39 -0
- package/singlestore-core/columns/tinyint.js.map +1 -0
- package/singlestore-core/columns/varbinary.cjs +61 -0
- package/singlestore-core/columns/varbinary.cjs.map +1 -0
- package/singlestore-core/columns/varbinary.d.cts +26 -0
- package/singlestore-core/columns/varbinary.d.ts +26 -0
- package/singlestore-core/columns/varbinary.js +35 -0
- package/singlestore-core/columns/varbinary.js.map +1 -0
- package/singlestore-core/columns/varchar.cjs +63 -0
- package/singlestore-core/columns/varchar.cjs.map +1 -0
- package/singlestore-core/columns/varchar.d.cts +29 -0
- package/singlestore-core/columns/varchar.d.ts +29 -0
- package/singlestore-core/columns/varchar.js +37 -0
- package/singlestore-core/columns/varchar.js.map +1 -0
- package/singlestore-core/columns/year.cjs +56 -0
- package/singlestore-core/columns/year.cjs.map +1 -0
- package/singlestore-core/columns/year.d.cts +23 -0
- package/singlestore-core/columns/year.d.ts +23 -0
- package/singlestore-core/columns/year.js +30 -0
- package/singlestore-core/columns/year.js.map +1 -0
- package/singlestore-core/db.cjs +261 -0
- package/singlestore-core/db.cjs.map +1 -0
- package/singlestore-core/db.d.cts +231 -0
- package/singlestore-core/db.d.ts +231 -0
- package/singlestore-core/db.js +242 -0
- package/singlestore-core/db.js.map +1 -0
- package/singlestore-core/dialect.cjs +607 -0
- package/singlestore-core/dialect.cjs.map +1 -0
- package/singlestore-core/dialect.d.cts +64 -0
- package/singlestore-core/dialect.d.ts +64 -0
- package/singlestore-core/dialect.js +589 -0
- package/singlestore-core/dialect.js.map +1 -0
- package/singlestore-core/expressions.cjs +49 -0
- package/singlestore-core/expressions.cjs.map +1 -0
- package/singlestore-core/expressions.d.cts +8 -0
- package/singlestore-core/expressions.d.ts +8 -0
- package/singlestore-core/expressions.js +22 -0
- package/singlestore-core/expressions.js.map +1 -0
- package/singlestore-core/index.cjs +47 -0
- package/singlestore-core/index.cjs.map +1 -0
- package/singlestore-core/index.d.cts +13 -0
- package/singlestore-core/index.d.ts +13 -0
- package/singlestore-core/index.js +14 -0
- package/singlestore-core/index.js.map +1 -0
- package/singlestore-core/indexes.cjs +88 -0
- package/singlestore-core/indexes.cjs.map +1 -0
- package/singlestore-core/indexes.d.cts +62 -0
- package/singlestore-core/indexes.d.ts +62 -0
- package/singlestore-core/indexes.js +60 -0
- package/singlestore-core/indexes.js.map +1 -0
- package/singlestore-core/primary-keys.cjs +68 -0
- package/singlestore-core/primary-keys.cjs.map +1 -0
- package/singlestore-core/primary-keys.d.cts +30 -0
- package/singlestore-core/primary-keys.d.ts +30 -0
- package/singlestore-core/primary-keys.js +42 -0
- package/singlestore-core/primary-keys.js.map +1 -0
- package/singlestore-core/query-builders/count.cjs +73 -0
- package/singlestore-core/query-builders/count.cjs.map +1 -0
- package/singlestore-core/query-builders/count.d.cts +25 -0
- package/singlestore-core/query-builders/count.d.ts +25 -0
- package/singlestore-core/query-builders/count.js +49 -0
- package/singlestore-core/query-builders/count.js.map +1 -0
- package/singlestore-core/query-builders/delete.cjs +123 -0
- package/singlestore-core/query-builders/delete.cjs.map +1 -0
- package/singlestore-core/query-builders/delete.d.cts +83 -0
- package/singlestore-core/query-builders/delete.d.ts +83 -0
- package/singlestore-core/query-builders/delete.js +99 -0
- package/singlestore-core/query-builders/delete.js.map +1 -0
- package/singlestore-core/query-builders/index.cjs +33 -0
- package/singlestore-core/query-builders/index.cjs.map +1 -0
- package/singlestore-core/query-builders/index.d.cts +6 -0
- package/singlestore-core/query-builders/index.d.ts +6 -0
- package/singlestore-core/query-builders/index.js +7 -0
- package/singlestore-core/query-builders/index.js.map +1 -0
- package/singlestore-core/query-builders/insert.cjs +146 -0
- package/singlestore-core/query-builders/insert.cjs.map +1 -0
- package/singlestore-core/query-builders/insert.d.cts +106 -0
- package/singlestore-core/query-builders/insert.d.ts +106 -0
- package/singlestore-core/query-builders/insert.js +121 -0
- package/singlestore-core/query-builders/insert.js.map +1 -0
- package/singlestore-core/query-builders/query-builder.cjs +99 -0
- package/singlestore-core/query-builders/query-builder.cjs.map +1 -0
- package/singlestore-core/query-builders/query-builder.d.cts +33 -0
- package/singlestore-core/query-builders/query-builder.d.ts +33 -0
- package/singlestore-core/query-builders/query-builder.js +75 -0
- package/singlestore-core/query-builders/query-builder.js.map +1 -0
- package/singlestore-core/query-builders/query.cjs +126 -0
- package/singlestore-core/query-builders/query.cjs.map +1 -0
- package/singlestore-core/query-builders/query.d.cts +42 -0
- package/singlestore-core/query-builders/query.d.ts +42 -0
- package/singlestore-core/query-builders/query.js +103 -0
- package/singlestore-core/query-builders/query.js.map +1 -0
- package/singlestore-core/query-builders/select.cjs +687 -0
- package/singlestore-core/query-builders/select.cjs.map +1 -0
- package/singlestore-core/query-builders/select.d.cts +585 -0
- package/singlestore-core/query-builders/select.d.ts +585 -0
- package/singlestore-core/query-builders/select.js +662 -0
- package/singlestore-core/query-builders/select.js.map +1 -0
- package/singlestore-core/query-builders/select.types.cjs +17 -0
- package/singlestore-core/query-builders/select.types.cjs.map +1 -0
- package/singlestore-core/query-builders/select.types.d.cts +137 -0
- package/singlestore-core/query-builders/select.types.d.ts +137 -0
- package/singlestore-core/query-builders/select.types.js +1 -0
- package/singlestore-core/query-builders/select.types.js.map +1 -0
- package/singlestore-core/query-builders/update.cjs +147 -0
- package/singlestore-core/query-builders/update.cjs.map +1 -0
- package/singlestore-core/query-builders/update.d.cts +102 -0
- package/singlestore-core/query-builders/update.d.ts +102 -0
- package/singlestore-core/query-builders/update.js +122 -0
- package/singlestore-core/query-builders/update.js.map +1 -0
- package/singlestore-core/schema.cjs +56 -0
- package/singlestore-core/schema.cjs.map +1 -0
- package/singlestore-core/schema.d.cts +22 -0
- package/singlestore-core/schema.d.ts +22 -0
- package/singlestore-core/schema.js +29 -0
- package/singlestore-core/schema.js.map +1 -0
- package/singlestore-core/session.cjs +87 -0
- package/singlestore-core/session.cjs.map +1 -0
- package/singlestore-core/session.d.cts +66 -0
- package/singlestore-core/session.d.ts +66 -0
- package/singlestore-core/session.js +61 -0
- package/singlestore-core/session.js.map +1 -0
- package/singlestore-core/subquery.cjs +17 -0
- package/singlestore-core/subquery.cjs.map +1 -0
- package/singlestore-core/subquery.d.cts +5 -0
- package/singlestore-core/subquery.d.ts +5 -0
- package/singlestore-core/subquery.js +1 -0
- package/singlestore-core/subquery.js.map +1 -0
- package/singlestore-core/table.cjs +73 -0
- package/singlestore-core/table.cjs.map +1 -0
- package/singlestore-core/table.d.cts +40 -0
- package/singlestore-core/table.d.ts +40 -0
- package/singlestore-core/table.js +46 -0
- package/singlestore-core/table.js.map +1 -0
- package/singlestore-core/unique-constraint.cjs +82 -0
- package/singlestore-core/unique-constraint.cjs.map +1 -0
- package/singlestore-core/unique-constraint.d.cts +24 -0
- package/singlestore-core/unique-constraint.d.ts +24 -0
- package/singlestore-core/unique-constraint.js +54 -0
- package/singlestore-core/unique-constraint.js.map +1 -0
- package/singlestore-core/utils.cjs +65 -0
- package/singlestore-core/utils.cjs.map +1 -0
- package/singlestore-core/utils.d.cts +13 -0
- package/singlestore-core/utils.d.ts +13 -0
- package/singlestore-core/utils.js +41 -0
- package/singlestore-core/utils.js.map +1 -0
- package/singlestore-core/view-base.cjs +33 -0
- package/singlestore-core/view-base.cjs.map +1 -0
- package/singlestore-core/view-base.d.cts +9 -0
- package/singlestore-core/view-base.d.ts +9 -0
- package/singlestore-core/view-base.js +9 -0
- package/singlestore-core/view-base.js.map +1 -0
- package/singlestore-core/view-common.cjs +29 -0
- package/singlestore-core/view-common.cjs.map +1 -0
- package/singlestore-core/view-common.d.cts +1 -0
- package/singlestore-core/view-common.d.ts +1 -0
- package/singlestore-core/view-common.js +5 -0
- package/singlestore-core/view-common.js.map +1 -0
- package/singlestore-core/view.cjs +146 -0
- package/singlestore-core/view.cjs.map +1 -0
- package/singlestore-core/view.d.cts +65 -0
- package/singlestore-core/view.d.ts +65 -0
- package/singlestore-core/view.js +119 -0
- package/singlestore-core/view.js.map +1 -0
- package/singlestore-proxy/driver.cjs +62 -0
- package/singlestore-proxy/driver.cjs.map +1 -0
- package/singlestore-proxy/driver.d.cts +13 -0
- package/singlestore-proxy/driver.d.ts +13 -0
- package/singlestore-proxy/driver.js +42 -0
- package/singlestore-proxy/driver.js.map +1 -0
- package/singlestore-proxy/index.cjs +25 -0
- package/singlestore-proxy/index.cjs.map +1 -0
- package/singlestore-proxy/index.d.cts +2 -0
- package/singlestore-proxy/index.d.ts +2 -0
- package/singlestore-proxy/index.js +3 -0
- package/singlestore-proxy/index.js.map +1 -0
- package/singlestore-proxy/migrator.cjs +60 -0
- package/singlestore-proxy/migrator.cjs.map +1 -0
- package/singlestore-proxy/migrator.d.cts +4 -0
- package/singlestore-proxy/migrator.d.ts +4 -0
- package/singlestore-proxy/migrator.js +36 -0
- package/singlestore-proxy/migrator.js.map +1 -0
- package/singlestore-proxy/session.cjs +127 -0
- package/singlestore-proxy/session.cjs.map +1 -0
- package/singlestore-proxy/session.d.cts +50 -0
- package/singlestore-proxy/session.d.ts +50 -0
- package/singlestore-proxy/session.js +101 -0
- package/singlestore-proxy/session.js.map +1 -0
- package/sql/sql.cjs +8 -0
- package/sql/sql.cjs.map +1 -1
- package/sql/sql.d.cts +10 -2
- package/sql/sql.d.ts +10 -2
- package/sql/sql.js +7 -0
- package/sql/sql.js.map +1 -1
- package/sqlite-core/columns/blob.cjs +16 -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 +16 -2
- package/sqlite-core/columns/blob.js.map +1 -1
- package/sqlite-core/utils.d.cts +1 -2
- package/sqlite-core/utils.d.ts +1 -2
- package/sqlite-core/view.cjs.map +1 -1
- package/sqlite-core/view.d.cts +2 -3
- package/sqlite-core/view.d.ts +2 -3
- package/sqlite-core/view.js.map +1 -1
- package/utils.cjs +5 -0
- package/utils.cjs.map +1 -1
- package/utils.d.cts +2 -1
- package/utils.d.ts +2 -1
- package/utils.js +4 -0
- package/utils.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,56 @@
|
|
|
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 time_exports = {};
|
|
20
|
+
__export(time_exports, {
|
|
21
|
+
SingleStoreTime: () => SingleStoreTime,
|
|
22
|
+
SingleStoreTimeBuilder: () => SingleStoreTimeBuilder,
|
|
23
|
+
time: () => time
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(time_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_common = require("./common.cjs");
|
|
28
|
+
class SingleStoreTimeBuilder extends import_common.SingleStoreColumnBuilder {
|
|
29
|
+
static [import_entity.entityKind] = "SingleStoreTimeBuilder";
|
|
30
|
+
constructor(name) {
|
|
31
|
+
super(name, "string", "SingleStoreTime");
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
build(table) {
|
|
35
|
+
return new SingleStoreTime(
|
|
36
|
+
table,
|
|
37
|
+
this.config
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class SingleStoreTime extends import_common.SingleStoreColumn {
|
|
42
|
+
static [import_entity.entityKind] = "SingleStoreTime";
|
|
43
|
+
getSQLType() {
|
|
44
|
+
return `time`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function time(name) {
|
|
48
|
+
return new SingleStoreTimeBuilder(name ?? "");
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
SingleStoreTime,
|
|
53
|
+
SingleStoreTimeBuilder,
|
|
54
|
+
time
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=time.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/time.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';\n\nexport type SingleStoreTimeBuilderInitial<TName extends string> = SingleStoreTimeBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SingleStoreTime';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTime'>>\n\textends SingleStoreColumnBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimeBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'string', 'SingleStoreTime');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTime<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTime<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 SingleStoreTime<\n\tT extends ColumnBaseConfig<'string', 'SingleStoreTime'>,\n> extends SingleStoreColumn<T> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreTime';\n\n\tgetSQLType(): string {\n\t\treturn `time`;\n\t}\n}\n\nexport function time(): SingleStoreTimeBuilderInitial<''>;\nexport function time<TName extends string>(name: TName): SingleStoreTimeBuilderInitial<TName>;\nexport function time(name?: string) {\n\treturn new SingleStoreTimeBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4D;AAYrD,MAAM,+BACJ,uCAGT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,UAAU,iBAAiB;AAAA,EACxC;AAAA;AAAA,EAGS,MACR,OACmD;AACnD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,wBAEH,gCAAqB;AAAA,EAC9B,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,uBAAuB,QAAQ,EAAE;AAC7C;","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 { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.cjs";
|
|
5
|
+
export type SingleStoreTimeBuilderInitial<TName extends string> = SingleStoreTimeBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'string';
|
|
8
|
+
columnType: 'SingleStoreTime';
|
|
9
|
+
data: string;
|
|
10
|
+
driverParam: string | number;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class SingleStoreTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTime'>> extends SingleStoreColumnBuilder<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class SingleStoreTime<T extends ColumnBaseConfig<'string', 'SingleStoreTime'>> extends SingleStoreColumn<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
getSQLType(): string;
|
|
21
|
+
}
|
|
22
|
+
export declare function time(): SingleStoreTimeBuilderInitial<''>;
|
|
23
|
+
export declare function time<TName extends string>(name: TName): SingleStoreTimeBuilderInitial<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 { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
|
|
5
|
+
export type SingleStoreTimeBuilderInitial<TName extends string> = SingleStoreTimeBuilder<{
|
|
6
|
+
name: TName;
|
|
7
|
+
dataType: 'string';
|
|
8
|
+
columnType: 'SingleStoreTime';
|
|
9
|
+
data: string;
|
|
10
|
+
driverParam: string | number;
|
|
11
|
+
enumValues: undefined;
|
|
12
|
+
generated: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class SingleStoreTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTime'>> extends SingleStoreColumnBuilder<T> {
|
|
15
|
+
static readonly [entityKind]: string;
|
|
16
|
+
constructor(name: T['name']);
|
|
17
|
+
}
|
|
18
|
+
export declare class SingleStoreTime<T extends ColumnBaseConfig<'string', 'SingleStoreTime'>> extends SingleStoreColumn<T> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
getSQLType(): string;
|
|
21
|
+
}
|
|
22
|
+
export declare function time(): SingleStoreTimeBuilderInitial<''>;
|
|
23
|
+
export declare function time<TName extends string>(name: TName): SingleStoreTimeBuilderInitial<TName>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
|
|
3
|
+
class SingleStoreTimeBuilder extends SingleStoreColumnBuilder {
|
|
4
|
+
static [entityKind] = "SingleStoreTimeBuilder";
|
|
5
|
+
constructor(name) {
|
|
6
|
+
super(name, "string", "SingleStoreTime");
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
build(table) {
|
|
10
|
+
return new SingleStoreTime(
|
|
11
|
+
table,
|
|
12
|
+
this.config
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class SingleStoreTime extends SingleStoreColumn {
|
|
17
|
+
static [entityKind] = "SingleStoreTime";
|
|
18
|
+
getSQLType() {
|
|
19
|
+
return `time`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function time(name) {
|
|
23
|
+
return new SingleStoreTimeBuilder(name ?? "");
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
SingleStoreTime,
|
|
27
|
+
SingleStoreTimeBuilder,
|
|
28
|
+
time
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/time.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';\n\nexport type SingleStoreTimeBuilderInitial<TName extends string> = SingleStoreTimeBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SingleStoreTime';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTime'>>\n\textends SingleStoreColumnBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimeBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'string', 'SingleStoreTime');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTime<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTime<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 SingleStoreTime<\n\tT extends ColumnBaseConfig<'string', 'SingleStoreTime'>,\n> extends SingleStoreColumn<T> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreTime';\n\n\tgetSQLType(): string {\n\t\treturn `time`;\n\t}\n}\n\nexport function time(): SingleStoreTimeBuilderInitial<''>;\nexport function time<TName extends string>(name: TName): SingleStoreTimeBuilderInitial<TName>;\nexport function time(name?: string) {\n\treturn new SingleStoreTimeBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB,gCAAgC;AAYrD,MAAM,+BACJ,yBAGT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,UAAU,iBAAiB;AAAA,EACxC;AAAA;AAAA,EAGS,MACR,OACmD;AACnD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,wBAEH,kBAAqB;AAAA,EAC9B,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,uBAAuB,QAAQ,EAAE;AAC7C;","names":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
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 timestamp_exports = {};
|
|
20
|
+
__export(timestamp_exports, {
|
|
21
|
+
SingleStoreTimestamp: () => SingleStoreTimestamp,
|
|
22
|
+
SingleStoreTimestampBuilder: () => SingleStoreTimestampBuilder,
|
|
23
|
+
SingleStoreTimestampString: () => SingleStoreTimestampString,
|
|
24
|
+
SingleStoreTimestampStringBuilder: () => SingleStoreTimestampStringBuilder,
|
|
25
|
+
timestamp: () => timestamp
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(timestamp_exports);
|
|
28
|
+
var import_entity = require("../../entity.cjs");
|
|
29
|
+
var import_sql = require("../../sql/sql.cjs");
|
|
30
|
+
var import_utils = require("../../utils.cjs");
|
|
31
|
+
var import_date_common = require("./date.common.cjs");
|
|
32
|
+
class SingleStoreTimestampBuilder extends import_date_common.SingleStoreDateColumnBaseBuilder {
|
|
33
|
+
static [import_entity.entityKind] = "SingleStoreTimestampBuilder";
|
|
34
|
+
constructor(name) {
|
|
35
|
+
super(name, "date", "SingleStoreTimestamp");
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
build(table) {
|
|
39
|
+
return new SingleStoreTimestamp(
|
|
40
|
+
table,
|
|
41
|
+
this.config
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
defaultNow() {
|
|
45
|
+
return this.default(import_sql.sql`CURRENT_TIMESTAMP`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class SingleStoreTimestamp extends import_date_common.SingleStoreDateBaseColumn {
|
|
49
|
+
static [import_entity.entityKind] = "SingleStoreTimestamp";
|
|
50
|
+
getSQLType() {
|
|
51
|
+
return `timestamp`;
|
|
52
|
+
}
|
|
53
|
+
mapFromDriverValue(value) {
|
|
54
|
+
return /* @__PURE__ */ new Date(value + "+0000");
|
|
55
|
+
}
|
|
56
|
+
mapToDriverValue(value) {
|
|
57
|
+
return value.toISOString().slice(0, -1).replace("T", " ");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class SingleStoreTimestampStringBuilder extends import_date_common.SingleStoreDateColumnBaseBuilder {
|
|
61
|
+
static [import_entity.entityKind] = "SingleStoreTimestampStringBuilder";
|
|
62
|
+
constructor(name) {
|
|
63
|
+
super(name, "string", "SingleStoreTimestampString");
|
|
64
|
+
}
|
|
65
|
+
/** @internal */
|
|
66
|
+
build(table) {
|
|
67
|
+
return new SingleStoreTimestampString(
|
|
68
|
+
table,
|
|
69
|
+
this.config
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
defaultNow() {
|
|
73
|
+
return this.default(import_sql.sql`CURRENT_TIMESTAMP`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class SingleStoreTimestampString extends import_date_common.SingleStoreDateBaseColumn {
|
|
77
|
+
static [import_entity.entityKind] = "SingleStoreTimestampString";
|
|
78
|
+
getSQLType() {
|
|
79
|
+
return `timestamp`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function timestamp(a, b = {}) {
|
|
83
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
84
|
+
if (config?.mode === "string") {
|
|
85
|
+
return new SingleStoreTimestampStringBuilder(name);
|
|
86
|
+
}
|
|
87
|
+
return new SingleStoreTimestampBuilder(name);
|
|
88
|
+
}
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
SingleStoreTimestamp,
|
|
92
|
+
SingleStoreTimestampBuilder,
|
|
93
|
+
SingleStoreTimestampString,
|
|
94
|
+
SingleStoreTimestampStringBuilder,
|
|
95
|
+
timestamp
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=timestamp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/timestamp.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { sql } from '~/sql/sql.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from './date.common.ts';\n\nexport type SingleStoreTimestampBuilderInitial<TName extends string> = SingleStoreTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SingleStoreTimestamp';\n\tdata: Date;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>>\n\textends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'date', 'SingleStoreTimestamp');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTimestamp<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTimestamp<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n\n\toverride defaultNow() {\n\t\treturn this.default(sql`CURRENT_TIMESTAMP`);\n\t}\n}\n\nexport class SingleStoreTimestamp<T extends ColumnBaseConfig<'date', 'SingleStoreTimestamp'>>\n\textends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestamp';\n\n\tgetSQLType(): string {\n\t\treturn `timestamp`;\n\t}\n\n\toverride mapFromDriverValue(value: string): Date {\n\t\treturn new Date(value + '+0000');\n\t}\n\n\toverride mapToDriverValue(value: Date): string {\n\t\treturn value.toISOString().slice(0, -1).replace('T', ' ');\n\t}\n}\n\nexport type SingleStoreTimestampStringBuilderInitial<TName extends string> = SingleStoreTimestampStringBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SingleStoreTimestampString';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimestampStringBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SingleStoreTimestampString'>,\n> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampStringBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SingleStoreTimestampString');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTimestampString<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTimestampString<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n\n\toverride defaultNow() {\n\t\treturn this.default(sql`CURRENT_TIMESTAMP`);\n\t}\n}\n\nexport class SingleStoreTimestampString<T extends ColumnBaseConfig<'string', 'SingleStoreTimestampString'>>\n\textends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampString';\n\n\tgetSQLType(): string {\n\t\treturn `timestamp`;\n\t}\n}\n\nexport interface SingleStoreTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {\n\tmode?: TMode;\n}\n\nexport function timestamp(): SingleStoreTimestampBuilderInitial<''>;\nexport function timestamp<TMode extends SingleStoreTimestampConfig['mode'] & {}>(\n\tconfig?: SingleStoreTimestampConfig<TMode>,\n): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<''>\n\t: SingleStoreTimestampBuilderInitial<''>;\nexport function timestamp<TName extends string, TMode extends SingleStoreTimestampConfig['mode'] & {}>(\n\tname: TName,\n\tconfig?: SingleStoreTimestampConfig<TMode>,\n): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<TName>\n\t: SingleStoreTimestampBuilderInitial<TName>;\nexport function timestamp(a?: string | SingleStoreTimestampConfig, b: SingleStoreTimestampConfig = {}) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreTimestampConfig | undefined>(a, b);\n\tif (config?.mode === 'string') {\n\t\treturn new SingleStoreTimestampStringBuilder(name);\n\t}\n\treturn new SingleStoreTimestampBuilder(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,iBAAoB;AACpB,mBAAmD;AACnD,yBAA4E;AAYrE,MAAM,oCACJ,oDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,QAAQ,sBAAsB;AAAA,EAC3C;AAAA;AAAA,EAGS,MACR,OACwD;AACxD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AAAA,EAES,aAAa;AACrB,WAAO,KAAK,QAAQ,iCAAsB;AAAA,EAC3C;AACD;AAEO,MAAM,6BACJ,6CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAqB;AAChD,WAAO,oBAAI,KAAK,QAAQ,OAAO;AAAA,EAChC;AAAA,EAES,iBAAiB,OAAqB;AAC9C,WAAO,MAAM,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,KAAK,GAAG;AAAA,EACzD;AACD;AAYO,MAAM,0CAEH,oDAAgE;AAAA,EACzE,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,4BAA4B;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OAC8D;AAC9D,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AAAA,EAES,aAAa;AACrB,WAAO,KAAK,QAAQ,iCAAsB;AAAA,EAC3C;AACD;AAEO,MAAM,mCACJ,6CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAgBO,SAAS,UAAU,GAAyC,IAAgC,CAAC,GAAG;AACtG,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA+D,GAAG,CAAC;AAC5F,MAAI,QAAQ,SAAS,UAAU;AAC9B,WAAO,IAAI,kCAAkC,IAAI;AAAA,EAClD;AACA,SAAO,IAAI,4BAA4B,IAAI;AAC5C;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { type Equal } from "../../utils.cjs";
|
|
5
|
+
import { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from "./date.common.cjs";
|
|
6
|
+
export type SingleStoreTimestampBuilderInitial<TName extends string> = SingleStoreTimestampBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'date';
|
|
9
|
+
columnType: 'SingleStoreTimestamp';
|
|
10
|
+
data: Date;
|
|
11
|
+
driverParam: string | number;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name']);
|
|
18
|
+
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
|
|
19
|
+
}
|
|
20
|
+
export declare class SingleStoreTimestamp<T extends ColumnBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
|
|
21
|
+
static readonly [entityKind]: string;
|
|
22
|
+
getSQLType(): string;
|
|
23
|
+
mapFromDriverValue(value: string): Date;
|
|
24
|
+
mapToDriverValue(value: Date): string;
|
|
25
|
+
}
|
|
26
|
+
export type SingleStoreTimestampStringBuilderInitial<TName extends string> = SingleStoreTimestampStringBuilder<{
|
|
27
|
+
name: TName;
|
|
28
|
+
dataType: 'string';
|
|
29
|
+
columnType: 'SingleStoreTimestampString';
|
|
30
|
+
data: string;
|
|
31
|
+
driverParam: string | number;
|
|
32
|
+
enumValues: undefined;
|
|
33
|
+
generated: undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export declare class SingleStoreTimestampStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
|
|
36
|
+
static readonly [entityKind]: string;
|
|
37
|
+
constructor(name: T['name']);
|
|
38
|
+
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
|
|
39
|
+
}
|
|
40
|
+
export declare class SingleStoreTimestampString<T extends ColumnBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
|
|
41
|
+
static readonly [entityKind]: string;
|
|
42
|
+
getSQLType(): string;
|
|
43
|
+
}
|
|
44
|
+
export interface SingleStoreTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {
|
|
45
|
+
mode?: TMode;
|
|
46
|
+
}
|
|
47
|
+
export declare function timestamp(): SingleStoreTimestampBuilderInitial<''>;
|
|
48
|
+
export declare function timestamp<TMode extends SingleStoreTimestampConfig['mode'] & {}>(config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<''> : SingleStoreTimestampBuilderInitial<''>;
|
|
49
|
+
export declare function timestamp<TName extends string, TMode extends SingleStoreTimestampConfig['mode'] & {}>(name: TName, config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<TName> : SingleStoreTimestampBuilderInitial<TName>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { type Equal } from "../../utils.js";
|
|
5
|
+
import { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from "./date.common.js";
|
|
6
|
+
export type SingleStoreTimestampBuilderInitial<TName extends string> = SingleStoreTimestampBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'date';
|
|
9
|
+
columnType: 'SingleStoreTimestamp';
|
|
10
|
+
data: Date;
|
|
11
|
+
driverParam: string | number;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name']);
|
|
18
|
+
defaultNow(): import("../../column-builder.js").HasDefault<this>;
|
|
19
|
+
}
|
|
20
|
+
export declare class SingleStoreTimestamp<T extends ColumnBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
|
|
21
|
+
static readonly [entityKind]: string;
|
|
22
|
+
getSQLType(): string;
|
|
23
|
+
mapFromDriverValue(value: string): Date;
|
|
24
|
+
mapToDriverValue(value: Date): string;
|
|
25
|
+
}
|
|
26
|
+
export type SingleStoreTimestampStringBuilderInitial<TName extends string> = SingleStoreTimestampStringBuilder<{
|
|
27
|
+
name: TName;
|
|
28
|
+
dataType: 'string';
|
|
29
|
+
columnType: 'SingleStoreTimestampString';
|
|
30
|
+
data: string;
|
|
31
|
+
driverParam: string | number;
|
|
32
|
+
enumValues: undefined;
|
|
33
|
+
generated: undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export declare class SingleStoreTimestampStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
|
|
36
|
+
static readonly [entityKind]: string;
|
|
37
|
+
constructor(name: T['name']);
|
|
38
|
+
defaultNow(): import("../../column-builder.js").HasDefault<this>;
|
|
39
|
+
}
|
|
40
|
+
export declare class SingleStoreTimestampString<T extends ColumnBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
|
|
41
|
+
static readonly [entityKind]: string;
|
|
42
|
+
getSQLType(): string;
|
|
43
|
+
}
|
|
44
|
+
export interface SingleStoreTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {
|
|
45
|
+
mode?: TMode;
|
|
46
|
+
}
|
|
47
|
+
export declare function timestamp(): SingleStoreTimestampBuilderInitial<''>;
|
|
48
|
+
export declare function timestamp<TMode extends SingleStoreTimestampConfig['mode'] & {}>(config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<''> : SingleStoreTimestampBuilderInitial<''>;
|
|
49
|
+
export declare function timestamp<TName extends string, TMode extends SingleStoreTimestampConfig['mode'] & {}>(name: TName, config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<TName> : SingleStoreTimestampBuilderInitial<TName>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { sql } from "../../sql/sql.js";
|
|
3
|
+
import { getColumnNameAndConfig } from "../../utils.js";
|
|
4
|
+
import { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from "./date.common.js";
|
|
5
|
+
class SingleStoreTimestampBuilder extends SingleStoreDateColumnBaseBuilder {
|
|
6
|
+
static [entityKind] = "SingleStoreTimestampBuilder";
|
|
7
|
+
constructor(name) {
|
|
8
|
+
super(name, "date", "SingleStoreTimestamp");
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
build(table) {
|
|
12
|
+
return new SingleStoreTimestamp(
|
|
13
|
+
table,
|
|
14
|
+
this.config
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
defaultNow() {
|
|
18
|
+
return this.default(sql`CURRENT_TIMESTAMP`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
class SingleStoreTimestamp extends SingleStoreDateBaseColumn {
|
|
22
|
+
static [entityKind] = "SingleStoreTimestamp";
|
|
23
|
+
getSQLType() {
|
|
24
|
+
return `timestamp`;
|
|
25
|
+
}
|
|
26
|
+
mapFromDriverValue(value) {
|
|
27
|
+
return /* @__PURE__ */ new Date(value + "+0000");
|
|
28
|
+
}
|
|
29
|
+
mapToDriverValue(value) {
|
|
30
|
+
return value.toISOString().slice(0, -1).replace("T", " ");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
class SingleStoreTimestampStringBuilder extends SingleStoreDateColumnBaseBuilder {
|
|
34
|
+
static [entityKind] = "SingleStoreTimestampStringBuilder";
|
|
35
|
+
constructor(name) {
|
|
36
|
+
super(name, "string", "SingleStoreTimestampString");
|
|
37
|
+
}
|
|
38
|
+
/** @internal */
|
|
39
|
+
build(table) {
|
|
40
|
+
return new SingleStoreTimestampString(
|
|
41
|
+
table,
|
|
42
|
+
this.config
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
defaultNow() {
|
|
46
|
+
return this.default(sql`CURRENT_TIMESTAMP`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
class SingleStoreTimestampString extends SingleStoreDateBaseColumn {
|
|
50
|
+
static [entityKind] = "SingleStoreTimestampString";
|
|
51
|
+
getSQLType() {
|
|
52
|
+
return `timestamp`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function timestamp(a, b = {}) {
|
|
56
|
+
const { name, config } = getColumnNameAndConfig(a, b);
|
|
57
|
+
if (config?.mode === "string") {
|
|
58
|
+
return new SingleStoreTimestampStringBuilder(name);
|
|
59
|
+
}
|
|
60
|
+
return new SingleStoreTimestampBuilder(name);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
SingleStoreTimestamp,
|
|
64
|
+
SingleStoreTimestampBuilder,
|
|
65
|
+
SingleStoreTimestampString,
|
|
66
|
+
SingleStoreTimestampStringBuilder,
|
|
67
|
+
timestamp
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/timestamp.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { sql } from '~/sql/sql.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from './date.common.ts';\n\nexport type SingleStoreTimestampBuilderInitial<TName extends string> = SingleStoreTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SingleStoreTimestamp';\n\tdata: Date;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>>\n\textends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'date', 'SingleStoreTimestamp');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTimestamp<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTimestamp<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n\n\toverride defaultNow() {\n\t\treturn this.default(sql`CURRENT_TIMESTAMP`);\n\t}\n}\n\nexport class SingleStoreTimestamp<T extends ColumnBaseConfig<'date', 'SingleStoreTimestamp'>>\n\textends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestamp';\n\n\tgetSQLType(): string {\n\t\treturn `timestamp`;\n\t}\n\n\toverride mapFromDriverValue(value: string): Date {\n\t\treturn new Date(value + '+0000');\n\t}\n\n\toverride mapToDriverValue(value: Date): string {\n\t\treturn value.toISOString().slice(0, -1).replace('T', ' ');\n\t}\n}\n\nexport type SingleStoreTimestampStringBuilderInitial<TName extends string> = SingleStoreTimestampStringBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SingleStoreTimestampString';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimestampStringBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SingleStoreTimestampString'>,\n> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampStringBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SingleStoreTimestampString');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTimestampString<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTimestampString<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n\n\toverride defaultNow() {\n\t\treturn this.default(sql`CURRENT_TIMESTAMP`);\n\t}\n}\n\nexport class SingleStoreTimestampString<T extends ColumnBaseConfig<'string', 'SingleStoreTimestampString'>>\n\textends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimestampString';\n\n\tgetSQLType(): string {\n\t\treturn `timestamp`;\n\t}\n}\n\nexport interface SingleStoreTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {\n\tmode?: TMode;\n}\n\nexport function timestamp(): SingleStoreTimestampBuilderInitial<''>;\nexport function timestamp<TMode extends SingleStoreTimestampConfig['mode'] & {}>(\n\tconfig?: SingleStoreTimestampConfig<TMode>,\n): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<''>\n\t: SingleStoreTimestampBuilderInitial<''>;\nexport function timestamp<TName extends string, TMode extends SingleStoreTimestampConfig['mode'] & {}>(\n\tname: TName,\n\tconfig?: SingleStoreTimestampConfig<TMode>,\n): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<TName>\n\t: SingleStoreTimestampBuilderInitial<TName>;\nexport function timestamp(a?: string | SingleStoreTimestampConfig, b: SingleStoreTimestampConfig = {}) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreTimestampConfig | undefined>(a, b);\n\tif (config?.mode === 'string') {\n\t\treturn new SingleStoreTimestampStringBuilder(name);\n\t}\n\treturn new SingleStoreTimestampBuilder(name);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,WAAW;AACpB,SAAqB,8BAA8B;AACnD,SAAS,2BAA2B,wCAAwC;AAYrE,MAAM,oCACJ,iCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,QAAQ,sBAAsB;AAAA,EAC3C;AAAA;AAAA,EAGS,MACR,OACwD;AACxD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AAAA,EAES,aAAa;AACrB,WAAO,KAAK,QAAQ,sBAAsB;AAAA,EAC3C;AACD;AAEO,MAAM,6BACJ,0BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAqB;AAChD,WAAO,oBAAI,KAAK,QAAQ,OAAO;AAAA,EAChC;AAAA,EAES,iBAAiB,OAAqB;AAC9C,WAAO,MAAM,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,KAAK,GAAG;AAAA,EACzD;AACD;AAYO,MAAM,0CAEH,iCAAgE;AAAA,EACzE,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,4BAA4B;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OAC8D;AAC9D,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AAAA,EAES,aAAa;AACrB,WAAO,KAAK,QAAQ,sBAAsB;AAAA,EAC3C;AACD;AAEO,MAAM,mCACJ,0BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAgBO,SAAS,UAAU,GAAyC,IAAgC,CAAC,GAAG;AACtG,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA+D,GAAG,CAAC;AAC5F,MAAI,QAAQ,SAAS,UAAU;AAC9B,WAAO,IAAI,kCAAkC,IAAI;AAAA,EAClD;AACA,SAAO,IAAI,4BAA4B,IAAI;AAC5C;","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 tinyint_exports = {};
|
|
20
|
+
__export(tinyint_exports, {
|
|
21
|
+
SingleStoreTinyInt: () => SingleStoreTinyInt,
|
|
22
|
+
SingleStoreTinyIntBuilder: () => SingleStoreTinyIntBuilder,
|
|
23
|
+
tinyint: () => tinyint
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(tinyint_exports);
|
|
26
|
+
var import_entity = require("../../entity.cjs");
|
|
27
|
+
var import_utils = require("../../utils.cjs");
|
|
28
|
+
var import_common = require("./common.cjs");
|
|
29
|
+
class SingleStoreTinyIntBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
|
|
30
|
+
static [import_entity.entityKind] = "SingleStoreTinyIntBuilder";
|
|
31
|
+
constructor(name, config) {
|
|
32
|
+
super(name, "number", "SingleStoreTinyInt");
|
|
33
|
+
this.config.unsigned = config ? config.unsigned : false;
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
build(table) {
|
|
37
|
+
return new SingleStoreTinyInt(
|
|
38
|
+
table,
|
|
39
|
+
this.config
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class SingleStoreTinyInt extends import_common.SingleStoreColumnWithAutoIncrement {
|
|
44
|
+
static [import_entity.entityKind] = "SingleStoreTinyInt";
|
|
45
|
+
getSQLType() {
|
|
46
|
+
return `tinyint${this.config.unsigned ? " unsigned" : ""}`;
|
|
47
|
+
}
|
|
48
|
+
mapFromDriverValue(value) {
|
|
49
|
+
if (typeof value === "string") {
|
|
50
|
+
return Number(value);
|
|
51
|
+
}
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function tinyint(a, b) {
|
|
56
|
+
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
|
|
57
|
+
return new SingleStoreTinyIntBuilder(name, config);
|
|
58
|
+
}
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
SingleStoreTinyInt,
|
|
62
|
+
SingleStoreTinyIntBuilder,
|
|
63
|
+
tinyint
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=tinyint.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/tinyint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from './common.ts';\nimport type { SingleStoreIntConfig } from './int.ts';\n\nexport type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SingleStoreTinyInt';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyIntBuilder';\n\n\tconstructor(name: T['name'], config?: SingleStoreIntConfig) {\n\t\tsuper(name, 'number', 'SingleStoreTinyInt');\n\t\tthis.config.unsigned = config ? config.unsigned : false;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTinyInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTinyInt<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 SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyInt';\n\n\tgetSQLType(): string {\n\t\treturn `tinyint${this.config.unsigned ? ' unsigned' : ''}`;\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 tinyint(): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint(\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint<TName extends string>(\n\tname: TName,\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<TName>;\nexport function tinyint(a?: string | SingleStoreIntConfig, b?: SingleStoreIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreIntConfig>(a, b);\n\treturn new SingleStoreTinyIntBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAA8F;AAavF,MAAM,kCACJ,wDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA+B;AAC3D,UAAM,MAAM,UAAU,oBAAoB;AAC1C,SAAK,OAAO,WAAW,SAAS,OAAO,WAAW;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OACsD;AACtD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,2BACJ,iDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO,UAAU,KAAK,OAAO,WAAW,cAAc,EAAE;AAAA,EACzD;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAUO,SAAS,QAAQ,GAAmC,GAA0B;AACpF,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,0BAA0B,MAAM,MAAM;AAClD;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.cjs";
|
|
3
|
+
import { entityKind } from "../../entity.cjs";
|
|
4
|
+
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.cjs";
|
|
5
|
+
import type { SingleStoreIntConfig } from "./int.cjs";
|
|
6
|
+
export type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'number';
|
|
9
|
+
columnType: 'SingleStoreTinyInt';
|
|
10
|
+
data: number;
|
|
11
|
+
driverParam: number | string;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name'], config?: SingleStoreIntConfig);
|
|
18
|
+
}
|
|
19
|
+
export declare class SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
getSQLType(): string;
|
|
22
|
+
mapFromDriverValue(value: number | string): number;
|
|
23
|
+
}
|
|
24
|
+
export declare function tinyint(): SingleStoreTinyIntBuilderInitial<''>;
|
|
25
|
+
export declare function tinyint(config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<''>;
|
|
26
|
+
export declare function tinyint<TName extends string>(name: TName, config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<TName>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
|
|
2
|
+
import type { ColumnBaseConfig } from "../../column.js";
|
|
3
|
+
import { entityKind } from "../../entity.js";
|
|
4
|
+
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
|
|
5
|
+
import type { SingleStoreIntConfig } from "./int.js";
|
|
6
|
+
export type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'number';
|
|
9
|
+
columnType: 'SingleStoreTinyInt';
|
|
10
|
+
data: number;
|
|
11
|
+
driverParam: number | string;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig> {
|
|
16
|
+
static readonly [entityKind]: string;
|
|
17
|
+
constructor(name: T['name'], config?: SingleStoreIntConfig);
|
|
18
|
+
}
|
|
19
|
+
export declare class SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig> {
|
|
20
|
+
static readonly [entityKind]: string;
|
|
21
|
+
getSQLType(): string;
|
|
22
|
+
mapFromDriverValue(value: number | string): number;
|
|
23
|
+
}
|
|
24
|
+
export declare function tinyint(): SingleStoreTinyIntBuilderInitial<''>;
|
|
25
|
+
export declare function tinyint(config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<''>;
|
|
26
|
+
export declare function tinyint<TName extends string>(name: TName, config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<TName>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { entityKind } from "../../entity.js";
|
|
2
|
+
import { getColumnNameAndConfig } from "../../utils.js";
|
|
3
|
+
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
|
|
4
|
+
class SingleStoreTinyIntBuilder extends SingleStoreColumnBuilderWithAutoIncrement {
|
|
5
|
+
static [entityKind] = "SingleStoreTinyIntBuilder";
|
|
6
|
+
constructor(name, config) {
|
|
7
|
+
super(name, "number", "SingleStoreTinyInt");
|
|
8
|
+
this.config.unsigned = config ? config.unsigned : false;
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
build(table) {
|
|
12
|
+
return new SingleStoreTinyInt(
|
|
13
|
+
table,
|
|
14
|
+
this.config
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
class SingleStoreTinyInt extends SingleStoreColumnWithAutoIncrement {
|
|
19
|
+
static [entityKind] = "SingleStoreTinyInt";
|
|
20
|
+
getSQLType() {
|
|
21
|
+
return `tinyint${this.config.unsigned ? " unsigned" : ""}`;
|
|
22
|
+
}
|
|
23
|
+
mapFromDriverValue(value) {
|
|
24
|
+
if (typeof value === "string") {
|
|
25
|
+
return Number(value);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function tinyint(a, b) {
|
|
31
|
+
const { name, config } = getColumnNameAndConfig(a, b);
|
|
32
|
+
return new SingleStoreTinyIntBuilder(name, config);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
SingleStoreTinyInt,
|
|
36
|
+
SingleStoreTinyIntBuilder,
|
|
37
|
+
tinyint
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=tinyint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/singlestore-core/columns/tinyint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from './common.ts';\nimport type { SingleStoreIntConfig } from './int.ts';\n\nexport type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SingleStoreTinyInt';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyIntBuilder';\n\n\tconstructor(name: T['name'], config?: SingleStoreIntConfig) {\n\t\tsuper(name, 'number', 'SingleStoreTinyInt');\n\t\tthis.config.unsigned = config ? config.unsigned : false;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTinyInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTinyInt<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 SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyInt';\n\n\tgetSQLType(): string {\n\t\treturn `tinyint${this.config.unsigned ? ' unsigned' : ''}`;\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 tinyint(): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint(\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint<TName extends string>(\n\tname: TName,\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<TName>;\nexport function tinyint(a?: string | SingleStoreIntConfig, b?: SingleStoreIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreIntConfig>(a, b);\n\treturn new SingleStoreTinyIntBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,2CAA2C,0CAA0C;AAavF,MAAM,kCACJ,0CACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA+B;AAC3D,UAAM,MAAM,UAAU,oBAAoB;AAC1C,SAAK,OAAO,WAAW,SAAS,OAAO,WAAW;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OACsD;AACtD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,2BACJ,mCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO,UAAU,KAAK,OAAO,WAAW,cAAc,EAAE;AAAA,EACzD;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAUO,SAAS,QAAQ,GAAmC,GAA0B;AACpF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,0BAA0B,MAAM,MAAM;AAClD;","names":[]}
|