drizzle-orm 0.33.0-50ebd0a → 0.33.0-5be80aa
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/package.json +3 -15
- package/pg-core/columns/index.cjs +0 -2
- package/pg-core/columns/index.cjs.map +1 -1
- package/pg-core/columns/index.d.cts +0 -1
- package/pg-core/columns/index.d.ts +0 -1
- package/pg-core/columns/index.js +0 -1
- package/pg-core/columns/index.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/pg-core/columns/postgis_extension/geography.cjs +0 -104
- package/pg-core/columns/postgis_extension/geography.cjs.map +0 -1
- package/pg-core/columns/postgis_extension/geography.d.cts +0 -75
- package/pg-core/columns/postgis_extension/geography.d.ts +0 -75
- package/pg-core/columns/postgis_extension/geography.js +0 -76
- package/pg-core/columns/postgis_extension/geography.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-orm",
|
|
3
|
-
"version": "0.33.0-
|
|
3
|
+
"version": "0.33.0-5be80aa",
|
|
4
4
|
"description": "Drizzle ORM package for SQL databases",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@aws-sdk/client-rds-data": ">=3",
|
|
47
47
|
"@cloudflare/workers-types": ">=3",
|
|
48
48
|
"@electric-sql/pglite": ">=0.1.1",
|
|
49
|
-
"@libsql/client": "
|
|
49
|
+
"@libsql/client": ">=0.10.0",
|
|
50
50
|
"@neondatabase/serverless": ">=0.1",
|
|
51
51
|
"@op-engineering/op-sqlite": ">=2",
|
|
52
52
|
"@opentelemetry/api": "^1.4.1",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"@aws-sdk/client-rds-data": "^3.549.0",
|
|
162
162
|
"@cloudflare/workers-types": "^4.20230904.0",
|
|
163
163
|
"@electric-sql/pglite": "^0.1.1",
|
|
164
|
-
"@libsql/client": "^0.
|
|
164
|
+
"@libsql/client": "^0.10.0",
|
|
165
165
|
"@neondatabase/serverless": "^0.9.0",
|
|
166
166
|
"@op-engineering/op-sqlite": "^2.0.16",
|
|
167
167
|
"@opentelemetry/api": "^1.4.1",
|
|
@@ -3557,18 +3557,6 @@
|
|
|
3557
3557
|
"types": "./sqlite-core/query-builders/update.d.ts",
|
|
3558
3558
|
"default": "./sqlite-core/query-builders/update.js"
|
|
3559
3559
|
},
|
|
3560
|
-
"./pg-core/columns/postgis_extension/geography": {
|
|
3561
|
-
"import": {
|
|
3562
|
-
"types": "./pg-core/columns/postgis_extension/geography.d.ts",
|
|
3563
|
-
"default": "./pg-core/columns/postgis_extension/geography.js"
|
|
3564
|
-
},
|
|
3565
|
-
"require": {
|
|
3566
|
-
"types": "./pg-core/columns/postgis_extension/geography.d.cts",
|
|
3567
|
-
"default": "./pg-core/columns/postgis_extension/geography.cjs"
|
|
3568
|
-
},
|
|
3569
|
-
"types": "./pg-core/columns/postgis_extension/geography.d.ts",
|
|
3570
|
-
"default": "./pg-core/columns/postgis_extension/geography.js"
|
|
3571
|
-
},
|
|
3572
3560
|
"./pg-core/columns/postgis_extension/geometry": {
|
|
3573
3561
|
"import": {
|
|
3574
3562
|
"types": "./pg-core/columns/postgis_extension/geometry.d.ts",
|
|
@@ -35,7 +35,6 @@ __reExport(columns_exports, require("./macaddr.cjs"), module.exports);
|
|
|
35
35
|
__reExport(columns_exports, require("./macaddr8.cjs"), module.exports);
|
|
36
36
|
__reExport(columns_exports, require("./numeric.cjs"), module.exports);
|
|
37
37
|
__reExport(columns_exports, require("./point.cjs"), module.exports);
|
|
38
|
-
__reExport(columns_exports, require("./postgis_extension/geography.cjs"), module.exports);
|
|
39
38
|
__reExport(columns_exports, require("./postgis_extension/geometry.cjs"), module.exports);
|
|
40
39
|
__reExport(columns_exports, require("./real.cjs"), module.exports);
|
|
41
40
|
__reExport(columns_exports, require("./serial.cjs"), module.exports);
|
|
@@ -72,7 +71,6 @@ __reExport(columns_exports, require("./vector_extension/vector.cjs"), module.exp
|
|
|
72
71
|
...require("./macaddr8.cjs"),
|
|
73
72
|
...require("./numeric.cjs"),
|
|
74
73
|
...require("./point.cjs"),
|
|
75
|
-
...require("./postgis_extension/geography.cjs"),
|
|
76
74
|
...require("./postgis_extension/geometry.cjs"),
|
|
77
75
|
...require("./real.cjs"),
|
|
78
76
|
...require("./serial.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 './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/
|
|
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 './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,yBAXd;AAYA,4BAAc,0BAZd;AAaA,4BAAc,sBAbd;AAcA,4BAAc,uBAdd;AAeA,4BAAc,sBAfd;AAgBA,4BAAc,yBAhBd;AAiBA,4BAAc,0BAjBd;AAkBA,4BAAc,yBAlBd;AAmBA,4BAAc,uBAnBd;AAoBA,4BAAc,4CApBd;AAqBA,4BAAc,sBArBd;AAsBA,4BAAc,wBAtBd;AAuBA,4BAAc,0BAvBd;AAwBA,4BAAc,6BAxBd;AAyBA,4BAAc,sBAzBd;AA0BA,4BAAc,sBA1Bd;AA2BA,4BAAc,2BA3Bd;AA4BA,4BAAc,sBA5Bd;AA6BA,4BAAc,yBA7Bd;AA8BA,4BAAc,sCA9Bd;AA+BA,4BAAc,0CA/Bd;AAgCA,4BAAc,4CAhCd;AAiCA,4BAAc,yCAjCd;","names":[]}
|
|
@@ -18,7 +18,6 @@ export * from "./macaddr.cjs";
|
|
|
18
18
|
export * from "./macaddr8.cjs";
|
|
19
19
|
export * from "./numeric.cjs";
|
|
20
20
|
export * from "./point.cjs";
|
|
21
|
-
export * from "./postgis_extension/geography.cjs";
|
|
22
21
|
export * from "./postgis_extension/geometry.cjs";
|
|
23
22
|
export * from "./real.cjs";
|
|
24
23
|
export * from "./serial.cjs";
|
|
@@ -18,7 +18,6 @@ export * from "./macaddr.js";
|
|
|
18
18
|
export * from "./macaddr8.js";
|
|
19
19
|
export * from "./numeric.js";
|
|
20
20
|
export * from "./point.js";
|
|
21
|
-
export * from "./postgis_extension/geography.js";
|
|
22
21
|
export * from "./postgis_extension/geometry.js";
|
|
23
22
|
export * from "./real.js";
|
|
24
23
|
export * from "./serial.js";
|
package/pg-core/columns/index.js
CHANGED
|
@@ -18,7 +18,6 @@ export * from "./macaddr.js";
|
|
|
18
18
|
export * from "./macaddr8.js";
|
|
19
19
|
export * from "./numeric.js";
|
|
20
20
|
export * from "./point.js";
|
|
21
|
-
export * from "./postgis_extension/geography.js";
|
|
22
21
|
export * from "./postgis_extension/geometry.js";
|
|
23
22
|
export * from "./real.js";
|
|
24
23
|
export * from "./serial.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 './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/
|
|
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 './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;","names":[]}
|
package/version.cjs
CHANGED
package/version.d.cts
CHANGED
package/version.d.ts
CHANGED
package/version.js
CHANGED
|
@@ -1,104 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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 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 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 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 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,QAAiB,wBAAU,IAAY;AAAA,EAEvC,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,QAAiB,wBAAU,IAAY;AAAA,EAE9B,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,QAAiB,wBAAU,IAAY;AAAA,EAEvC,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,QAAiB,wBAAU,IAAY;AAAA,EAE9B,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":[]}
|
|
@@ -1,75 +0,0 @@
|
|
|
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: (string & {}) | "point" | 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: (string & {}) | "point" | 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 {};
|
|
@@ -1,75 +0,0 @@
|
|
|
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: (string & {}) | "point" | 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: (string & {}) | "point" | 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 {};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../../entity.js";
|
|
2
|
-
import { PgColumn, PgColumnBuilder } from "../common.js";
|
|
3
|
-
import { parseEWKB } from "./utils.js";
|
|
4
|
-
class PgGeographyBuilder extends PgColumnBuilder {
|
|
5
|
-
static [entityKind] = "PgGeographyBuilder";
|
|
6
|
-
constructor(name, config) {
|
|
7
|
-
super(name, "array", "PgGeography");
|
|
8
|
-
this.config.srid = config?.srid;
|
|
9
|
-
this.config.type = config?.type;
|
|
10
|
-
}
|
|
11
|
-
/** @internal */
|
|
12
|
-
build(table) {
|
|
13
|
-
return new PgGeography(
|
|
14
|
-
table,
|
|
15
|
-
this.config
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
class PgGeography extends PgColumn {
|
|
20
|
-
static [entityKind] = "PgGeography";
|
|
21
|
-
type = this.config.type;
|
|
22
|
-
srid = this.config.srid;
|
|
23
|
-
getSQLType() {
|
|
24
|
-
return `geography${this.type || this.srid ? `(${this.type ?? ""}${this.srid ? this.type ? `,${this.srid}` : this.srid : ""})` : ""}`;
|
|
25
|
-
}
|
|
26
|
-
mapFromDriverValue(value) {
|
|
27
|
-
return parseEWKB(value);
|
|
28
|
-
}
|
|
29
|
-
mapToDriverValue(value) {
|
|
30
|
-
return `point(${value[0]} ${value[1]})`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
class PgGeographyObjectBuilder extends PgColumnBuilder {
|
|
34
|
-
static [entityKind] = "PgGeographyObjectBuilder";
|
|
35
|
-
constructor(name, config) {
|
|
36
|
-
super(name, "json", "PgGeographyObject");
|
|
37
|
-
this.config.srid = config?.srid;
|
|
38
|
-
this.config.type = config?.type;
|
|
39
|
-
}
|
|
40
|
-
/** @internal */
|
|
41
|
-
build(table) {
|
|
42
|
-
return new PgGeographyObject(
|
|
43
|
-
table,
|
|
44
|
-
this.config
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
class PgGeographyObject extends PgColumn {
|
|
49
|
-
static [entityKind] = "PgGeographyObject";
|
|
50
|
-
type = this.config.type;
|
|
51
|
-
srid = this.config.srid;
|
|
52
|
-
getSQLType() {
|
|
53
|
-
return `geography${this.type || this.srid ? `(${this.type ?? ""}${this.srid ? this.type ? `,${this.srid}` : this.srid : ""})` : ""}`;
|
|
54
|
-
}
|
|
55
|
-
mapFromDriverValue(value) {
|
|
56
|
-
const parsed = parseEWKB(value);
|
|
57
|
-
return { x: parsed[0], y: parsed[1] };
|
|
58
|
-
}
|
|
59
|
-
mapToDriverValue(value) {
|
|
60
|
-
return `geography(${value.x} ${value.y})`;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function geography(name, config) {
|
|
64
|
-
if (!config?.mode || config.mode === "tuple") {
|
|
65
|
-
return new PgGeographyBuilder(name, config);
|
|
66
|
-
}
|
|
67
|
-
return new PgGeographyObjectBuilder(name, config);
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
PgGeography,
|
|
71
|
-
PgGeographyBuilder,
|
|
72
|
-
PgGeographyObject,
|
|
73
|
-
PgGeographyObjectBuilder,
|
|
74
|
-
geography
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=geography.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 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 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 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 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":"AAEA,SAAS,kBAAkB;AAI3B,SAAS,UAAU,uBAAuB;AAC1C,SAAS,iBAAiB;AAYnB,MAAM,2BACJ,gBACT;AAAA,EACC,QAAiB,UAAU,IAAY;AAAA,EAEvC,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,SACT;AAAA,EACC,QAAiB,UAAU,IAAY;AAAA,EAE9B,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,WAAO,UAAU,KAAK;AAAA,EACvB;AAAA,EAES,iBAAiB,OAAiC;AAC1D,WAAO,SAAS,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAAA,EACrC;AACD;AAYO,MAAM,iCACJ,gBACT;AAAA,EACC,QAAiB,UAAU,IAAY;AAAA,EAEvC,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,SACT;AAAA,EACC,QAAiB,UAAU,IAAY;AAAA,EAE9B,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,SAAS,UAAU,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":[]}
|