drizzle-orm 0.35.2 → 0.35.3-57d2372
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/libsql/driver-core.cjs +67 -0
- package/libsql/driver-core.cjs.map +1 -0
- package/libsql/driver-core.d.cts +8 -0
- package/libsql/driver-core.d.ts +8 -0
- package/libsql/driver-core.js +45 -0
- package/libsql/driver-core.js.map +1 -0
- package/libsql/driver.cjs +8 -43
- package/libsql/driver.cjs.map +1 -1
- package/libsql/driver.d.cts +3 -8
- package/libsql/driver.d.ts +3 -8
- package/libsql/driver.js +2 -40
- package/libsql/driver.js.map +1 -1
- package/libsql/http/index.cjs +53 -0
- package/libsql/http/index.cjs.map +1 -0
- package/libsql/http/index.d.cts +24 -0
- package/libsql/http/index.d.ts +24 -0
- package/libsql/http/index.js +29 -0
- package/libsql/http/index.js.map +1 -0
- package/libsql/node/index.cjs +53 -0
- package/libsql/node/index.cjs.map +1 -0
- package/libsql/node/index.d.cts +24 -0
- package/libsql/node/index.d.ts +24 -0
- package/libsql/node/index.js +29 -0
- package/libsql/node/index.js.map +1 -0
- package/libsql/sqlite3/index.cjs +53 -0
- package/libsql/sqlite3/index.cjs.map +1 -0
- package/libsql/sqlite3/index.d.cts +24 -0
- package/libsql/sqlite3/index.d.ts +24 -0
- package/libsql/sqlite3/index.js +29 -0
- package/libsql/sqlite3/index.js.map +1 -0
- package/libsql/wasm/index.cjs +53 -0
- package/libsql/wasm/index.cjs.map +1 -0
- package/libsql/wasm/index.d.cts +24 -0
- package/libsql/wasm/index.d.ts +24 -0
- package/libsql/wasm/index.js +29 -0
- package/libsql/wasm/index.js.map +1 -0
- package/libsql/web/index.cjs +53 -0
- package/libsql/web/index.cjs.map +1 -0
- package/libsql/web/index.d.cts +24 -0
- package/libsql/web/index.d.ts +24 -0
- package/libsql/web/index.js +29 -0
- package/libsql/web/index.js.map +1 -0
- package/libsql/ws/index.cjs +53 -0
- package/libsql/ws/index.cjs.map +1 -0
- package/libsql/ws/index.d.cts +24 -0
- package/libsql/ws/index.d.ts +24 -0
- package/libsql/ws/index.js +29 -0
- package/libsql/ws/index.js.map +1 -0
- package/package.json +159 -1
- package/pg-core/columns/index.cjs +12 -0
- package/pg-core/columns/index.cjs.map +1 -1
- package/pg-core/columns/index.d.cts +6 -0
- package/pg-core/columns/index.d.ts +6 -0
- package/pg-core/columns/index.js +6 -0
- package/pg-core/columns/index.js.map +1 -1
- package/pg-core/columns/postgis_extension/geography.cjs +104 -0
- package/pg-core/columns/postgis_extension/geography.cjs.map +1 -0
- package/pg-core/columns/postgis_extension/geography.d.cts +75 -0
- package/pg-core/columns/postgis_extension/geography.d.ts +75 -0
- package/pg-core/columns/postgis_extension/geography.js +76 -0
- package/pg-core/columns/postgis_extension/geography.js.map +1 -0
- package/pg-core/columns/postgres_internals/name.cjs +62 -0
- package/pg-core/columns/postgres_internals/name.cjs.map +1 -0
- package/pg-core/columns/postgres_internals/name.d.cts +25 -0
- package/pg-core/columns/postgres_internals/name.d.ts +25 -0
- package/pg-core/columns/postgres_internals/name.js +36 -0
- package/pg-core/columns/postgres_internals/name.js.map +1 -0
- package/pg-core/columns/postgres_internals/oid.cjs +62 -0
- package/pg-core/columns/postgres_internals/oid.cjs.map +1 -0
- package/pg-core/columns/postgres_internals/oid.d.cts +25 -0
- package/pg-core/columns/postgres_internals/oid.d.ts +25 -0
- package/pg-core/columns/postgres_internals/oid.js +36 -0
- package/pg-core/columns/postgres_internals/oid.js.map +1 -0
- package/pg-core/columns/timescale/compactstateagg.cjs +62 -0
- package/pg-core/columns/timescale/compactstateagg.cjs.map +1 -0
- package/pg-core/columns/timescale/compactstateagg.d.cts +25 -0
- package/pg-core/columns/timescale/compactstateagg.d.ts +25 -0
- package/pg-core/columns/timescale/compactstateagg.js +36 -0
- package/pg-core/columns/timescale/compactstateagg.js.map +1 -0
- package/pg-core/columns/timescale/heartbeatagg.cjs +62 -0
- package/pg-core/columns/timescale/heartbeatagg.cjs.map +1 -0
- package/pg-core/columns/timescale/heartbeatagg.d.cts +25 -0
- package/pg-core/columns/timescale/heartbeatagg.d.ts +25 -0
- package/pg-core/columns/timescale/heartbeatagg.js +36 -0
- package/pg-core/columns/timescale/heartbeatagg.js.map +1 -0
- package/pg-core/columns/timescale/stateagg.cjs +62 -0
- package/pg-core/columns/timescale/stateagg.cjs.map +1 -0
- package/pg-core/columns/timescale/stateagg.d.cts +25 -0
- package/pg-core/columns/timescale/stateagg.d.ts +25 -0
- package/pg-core/columns/timescale/stateagg.js +36 -0
- package/pg-core/columns/timescale/stateagg.js.map +1 -0
- package/planetscale-serverless/driver.cjs +1 -4
- package/planetscale-serverless/driver.cjs.map +1 -1
- package/planetscale-serverless/driver.js +1 -4
- package/planetscale-serverless/driver.js.map +1 -1
- package/version.cjs +1 -1
- package/version.d.cts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-orm",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.3-57d2372",
|
|
4
4
|
"description": "Drizzle ORM package for SQL databases",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@cloudflare/workers-types": ">=3",
|
|
48
48
|
"@electric-sql/pglite": ">=0.1.1",
|
|
49
49
|
"@libsql/client": ">=0.10.0",
|
|
50
|
+
"@libsql/client-wasm": ">=0.10.0",
|
|
50
51
|
"@neondatabase/serverless": ">=0.1",
|
|
51
52
|
"@op-engineering/op-sqlite": ">=2",
|
|
52
53
|
"@opentelemetry/api": "^1.4.1",
|
|
@@ -162,6 +163,7 @@
|
|
|
162
163
|
"@cloudflare/workers-types": "^4.20230904.0",
|
|
163
164
|
"@electric-sql/pglite": "^0.2.12",
|
|
164
165
|
"@libsql/client": "^0.10.0",
|
|
166
|
+
"@libsql/client-wasm": "^0.10.0",
|
|
165
167
|
"@miniflare/d1": "^2.14.4",
|
|
166
168
|
"@neondatabase/serverless": "^0.9.0",
|
|
167
169
|
"@op-engineering/op-sqlite": "^2.0.16",
|
|
@@ -738,6 +740,18 @@
|
|
|
738
740
|
"types": "./kysely/index.d.ts",
|
|
739
741
|
"default": "./kysely/index.js"
|
|
740
742
|
},
|
|
743
|
+
"./libsql/driver-core": {
|
|
744
|
+
"import": {
|
|
745
|
+
"types": "./libsql/driver-core.d.ts",
|
|
746
|
+
"default": "./libsql/driver-core.js"
|
|
747
|
+
},
|
|
748
|
+
"require": {
|
|
749
|
+
"types": "./libsql/driver-core.d.cts",
|
|
750
|
+
"default": "./libsql/driver-core.cjs"
|
|
751
|
+
},
|
|
752
|
+
"types": "./libsql/driver-core.d.ts",
|
|
753
|
+
"default": "./libsql/driver-core.js"
|
|
754
|
+
},
|
|
741
755
|
"./libsql/driver": {
|
|
742
756
|
"import": {
|
|
743
757
|
"types": "./libsql/driver.d.ts",
|
|
@@ -2262,6 +2276,78 @@
|
|
|
2262
2276
|
"types": "./aws-data-api/pg/session.d.ts",
|
|
2263
2277
|
"default": "./aws-data-api/pg/session.js"
|
|
2264
2278
|
},
|
|
2279
|
+
"./libsql/http": {
|
|
2280
|
+
"import": {
|
|
2281
|
+
"types": "./libsql/http/index.d.ts",
|
|
2282
|
+
"default": "./libsql/http/index.js"
|
|
2283
|
+
},
|
|
2284
|
+
"require": {
|
|
2285
|
+
"types": "./libsql/http/index.d.cts",
|
|
2286
|
+
"default": "./libsql/http/index.cjs"
|
|
2287
|
+
},
|
|
2288
|
+
"types": "./libsql/http/index.d.ts",
|
|
2289
|
+
"default": "./libsql/http/index.js"
|
|
2290
|
+
},
|
|
2291
|
+
"./libsql/node": {
|
|
2292
|
+
"import": {
|
|
2293
|
+
"types": "./libsql/node/index.d.ts",
|
|
2294
|
+
"default": "./libsql/node/index.js"
|
|
2295
|
+
},
|
|
2296
|
+
"require": {
|
|
2297
|
+
"types": "./libsql/node/index.d.cts",
|
|
2298
|
+
"default": "./libsql/node/index.cjs"
|
|
2299
|
+
},
|
|
2300
|
+
"types": "./libsql/node/index.d.ts",
|
|
2301
|
+
"default": "./libsql/node/index.js"
|
|
2302
|
+
},
|
|
2303
|
+
"./libsql/sqlite3": {
|
|
2304
|
+
"import": {
|
|
2305
|
+
"types": "./libsql/sqlite3/index.d.ts",
|
|
2306
|
+
"default": "./libsql/sqlite3/index.js"
|
|
2307
|
+
},
|
|
2308
|
+
"require": {
|
|
2309
|
+
"types": "./libsql/sqlite3/index.d.cts",
|
|
2310
|
+
"default": "./libsql/sqlite3/index.cjs"
|
|
2311
|
+
},
|
|
2312
|
+
"types": "./libsql/sqlite3/index.d.ts",
|
|
2313
|
+
"default": "./libsql/sqlite3/index.js"
|
|
2314
|
+
},
|
|
2315
|
+
"./libsql/wasm": {
|
|
2316
|
+
"import": {
|
|
2317
|
+
"types": "./libsql/wasm/index.d.ts",
|
|
2318
|
+
"default": "./libsql/wasm/index.js"
|
|
2319
|
+
},
|
|
2320
|
+
"require": {
|
|
2321
|
+
"types": "./libsql/wasm/index.d.cts",
|
|
2322
|
+
"default": "./libsql/wasm/index.cjs"
|
|
2323
|
+
},
|
|
2324
|
+
"types": "./libsql/wasm/index.d.ts",
|
|
2325
|
+
"default": "./libsql/wasm/index.js"
|
|
2326
|
+
},
|
|
2327
|
+
"./libsql/web": {
|
|
2328
|
+
"import": {
|
|
2329
|
+
"types": "./libsql/web/index.d.ts",
|
|
2330
|
+
"default": "./libsql/web/index.js"
|
|
2331
|
+
},
|
|
2332
|
+
"require": {
|
|
2333
|
+
"types": "./libsql/web/index.d.cts",
|
|
2334
|
+
"default": "./libsql/web/index.cjs"
|
|
2335
|
+
},
|
|
2336
|
+
"types": "./libsql/web/index.d.ts",
|
|
2337
|
+
"default": "./libsql/web/index.js"
|
|
2338
|
+
},
|
|
2339
|
+
"./libsql/ws": {
|
|
2340
|
+
"import": {
|
|
2341
|
+
"types": "./libsql/ws/index.d.ts",
|
|
2342
|
+
"default": "./libsql/ws/index.js"
|
|
2343
|
+
},
|
|
2344
|
+
"require": {
|
|
2345
|
+
"types": "./libsql/ws/index.d.cts",
|
|
2346
|
+
"default": "./libsql/ws/index.cjs"
|
|
2347
|
+
},
|
|
2348
|
+
"types": "./libsql/ws/index.d.ts",
|
|
2349
|
+
"default": "./libsql/ws/index.js"
|
|
2350
|
+
},
|
|
2265
2351
|
"./mysql-core/columns/all": {
|
|
2266
2352
|
"import": {
|
|
2267
2353
|
"types": "./mysql-core/columns/all.d.ts",
|
|
@@ -3654,6 +3740,18 @@
|
|
|
3654
3740
|
"types": "./sqlite-core/query-builders/update.d.ts",
|
|
3655
3741
|
"default": "./sqlite-core/query-builders/update.js"
|
|
3656
3742
|
},
|
|
3743
|
+
"./pg-core/columns/postgis_extension/geography": {
|
|
3744
|
+
"import": {
|
|
3745
|
+
"types": "./pg-core/columns/postgis_extension/geography.d.ts",
|
|
3746
|
+
"default": "./pg-core/columns/postgis_extension/geography.js"
|
|
3747
|
+
},
|
|
3748
|
+
"require": {
|
|
3749
|
+
"types": "./pg-core/columns/postgis_extension/geography.d.cts",
|
|
3750
|
+
"default": "./pg-core/columns/postgis_extension/geography.cjs"
|
|
3751
|
+
},
|
|
3752
|
+
"types": "./pg-core/columns/postgis_extension/geography.d.ts",
|
|
3753
|
+
"default": "./pg-core/columns/postgis_extension/geography.js"
|
|
3754
|
+
},
|
|
3657
3755
|
"./pg-core/columns/postgis_extension/geometry": {
|
|
3658
3756
|
"import": {
|
|
3659
3757
|
"types": "./pg-core/columns/postgis_extension/geometry.d.ts",
|
|
@@ -3678,6 +3776,66 @@
|
|
|
3678
3776
|
"types": "./pg-core/columns/postgis_extension/utils.d.ts",
|
|
3679
3777
|
"default": "./pg-core/columns/postgis_extension/utils.js"
|
|
3680
3778
|
},
|
|
3779
|
+
"./pg-core/columns/postgres_internals/name": {
|
|
3780
|
+
"import": {
|
|
3781
|
+
"types": "./pg-core/columns/postgres_internals/name.d.ts",
|
|
3782
|
+
"default": "./pg-core/columns/postgres_internals/name.js"
|
|
3783
|
+
},
|
|
3784
|
+
"require": {
|
|
3785
|
+
"types": "./pg-core/columns/postgres_internals/name.d.cts",
|
|
3786
|
+
"default": "./pg-core/columns/postgres_internals/name.cjs"
|
|
3787
|
+
},
|
|
3788
|
+
"types": "./pg-core/columns/postgres_internals/name.d.ts",
|
|
3789
|
+
"default": "./pg-core/columns/postgres_internals/name.js"
|
|
3790
|
+
},
|
|
3791
|
+
"./pg-core/columns/postgres_internals/oid": {
|
|
3792
|
+
"import": {
|
|
3793
|
+
"types": "./pg-core/columns/postgres_internals/oid.d.ts",
|
|
3794
|
+
"default": "./pg-core/columns/postgres_internals/oid.js"
|
|
3795
|
+
},
|
|
3796
|
+
"require": {
|
|
3797
|
+
"types": "./pg-core/columns/postgres_internals/oid.d.cts",
|
|
3798
|
+
"default": "./pg-core/columns/postgres_internals/oid.cjs"
|
|
3799
|
+
},
|
|
3800
|
+
"types": "./pg-core/columns/postgres_internals/oid.d.ts",
|
|
3801
|
+
"default": "./pg-core/columns/postgres_internals/oid.js"
|
|
3802
|
+
},
|
|
3803
|
+
"./pg-core/columns/timescale/compactstateagg": {
|
|
3804
|
+
"import": {
|
|
3805
|
+
"types": "./pg-core/columns/timescale/compactstateagg.d.ts",
|
|
3806
|
+
"default": "./pg-core/columns/timescale/compactstateagg.js"
|
|
3807
|
+
},
|
|
3808
|
+
"require": {
|
|
3809
|
+
"types": "./pg-core/columns/timescale/compactstateagg.d.cts",
|
|
3810
|
+
"default": "./pg-core/columns/timescale/compactstateagg.cjs"
|
|
3811
|
+
},
|
|
3812
|
+
"types": "./pg-core/columns/timescale/compactstateagg.d.ts",
|
|
3813
|
+
"default": "./pg-core/columns/timescale/compactstateagg.js"
|
|
3814
|
+
},
|
|
3815
|
+
"./pg-core/columns/timescale/heartbeatagg": {
|
|
3816
|
+
"import": {
|
|
3817
|
+
"types": "./pg-core/columns/timescale/heartbeatagg.d.ts",
|
|
3818
|
+
"default": "./pg-core/columns/timescale/heartbeatagg.js"
|
|
3819
|
+
},
|
|
3820
|
+
"require": {
|
|
3821
|
+
"types": "./pg-core/columns/timescale/heartbeatagg.d.cts",
|
|
3822
|
+
"default": "./pg-core/columns/timescale/heartbeatagg.cjs"
|
|
3823
|
+
},
|
|
3824
|
+
"types": "./pg-core/columns/timescale/heartbeatagg.d.ts",
|
|
3825
|
+
"default": "./pg-core/columns/timescale/heartbeatagg.js"
|
|
3826
|
+
},
|
|
3827
|
+
"./pg-core/columns/timescale/stateagg": {
|
|
3828
|
+
"import": {
|
|
3829
|
+
"types": "./pg-core/columns/timescale/stateagg.d.ts",
|
|
3830
|
+
"default": "./pg-core/columns/timescale/stateagg.js"
|
|
3831
|
+
},
|
|
3832
|
+
"require": {
|
|
3833
|
+
"types": "./pg-core/columns/timescale/stateagg.d.cts",
|
|
3834
|
+
"default": "./pg-core/columns/timescale/stateagg.cjs"
|
|
3835
|
+
},
|
|
3836
|
+
"types": "./pg-core/columns/timescale/stateagg.d.ts",
|
|
3837
|
+
"default": "./pg-core/columns/timescale/stateagg.js"
|
|
3838
|
+
},
|
|
3681
3839
|
"./pg-core/columns/vector_extension/bit": {
|
|
3682
3840
|
"import": {
|
|
3683
3841
|
"types": "./pg-core/columns/vector_extension/bit.d.ts",
|
|
@@ -36,13 +36,19 @@ __reExport(columns_exports, require("./macaddr.cjs"), module.exports);
|
|
|
36
36
|
__reExport(columns_exports, require("./macaddr8.cjs"), module.exports);
|
|
37
37
|
__reExport(columns_exports, require("./numeric.cjs"), module.exports);
|
|
38
38
|
__reExport(columns_exports, require("./point.cjs"), module.exports);
|
|
39
|
+
__reExport(columns_exports, require("./postgis_extension/geography.cjs"), module.exports);
|
|
39
40
|
__reExport(columns_exports, require("./postgis_extension/geometry.cjs"), module.exports);
|
|
41
|
+
__reExport(columns_exports, require("./postgres_internals/name.cjs"), module.exports);
|
|
42
|
+
__reExport(columns_exports, require("./postgres_internals/oid.cjs"), module.exports);
|
|
40
43
|
__reExport(columns_exports, require("./real.cjs"), module.exports);
|
|
41
44
|
__reExport(columns_exports, require("./serial.cjs"), module.exports);
|
|
42
45
|
__reExport(columns_exports, require("./smallint.cjs"), module.exports);
|
|
43
46
|
__reExport(columns_exports, require("./smallserial.cjs"), module.exports);
|
|
44
47
|
__reExport(columns_exports, require("./text.cjs"), module.exports);
|
|
45
48
|
__reExport(columns_exports, require("./time.cjs"), module.exports);
|
|
49
|
+
__reExport(columns_exports, require("./timescale/compactstateagg.cjs"), module.exports);
|
|
50
|
+
__reExport(columns_exports, require("./timescale/heartbeatagg.cjs"), module.exports);
|
|
51
|
+
__reExport(columns_exports, require("./timescale/stateagg.cjs"), module.exports);
|
|
46
52
|
__reExport(columns_exports, require("./timestamp.cjs"), module.exports);
|
|
47
53
|
__reExport(columns_exports, require("./uuid.cjs"), module.exports);
|
|
48
54
|
__reExport(columns_exports, require("./varchar.cjs"), module.exports);
|
|
@@ -73,13 +79,19 @@ __reExport(columns_exports, require("./vector_extension/vector.cjs"), module.exp
|
|
|
73
79
|
...require("./macaddr8.cjs"),
|
|
74
80
|
...require("./numeric.cjs"),
|
|
75
81
|
...require("./point.cjs"),
|
|
82
|
+
...require("./postgis_extension/geography.cjs"),
|
|
76
83
|
...require("./postgis_extension/geometry.cjs"),
|
|
84
|
+
...require("./postgres_internals/name.cjs"),
|
|
85
|
+
...require("./postgres_internals/oid.cjs"),
|
|
77
86
|
...require("./real.cjs"),
|
|
78
87
|
...require("./serial.cjs"),
|
|
79
88
|
...require("./smallint.cjs"),
|
|
80
89
|
...require("./smallserial.cjs"),
|
|
81
90
|
...require("./text.cjs"),
|
|
82
91
|
...require("./time.cjs"),
|
|
92
|
+
...require("./timescale/compactstateagg.cjs"),
|
|
93
|
+
...require("./timescale/heartbeatagg.cjs"),
|
|
94
|
+
...require("./timescale/stateagg.cjs"),
|
|
83
95
|
...require("./timestamp.cjs"),
|
|
84
96
|
...require("./uuid.cjs"),
|
|
85
97
|
...require("./varchar.cjs"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4BAAc,wBAAd;AACA,4BAAc,2BADd;AAEA,4BAAc,yBAFd;AAGA,4BAAc,sBAHd;AAIA,4BAAc,sBAJd;AAKA,4BAAc,wBALd;AAMA,4BAAc,wBANd;AAOA,4BAAc,sBAPd;AAQA,4BAAc,kCARd;AASA,4BAAc,sBATd;AAUA,4BAAc,sBAVd;AAWA,4BAAc,4BAXd;AAYA,4BAAc,yBAZd;AAaA,4BAAc,0BAbd;AAcA,4BAAc,sBAdd;AAeA,4BAAc,uBAfd;AAgBA,4BAAc,sBAhBd;AAiBA,4BAAc,yBAjBd;AAkBA,4BAAc,0BAlBd;AAmBA,4BAAc,yBAnBd;AAoBA,4BAAc,uBApBd;AAqBA,4BAAc,
|
|
1
|
+
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geography.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './postgres_internals/name.ts';\nexport * from './postgres_internals/oid.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timescale/compactstateagg.ts';\nexport * from './timescale/heartbeatagg.ts';\nexport * from './timescale/stateagg.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4BAAc,wBAAd;AACA,4BAAc,2BADd;AAEA,4BAAc,yBAFd;AAGA,4BAAc,sBAHd;AAIA,4BAAc,sBAJd;AAKA,4BAAc,wBALd;AAMA,4BAAc,wBANd;AAOA,4BAAc,sBAPd;AAQA,4BAAc,kCARd;AASA,4BAAc,sBATd;AAUA,4BAAc,sBAVd;AAWA,4BAAc,4BAXd;AAYA,4BAAc,yBAZd;AAaA,4BAAc,0BAbd;AAcA,4BAAc,sBAdd;AAeA,4BAAc,uBAfd;AAgBA,4BAAc,sBAhBd;AAiBA,4BAAc,yBAjBd;AAkBA,4BAAc,0BAlBd;AAmBA,4BAAc,yBAnBd;AAoBA,4BAAc,uBApBd;AAqBA,4BAAc,6CArBd;AAsBA,4BAAc,4CAtBd;AAuBA,4BAAc,yCAvBd;AAwBA,4BAAc,wCAxBd;AAyBA,4BAAc,sBAzBd;AA0BA,4BAAc,wBA1Bd;AA2BA,4BAAc,0BA3Bd;AA4BA,4BAAc,6BA5Bd;AA6BA,4BAAc,sBA7Bd;AA8BA,4BAAc,sBA9Bd;AA+BA,4BAAc,2CA/Bd;AAgCA,4BAAc,wCAhCd;AAiCA,4BAAc,oCAjCd;AAkCA,4BAAc,2BAlCd;AAmCA,4BAAc,sBAnCd;AAoCA,4BAAc,yBApCd;AAqCA,4BAAc,sCArCd;AAsCA,4BAAc,0CAtCd;AAuCA,4BAAc,4CAvCd;AAwCA,4BAAc,yCAxCd;","names":[]}
|
|
@@ -19,13 +19,19 @@ export * from "./macaddr.cjs";
|
|
|
19
19
|
export * from "./macaddr8.cjs";
|
|
20
20
|
export * from "./numeric.cjs";
|
|
21
21
|
export * from "./point.cjs";
|
|
22
|
+
export * from "./postgis_extension/geography.cjs";
|
|
22
23
|
export * from "./postgis_extension/geometry.cjs";
|
|
24
|
+
export * from "./postgres_internals/name.cjs";
|
|
25
|
+
export * from "./postgres_internals/oid.cjs";
|
|
23
26
|
export * from "./real.cjs";
|
|
24
27
|
export * from "./serial.cjs";
|
|
25
28
|
export * from "./smallint.cjs";
|
|
26
29
|
export * from "./smallserial.cjs";
|
|
27
30
|
export * from "./text.cjs";
|
|
28
31
|
export * from "./time.cjs";
|
|
32
|
+
export * from "./timescale/compactstateagg.cjs";
|
|
33
|
+
export * from "./timescale/heartbeatagg.cjs";
|
|
34
|
+
export * from "./timescale/stateagg.cjs";
|
|
29
35
|
export * from "./timestamp.cjs";
|
|
30
36
|
export * from "./uuid.cjs";
|
|
31
37
|
export * from "./varchar.cjs";
|
|
@@ -19,13 +19,19 @@ export * from "./macaddr.js";
|
|
|
19
19
|
export * from "./macaddr8.js";
|
|
20
20
|
export * from "./numeric.js";
|
|
21
21
|
export * from "./point.js";
|
|
22
|
+
export * from "./postgis_extension/geography.js";
|
|
22
23
|
export * from "./postgis_extension/geometry.js";
|
|
24
|
+
export * from "./postgres_internals/name.js";
|
|
25
|
+
export * from "./postgres_internals/oid.js";
|
|
23
26
|
export * from "./real.js";
|
|
24
27
|
export * from "./serial.js";
|
|
25
28
|
export * from "./smallint.js";
|
|
26
29
|
export * from "./smallserial.js";
|
|
27
30
|
export * from "./text.js";
|
|
28
31
|
export * from "./time.js";
|
|
32
|
+
export * from "./timescale/compactstateagg.js";
|
|
33
|
+
export * from "./timescale/heartbeatagg.js";
|
|
34
|
+
export * from "./timescale/stateagg.js";
|
|
29
35
|
export * from "./timestamp.js";
|
|
30
36
|
export * from "./uuid.js";
|
|
31
37
|
export * from "./varchar.js";
|
package/pg-core/columns/index.js
CHANGED
|
@@ -19,13 +19,19 @@ export * from "./macaddr.js";
|
|
|
19
19
|
export * from "./macaddr8.js";
|
|
20
20
|
export * from "./numeric.js";
|
|
21
21
|
export * from "./point.js";
|
|
22
|
+
export * from "./postgis_extension/geography.js";
|
|
22
23
|
export * from "./postgis_extension/geometry.js";
|
|
24
|
+
export * from "./postgres_internals/name.js";
|
|
25
|
+
export * from "./postgres_internals/oid.js";
|
|
23
26
|
export * from "./real.js";
|
|
24
27
|
export * from "./serial.js";
|
|
25
28
|
export * from "./smallint.js";
|
|
26
29
|
export * from "./smallserial.js";
|
|
27
30
|
export * from "./text.js";
|
|
28
31
|
export * from "./time.js";
|
|
32
|
+
export * from "./timescale/compactstateagg.js";
|
|
33
|
+
export * from "./timescale/heartbeatagg.js";
|
|
34
|
+
export * from "./timescale/stateagg.js";
|
|
29
35
|
export * from "./timestamp.js";
|
|
30
36
|
export * from "./uuid.js";
|
|
31
37
|
export * from "./varchar.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geography.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './postgres_internals/name.ts';\nexport * from './postgres_internals/oid.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timescale/compactstateagg.ts';\nexport * from './timescale/heartbeatagg.ts';\nexport * from './timescale/stateagg.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
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 geography_exports = {};
|
|
20
|
+
__export(geography_exports, {
|
|
21
|
+
PgGeography: () => PgGeography,
|
|
22
|
+
PgGeographyBuilder: () => PgGeographyBuilder,
|
|
23
|
+
PgGeographyObject: () => PgGeographyObject,
|
|
24
|
+
PgGeographyObjectBuilder: () => PgGeographyObjectBuilder,
|
|
25
|
+
geography: () => geography
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(geography_exports);
|
|
28
|
+
var import_entity = require("../../../entity.cjs");
|
|
29
|
+
var import_common = require("../common.cjs");
|
|
30
|
+
var import_utils = require("./utils.cjs");
|
|
31
|
+
class PgGeographyBuilder extends import_common.PgColumnBuilder {
|
|
32
|
+
static [import_entity.entityKind] = "PgGeographyBuilder";
|
|
33
|
+
constructor(name, config) {
|
|
34
|
+
super(name, "array", "PgGeography");
|
|
35
|
+
this.config.srid = config?.srid;
|
|
36
|
+
this.config.type = config?.type;
|
|
37
|
+
}
|
|
38
|
+
/** @internal */
|
|
39
|
+
build(table) {
|
|
40
|
+
return new PgGeography(
|
|
41
|
+
table,
|
|
42
|
+
this.config
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
class PgGeography extends import_common.PgColumn {
|
|
47
|
+
static [import_entity.entityKind] = "PgGeography";
|
|
48
|
+
type = this.config.type;
|
|
49
|
+
srid = this.config.srid;
|
|
50
|
+
getSQLType() {
|
|
51
|
+
return `geography${this.type || this.srid ? `(${this.type ?? ""}${this.srid ? this.type ? `,${this.srid}` : this.srid : ""})` : ""}`;
|
|
52
|
+
}
|
|
53
|
+
mapFromDriverValue(value) {
|
|
54
|
+
return (0, import_utils.parseEWKB)(value);
|
|
55
|
+
}
|
|
56
|
+
mapToDriverValue(value) {
|
|
57
|
+
return `point(${value[0]} ${value[1]})`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class PgGeographyObjectBuilder extends import_common.PgColumnBuilder {
|
|
61
|
+
static [import_entity.entityKind] = "PgGeographyObjectBuilder";
|
|
62
|
+
constructor(name, config) {
|
|
63
|
+
super(name, "json", "PgGeographyObject");
|
|
64
|
+
this.config.srid = config?.srid;
|
|
65
|
+
this.config.type = config?.type;
|
|
66
|
+
}
|
|
67
|
+
/** @internal */
|
|
68
|
+
build(table) {
|
|
69
|
+
return new PgGeographyObject(
|
|
70
|
+
table,
|
|
71
|
+
this.config
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
class PgGeographyObject extends import_common.PgColumn {
|
|
76
|
+
static [import_entity.entityKind] = "PgGeographyObject";
|
|
77
|
+
type = this.config.type;
|
|
78
|
+
srid = this.config.srid;
|
|
79
|
+
getSQLType() {
|
|
80
|
+
return `geography${this.type || this.srid ? `(${this.type ?? ""}${this.srid ? this.type ? `,${this.srid}` : this.srid : ""})` : ""}`;
|
|
81
|
+
}
|
|
82
|
+
mapFromDriverValue(value) {
|
|
83
|
+
const parsed = (0, import_utils.parseEWKB)(value);
|
|
84
|
+
return { x: parsed[0], y: parsed[1] };
|
|
85
|
+
}
|
|
86
|
+
mapToDriverValue(value) {
|
|
87
|
+
return `geography(${value.x} ${value.y})`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function geography(name, config) {
|
|
91
|
+
if (!config?.mode || config.mode === "tuple") {
|
|
92
|
+
return new PgGeographyBuilder(name, config);
|
|
93
|
+
}
|
|
94
|
+
return new PgGeographyObjectBuilder(name, config);
|
|
95
|
+
}
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
PgGeography,
|
|
99
|
+
PgGeographyBuilder,
|
|
100
|
+
PgGeographyObject,
|
|
101
|
+
PgGeographyObjectBuilder,
|
|
102
|
+
geography
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=geography.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/pg-core/columns/postgis_extension/geography.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\n\nimport type { Equal } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from '../common.ts';\nimport { parseEWKB } from './utils.ts';\n\nexport type PgGeographyBuilderInitial<TName extends string> = PgGeographyBuilder<{\n\tname: TName;\n\tdataType: 'array';\n\tcolumnType: 'PgGeography';\n\tdata: [number, number];\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class PgGeographyBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgGeography'>>\n\textends PgColumnBuilder<T, { type: PgGeographyConfig['type']; srid: PgGeographyConfig['srid'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgGeographyBuilder';\n\n\tconstructor(name: T['name'], config?: PgGeographyConfig) {\n\t\tsuper(name, 'array', 'PgGeography');\n\t\tthis.config.srid = config?.srid;\n\t\tthis.config.type = config?.type;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgGeography<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgGeography<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 PgGeography<T extends ColumnBaseConfig<'array', 'PgGeography'>>\n\textends PgColumn<T, { type: PgGeographyConfig['type']; srid: PgGeographyConfig['srid'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgGeography';\n\n\treadonly type = this.config.type;\n\treadonly srid = this.config.srid;\n\n\tgetSQLType(): string {\n\t\treturn `geography${\n\t\t\tthis.type || this.srid ? `(${this.type ?? ''}${this.srid ? this.type ? `,${this.srid}` : this.srid : ''})` : ''\n\t\t}`;\n\t}\n\n\toverride mapFromDriverValue(value: string): [number, number] {\n\t\treturn parseEWKB(value);\n\t}\n\n\toverride mapToDriverValue(value: [number, number]): string {\n\t\treturn `point(${value[0]} ${value[1]})`;\n\t}\n}\n\nexport type PgGeographyObjectBuilderInitial<TName extends string> = PgGeographyObjectBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'PgGeographyObject';\n\tdata: { x: number; y: number };\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class PgGeographyObjectBuilder<T extends ColumnBuilderBaseConfig<'json', 'PgGeographyObject'>>\n\textends PgColumnBuilder<T, { type: PgGeographyConfig['type']; srid: PgGeographyConfig['srid'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgGeographyObjectBuilder';\n\n\tconstructor(name: T['name'], config?: PgGeographyConfig) {\n\t\tsuper(name, 'json', 'PgGeographyObject');\n\t\tthis.config.srid = config?.srid;\n\t\tthis.config.type = config?.type;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgGeographyObject<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgGeographyObject<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 PgGeographyObject<T extends ColumnBaseConfig<'json', 'PgGeographyObject'>>\n\textends PgColumn<T, { type: PgGeographyConfig['type']; srid: PgGeographyConfig['srid'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgGeographyObject';\n\n\treadonly type = this.config.type;\n\treadonly srid = this.config.srid;\n\n\tgetSQLType(): string {\n\t\treturn `geography${\n\t\t\tthis.type || this.srid ? `(${this.type ?? ''}${this.srid ? this.type ? `,${this.srid}` : this.srid : ''})` : ''\n\t\t}`;\n\t}\n\n\toverride mapFromDriverValue(value: string): { x: number; y: number } {\n\t\tconst parsed = parseEWKB(value);\n\t\treturn { x: parsed[0], y: parsed[1] };\n\t}\n\n\toverride mapToDriverValue(value: { x: number; y: number }): string {\n\t\treturn `geography(${value.x} ${value.y})`;\n\t}\n}\n\ninterface PgGeographyConfig<T extends 'tuple' | 'xy' = 'tuple' | 'xy'> {\n\tmode?: T;\n\ttype?: 'point' | (string & {});\n\tsrid?: number;\n}\n\nexport function geography<TName extends string, TMode extends PgGeographyConfig['mode'] & {}>(\n\tname: TName,\n\tconfig?: PgGeographyConfig<TMode>,\n): Equal<TMode, 'xy'> extends true ? PgGeographyObjectBuilderInitial<TName>\n\t: PgGeographyBuilderInitial<TName>;\nexport function geography(name: string, config?: PgGeographyConfig) {\n\tif (!config?.mode || config.mode === 'tuple') {\n\t\treturn new PgGeographyBuilder(name, config);\n\t}\n\treturn new PgGeographyObjectBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAI3B,oBAA0C;AAC1C,mBAA0B;AAYnB,MAAM,2BACJ,8BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA4B;AACxD,UAAM,MAAM,SAAS,aAAa;AAClC,SAAK,OAAO,OAAO,QAAQ;AAC3B,SAAK,OAAO,OAAO,QAAQ;AAAA,EAC5B;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,oBACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,OAAO,KAAK,OAAO;AAAA,EACnB,OAAO,KAAK,OAAO;AAAA,EAE5B,aAAqB;AACpB,WAAO,YACN,KAAK,QAAQ,KAAK,OAAO,IAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,OAAO,KAAK,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,EAAE,MAAM,EAC9G;AAAA,EACD;AAAA,EAES,mBAAmB,OAAiC;AAC5D,eAAO,wBAAU,KAAK;AAAA,EACvB;AAAA,EAES,iBAAiB,OAAiC;AAC1D,WAAO,SAAS,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAAA,EACrC;AACD;AAYO,MAAM,iCACJ,8BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA4B;AACxD,UAAM,MAAM,QAAQ,mBAAmB;AACvC,SAAK,OAAO,OAAO,QAAQ;AAC3B,SAAK,OAAO,OAAO,QAAQ;AAAA,EAC5B;AAAA;AAAA,EAGS,MACR,OACqD;AACrD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,0BACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,OAAO,KAAK,OAAO;AAAA,EACnB,OAAO,KAAK,OAAO;AAAA,EAE5B,aAAqB;AACpB,WAAO,YACN,KAAK,QAAQ,KAAK,OAAO,IAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,OAAO,KAAK,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,EAAE,MAAM,EAC9G;AAAA,EACD;AAAA,EAES,mBAAmB,OAAyC;AACpE,UAAM,aAAS,wBAAU,KAAK;AAC9B,WAAO,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,EAAE;AAAA,EACrC;AAAA,EAES,iBAAiB,OAAyC;AAClE,WAAO,aAAa,MAAM,CAAC,IAAI,MAAM,CAAC;AAAA,EACvC;AACD;AAaO,SAAS,UAAU,MAAc,QAA4B;AACnE,MAAI,CAAC,QAAQ,QAAQ,OAAO,SAAS,SAAS;AAC7C,WAAO,IAAI,mBAAmB,MAAM,MAAM;AAAA,EAC3C;AACA,SAAO,IAAI,yBAAyB,MAAM,MAAM;AACjD;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { PgColumn, PgColumnBuilder } from "../common.cjs";
|
|
6
|
+
export type PgGeographyBuilderInitial<TName extends string> = PgGeographyBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'array';
|
|
9
|
+
columnType: 'PgGeography';
|
|
10
|
+
data: [number, number];
|
|
11
|
+
driverParam: string;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class PgGeographyBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgGeography'>> extends PgColumnBuilder<T, {
|
|
16
|
+
type: PgGeographyConfig['type'];
|
|
17
|
+
srid: PgGeographyConfig['srid'];
|
|
18
|
+
}> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
constructor(name: T['name'], config?: PgGeographyConfig);
|
|
21
|
+
}
|
|
22
|
+
export declare class PgGeography<T extends ColumnBaseConfig<'array', 'PgGeography'>> extends PgColumn<T, {
|
|
23
|
+
type: PgGeographyConfig['type'];
|
|
24
|
+
srid: PgGeographyConfig['srid'];
|
|
25
|
+
}> {
|
|
26
|
+
static readonly [entityKind]: string;
|
|
27
|
+
readonly type: "point" | (string & {}) | undefined;
|
|
28
|
+
readonly srid: number | undefined;
|
|
29
|
+
getSQLType(): string;
|
|
30
|
+
mapFromDriverValue(value: string): [number, number];
|
|
31
|
+
mapToDriverValue(value: [number, number]): string;
|
|
32
|
+
}
|
|
33
|
+
export type PgGeographyObjectBuilderInitial<TName extends string> = PgGeographyObjectBuilder<{
|
|
34
|
+
name: TName;
|
|
35
|
+
dataType: 'json';
|
|
36
|
+
columnType: 'PgGeographyObject';
|
|
37
|
+
data: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
driverParam: string;
|
|
42
|
+
enumValues: undefined;
|
|
43
|
+
generated: undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export declare class PgGeographyObjectBuilder<T extends ColumnBuilderBaseConfig<'json', 'PgGeographyObject'>> extends PgColumnBuilder<T, {
|
|
46
|
+
type: PgGeographyConfig['type'];
|
|
47
|
+
srid: PgGeographyConfig['srid'];
|
|
48
|
+
}> {
|
|
49
|
+
static readonly [entityKind]: string;
|
|
50
|
+
constructor(name: T['name'], config?: PgGeographyConfig);
|
|
51
|
+
}
|
|
52
|
+
export declare class PgGeographyObject<T extends ColumnBaseConfig<'json', 'PgGeographyObject'>> extends PgColumn<T, {
|
|
53
|
+
type: PgGeographyConfig['type'];
|
|
54
|
+
srid: PgGeographyConfig['srid'];
|
|
55
|
+
}> {
|
|
56
|
+
static readonly [entityKind]: string;
|
|
57
|
+
readonly type: "point" | (string & {}) | undefined;
|
|
58
|
+
readonly srid: number | undefined;
|
|
59
|
+
getSQLType(): string;
|
|
60
|
+
mapFromDriverValue(value: string): {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
mapToDriverValue(value: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}): string;
|
|
68
|
+
}
|
|
69
|
+
interface PgGeographyConfig<T extends 'tuple' | 'xy' = 'tuple' | 'xy'> {
|
|
70
|
+
mode?: T;
|
|
71
|
+
type?: 'point' | (string & {});
|
|
72
|
+
srid?: number;
|
|
73
|
+
}
|
|
74
|
+
export declare function geography<TName extends string, TMode extends PgGeographyConfig['mode'] & {}>(name: TName, config?: PgGeographyConfig<TMode>): Equal<TMode, 'xy'> extends true ? PgGeographyObjectBuilderInitial<TName> : PgGeographyBuilderInitial<TName>;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { PgColumn, PgColumnBuilder } from "../common.js";
|
|
6
|
+
export type PgGeographyBuilderInitial<TName extends string> = PgGeographyBuilder<{
|
|
7
|
+
name: TName;
|
|
8
|
+
dataType: 'array';
|
|
9
|
+
columnType: 'PgGeography';
|
|
10
|
+
data: [number, number];
|
|
11
|
+
driverParam: string;
|
|
12
|
+
enumValues: undefined;
|
|
13
|
+
generated: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class PgGeographyBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgGeography'>> extends PgColumnBuilder<T, {
|
|
16
|
+
type: PgGeographyConfig['type'];
|
|
17
|
+
srid: PgGeographyConfig['srid'];
|
|
18
|
+
}> {
|
|
19
|
+
static readonly [entityKind]: string;
|
|
20
|
+
constructor(name: T['name'], config?: PgGeographyConfig);
|
|
21
|
+
}
|
|
22
|
+
export declare class PgGeography<T extends ColumnBaseConfig<'array', 'PgGeography'>> extends PgColumn<T, {
|
|
23
|
+
type: PgGeographyConfig['type'];
|
|
24
|
+
srid: PgGeographyConfig['srid'];
|
|
25
|
+
}> {
|
|
26
|
+
static readonly [entityKind]: string;
|
|
27
|
+
readonly type: "point" | (string & {}) | undefined;
|
|
28
|
+
readonly srid: number | undefined;
|
|
29
|
+
getSQLType(): string;
|
|
30
|
+
mapFromDriverValue(value: string): [number, number];
|
|
31
|
+
mapToDriverValue(value: [number, number]): string;
|
|
32
|
+
}
|
|
33
|
+
export type PgGeographyObjectBuilderInitial<TName extends string> = PgGeographyObjectBuilder<{
|
|
34
|
+
name: TName;
|
|
35
|
+
dataType: 'json';
|
|
36
|
+
columnType: 'PgGeographyObject';
|
|
37
|
+
data: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
driverParam: string;
|
|
42
|
+
enumValues: undefined;
|
|
43
|
+
generated: undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export declare class PgGeographyObjectBuilder<T extends ColumnBuilderBaseConfig<'json', 'PgGeographyObject'>> extends PgColumnBuilder<T, {
|
|
46
|
+
type: PgGeographyConfig['type'];
|
|
47
|
+
srid: PgGeographyConfig['srid'];
|
|
48
|
+
}> {
|
|
49
|
+
static readonly [entityKind]: string;
|
|
50
|
+
constructor(name: T['name'], config?: PgGeographyConfig);
|
|
51
|
+
}
|
|
52
|
+
export declare class PgGeographyObject<T extends ColumnBaseConfig<'json', 'PgGeographyObject'>> extends PgColumn<T, {
|
|
53
|
+
type: PgGeographyConfig['type'];
|
|
54
|
+
srid: PgGeographyConfig['srid'];
|
|
55
|
+
}> {
|
|
56
|
+
static readonly [entityKind]: string;
|
|
57
|
+
readonly type: "point" | (string & {}) | undefined;
|
|
58
|
+
readonly srid: number | undefined;
|
|
59
|
+
getSQLType(): string;
|
|
60
|
+
mapFromDriverValue(value: string): {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
mapToDriverValue(value: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}): string;
|
|
68
|
+
}
|
|
69
|
+
interface PgGeographyConfig<T extends 'tuple' | 'xy' = 'tuple' | 'xy'> {
|
|
70
|
+
mode?: T;
|
|
71
|
+
type?: 'point' | (string & {});
|
|
72
|
+
srid?: number;
|
|
73
|
+
}
|
|
74
|
+
export declare function geography<TName extends string, TMode extends PgGeographyConfig['mode'] & {}>(name: TName, config?: PgGeographyConfig<TMode>): Equal<TMode, 'xy'> extends true ? PgGeographyObjectBuilderInitial<TName> : PgGeographyBuilderInitial<TName>;
|
|
75
|
+
export {};
|