@prisma/orm-extension-postgis 8.0.0-rc.14-dev.6 → 8.0.0-rc.14-dev.7
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/dist/control.mjs +1 -1
- package/dist/control.mjs.map +1 -1
- package/dist/{descriptor-meta-B_Tvchf6-CtY0EGNJ.mjs → descriptor-meta-Dg_0iDad-D95jFzvF.mjs} +5 -5
- package/dist/descriptor-meta-Dg_0iDad-D95jFzvF.mjs.map +1 -0
- package/dist/pack.mjs +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/descriptor-meta-B_Tvchf6-CtY0EGNJ.mjs.map +0 -1
package/dist/control.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as POSTGIS_GEOMETRY_CODEC_ID } from "./constants-CWW72xGt-hJye3Dua.mjs";
|
|
2
|
-
import { n as postgisPackMeta, r as postgisQueryOperations } from "./descriptor-meta-
|
|
2
|
+
import { n as postgisPackMeta, r as postgisQueryOperations } from "./descriptor-meta-Dg_0iDad-D95jFzvF.mjs";
|
|
3
3
|
import { contractSpaceFromJson } from "@prisma/orm-toolchain/migration-tools/spaces";
|
|
4
4
|
//#region ../../../3-extensions/postgis/dist/control.mjs
|
|
5
5
|
var migration_default = {
|
package/dist/control.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/control.mjs"],"sourcesContent":["import { t as POSTGIS_GEOMETRY_CODEC_ID } from \"./constants-CWW72xGt.mjs\";\nimport { n as postgisQueryOperations, t as postgisPackMeta } from \"./descriptor-meta-
|
|
1
|
+
{"version":3,"file":"control.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/control.mjs"],"sourcesContent":["import { t as POSTGIS_GEOMETRY_CODEC_ID } from \"./constants-CWW72xGt.mjs\";\nimport { n as postgisQueryOperations, t as postgisPackMeta } from \"./descriptor-meta-Dg_0iDad.mjs\";\nimport { contractSpaceFromJson } from \"@internal/migration-tools/spaces\";\n//#region migrations/20260601T0000_install_postgis_extension/migration.json\nvar migration_default = {\n\tfrom: null,\n\tto: \"7e98a4d9437e6be2f2fa7fca02fbc01c245586997a937f97cab60788612512e5\",\n\tprovidedInvariants: [\"postgis:install-postgis-v1\"],\n\tcreatedAt: \"2026-06-01T00:00:00.000Z\",\n\tmigrationHash: \"f91b562a2f1a82f299a3690c001027729607c631c9b2d847aa3f6162539f0eff\"\n};\n//#endregion\n//#region migrations/20260601T0000_install_postgis_extension/ops.json\nvar ops_default = [{\n\t\"id\": \"postgis.install-postgis-extension\",\n\t\"label\": \"Enable extension \\\"postgis\\\"\",\n\t\"operationClass\": \"additive\",\n\t\"invariantId\": \"postgis:install-postgis-v1\",\n\t\"target\": {\n\t\t\"id\": \"postgres\",\n\t\t\"details\": {\n\t\t\t\"schema\": \"public\",\n\t\t\t\"objectType\": \"dependency\",\n\t\t\t\"name\": \"postgis\"\n\t\t}\n\t},\n\t\"precheck\": [{\n\t\t\"description\": \"verify extension \\\"postgis\\\" is not already enabled\",\n\t\t\"sql\": \"SELECT NOT EXISTS (SELECT 1 AS \\\"one\\\" FROM \\\"pg_extension\\\" WHERE \\\"extname\\\" = $1) AS \\\"result\\\"\",\n\t\t\"params\": [\"postgis\"]\n\t}],\n\t\"execute\": [{\n\t\t\"description\": \"create extension \\\"postgis\\\"\",\n\t\t\"sql\": \"CREATE EXTENSION IF NOT EXISTS postgis\"\n\t}],\n\t\"postcheck\": [{\n\t\t\"description\": \"confirm extension \\\"postgis\\\" is enabled\",\n\t\t\"sql\": \"SELECT EXISTS (SELECT 1 AS \\\"one\\\" FROM \\\"pg_extension\\\" WHERE \\\"extname\\\" = $1) AS \\\"result\\\"\",\n\t\t\"params\": [\"postgis\"]\n\t}]\n}];\n//#endregion\n//#region migrations/refs/head.json\nvar head_default = {\n\thash: \"7e98a4d9437e6be2f2fa7fca02fbc01c245586997a937f97cab60788612512e5\",\n\tinvariants: [\"postgis:install-postgis-v1\"]\n};\n//#endregion\n//#region src/contract.json\nvar contract_default = {\n\tschemaVersion: \"1\",\n\ttargetFamily: \"sql\",\n\ttarget: \"postgres\",\n\tprofileHash: \"3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2\",\n\troots: {},\n\tdomain: { \"namespaces\": { \"public\": { \"models\": {} } } },\n\tstorage: {\n\t\t\"namespaces\": { \"public\": {\n\t\t\t\"entries\": { \"table\": {} },\n\t\t\t\"id\": \"public\",\n\t\t\t\"kind\": \"postgres-schema\"\n\t\t} },\n\t\t\"storageHash\": \"7e98a4d9437e6be2f2fa7fca02fbc01c245586997a937f97cab60788612512e5\",\n\t\t\"types\": { \"geometry\": {\n\t\t\t\"codecId\": \"pg/geometry@1\",\n\t\t\t\"kind\": \"codec-instance\",\n\t\t\t\"nativeType\": \"geometry\"\n\t\t} }\n\t},\n\tcapabilities: {\n\t\t\"postgres\": {\n\t\t\t\"distinctOn\": true,\n\t\t\t\"jsonAgg\": true,\n\t\t\t\"lateral\": true,\n\t\t\t\"limit\": true,\n\t\t\t\"orderBy\": true,\n\t\t\t\"returning\": true\n\t\t},\n\t\t\"sql\": {\n\t\t\t\"checkConstraint\": true,\n\t\t\t\"defaultInInsert\": true,\n\t\t\t\"enums\": true,\n\t\t\t\"insertOnConflictSkip\": true,\n\t\t\t\"insertOnConflictWithoutTarget\": true,\n\t\t\t\"lateral\": true,\n\t\t\t\"returning\": true,\n\t\t\t\"scalarList\": true\n\t\t}\n\t},\n\textensions: {},\n\tmeta: {},\n\t_generated: {\n\t\t\"warning\": \"⚠️ GENERATED FILE - DO NOT EDIT\",\n\t\t\"message\": \"This file is automatically generated by \\\"prisma contract emit\\\".\",\n\t\t\"regenerate\": \"To regenerate, run: prisma contract emit\"\n\t}\n};\n//#endregion\n//#region src/core/contract-space-constants.ts\n/**\n* Static names and identifiers used across postgis's contract space.\n*\n* Centralised here so the contract IR (`./contract`), the baseline\n* migration ops (`./migrations`), the head ref, and the descriptor\n* (`../exports/control`) all reference the same values without typos.\n*\n* The space identifier `'postgis'` is what the framework writes to\n* `migrations/` in the user's repo and what the marker table's\n* `space` column carries for postgis-owned rows.\n*\n* The `postgis:*` invariantId namespace is locked here — once\n* published, an invariantId is immutable so downstream consumers can\n* reference it by literal string match.\n*/\nconst POSTGIS_SPACE_ID = \"postgis\";\nconst POSTGIS_BASELINE_MIGRATION_NAME = \"20260601T0000_install_postgis_extension\";\n//#endregion\n//#region src/exports/control.ts\nconst geometryControlPlaneHooks = {\n\texpandNativeType: ({ nativeType, typeParams }) => {\n\t\tconst srid = typeParams?.[\"srid\"];\n\t\tif (typeof srid === \"number\" && Number.isInteger(srid) && srid >= 0) return `${nativeType}(Geometry,${srid})`;\n\t\treturn nativeType;\n\t},\n\tresolveIdentityValue: () => null\n};\nconst postgisContractSpace = contractSpaceFromJson({\n\tcontractJson: contract_default,\n\tmigrations: [{\n\t\tdirName: POSTGIS_BASELINE_MIGRATION_NAME,\n\t\tmetadata: migration_default,\n\t\tops: ops_default\n\t}],\n\theadRef: head_default\n});\nconst postgisExtensionDescriptor = {\n\t...postgisPackMeta,\n\tid: POSTGIS_SPACE_ID,\n\tcontractSpace: postgisContractSpace,\n\ttypes: {\n\t\t...postgisPackMeta.types,\n\t\tcodecTypes: {\n\t\t\t...postgisPackMeta.types.codecTypes,\n\t\t\tcontrolPlaneHooks: { [POSTGIS_GEOMETRY_CODEC_ID]: geometryControlPlaneHooks }\n\t\t}\n\t},\n\tqueryOperations: () => postgisQueryOperations(),\n\tcreate: () => ({\n\t\tfamilyId: \"sql\",\n\t\ttargetId: \"postgres\"\n\t})\n};\n//#endregion\nexport { postgisExtensionDescriptor as default, postgisExtensionDescriptor };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;AAIA,IAAI,oBAAoB;CACvB,MAAM;CACN,IAAI;CACJ,oBAAoB,CAAC,4BAA4B;CACj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C1B,IAAI,OAAO,SAAS,YAAY,OAAO,UAAU,IAAI,KAAK,QAAQ,GAAG,OAAO,GAAG,WAAW,YAAY,KAAK;EAC3G,OAAO;CACR;CACA,4BAA4B;AAC7B;AACA,MAAM,uBAAuB,sBAAsB;CAClD,cAAc;CACd,YAAY,CAAC;EACZ,SAAS;EACT,UAAU;EACV,KAAK;CACN,CAAC;CACD,SAAS;AACV,CAAC;AACD,MAAM,6BAA6B;CAClC,GAAG;CACH,IAAI;CACJ,eAAe;CACf,OAAO;EACN,GAAG,gBAAgB;EACnB,YAAY;GACX,GAAG,gBAAgB,MAAM;GACzB,mBAAmB,GAAG,4BAA4B,0BAA0B;EAC7E;CACD;CACA,uBAAuB,uBAAuB;CAC9C,eAAe;EACd,UAAU;EACV,UAAU;CACX;AACD"}
|
package/dist/{descriptor-meta-B_Tvchf6-CtY0EGNJ.mjs → descriptor-meta-Dg_0iDad-D95jFzvF.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as POSTGIS_GEOMETRY_CODEC_ID } from "./constants-CWW72xGt-hJye3Dua.mjs";
|
|
2
2
|
import { t as postgisError } from "./errors-Bg6kDFR--BUzKMn1A.mjs";
|
|
3
3
|
import { buildOperation, codecOf, toExpr } from "@prisma/orm-family-sql/relational-core/expression";
|
|
4
|
-
import { CodecImpl, dataType } from "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { CodecImpl, dataType, decodeJsonMatching } from "@prisma/orm-framework/components/codec";
|
|
5
5
|
import { pgText } from "@prisma/orm-target-postgres/target/data-types";
|
|
6
6
|
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
7
7
|
import { PostgresCodecDescriptor, definePostgresCodecs } from "@prisma/orm-target-postgres/target/codec-descriptor";
|
|
8
8
|
import { type } from "arktype";
|
|
9
|
-
//#region ../../../3-extensions/postgis/dist/descriptor-meta-
|
|
9
|
+
//#region ../../../3-extensions/postgis/dist/descriptor-meta-Dg_0iDad.mjs
|
|
10
10
|
const postgisAuthoringTypes = { postgis: { Geometry: {
|
|
11
11
|
kind: "typeConstructor",
|
|
12
12
|
args: [{
|
|
@@ -336,6 +336,7 @@ function formatPosition(p) {
|
|
|
336
336
|
function formatRings(rings) {
|
|
337
337
|
return rings.map((ring) => `(${ring.map(formatPosition).join(",")})`).join(",");
|
|
338
338
|
}
|
|
339
|
+
const HEX_TEXT = /^(?:[0-9A-Fa-f]{2})*$/;
|
|
339
340
|
const geometryParamsSchema = type({ "srid?": "number" }).narrow((params, ctx) => {
|
|
340
341
|
const { srid } = params;
|
|
341
342
|
if (srid === void 0) return true;
|
|
@@ -375,8 +376,7 @@ var PostgisGeometryCodec = class extends CodecImpl {
|
|
|
375
376
|
return encodeEWKBHex(value);
|
|
376
377
|
}
|
|
377
378
|
decodeJson(json) {
|
|
378
|
-
|
|
379
|
-
return decodeEWKBHex(json);
|
|
379
|
+
return decodeEWKBHex(decodeJsonMatching(POSTGIS_GEOMETRY_CODEC_ID, json, HEX_TEXT, "a HEXEWKB string"));
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
var PostgisGeometryDescriptor = class extends PostgresCodecDescriptor {
|
|
@@ -600,4 +600,4 @@ const postgisPackMeta = {
|
|
|
600
600
|
//#endregion
|
|
601
601
|
export { postgisPackMeta as n, postgisQueryOperations as r, postgisCodecRegistry as t };
|
|
602
602
|
|
|
603
|
-
//# sourceMappingURL=descriptor-meta-
|
|
603
|
+
//# sourceMappingURL=descriptor-meta-Dg_0iDad-D95jFzvF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-Dg_0iDad-D95jFzvF.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/descriptor-meta-Dg_0iDad.mjs"],"sourcesContent":["import { t as POSTGIS_GEOMETRY_CODEC_ID } from \"./constants-CWW72xGt.mjs\";\nimport { t as postgisError } from \"./errors-Bg6kDFR-.mjs\";\nimport { buildOperation, codecOf, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { CodecImpl, dataType, decodeJsonMatching } from \"@internal/framework-components/codec\";\nimport { pgText } from \"@internal/target-postgres/data-types\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\nimport { PostgresCodecDescriptor, definePostgresCodecs } from \"@internal/target-postgres/codec-descriptor\";\nimport { type } from \"arktype\";\n//#region src/core/authoring.ts\nconst postgisAuthoringTypes = { postgis: { Geometry: {\n\tkind: \"typeConstructor\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"srid\",\n\t\tinteger: true,\n\t\tminimum: 0\n\t}],\n\toutput: {\n\t\tcodecId: POSTGIS_GEOMETRY_CODEC_ID,\n\t\tnativeType: \"geometry\",\n\t\ttypeParams: { srid: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\n//#region src/core/data-types.ts\n/** The data type this extension owns. A geometry is written as text, which it takes unchanged. ADR 254. */\nconst postgisGeometry = dataType(\"postgis/geometry\", { casts: { [pgText.id]: (value) => value } });\nconst postgisDataTypes = [postgisGeometry];\n//#endregion\n//#region src/core/ewkb.ts\n/**\n* Minimal EWKB (Extended Well-Known Binary) reader for the PostGIS codec.\n*\n* `node-postgres` returns geometry columns as hex-encoded EWKB strings by\n* default. This reader parses the subset we ship with the extension —\n* Point, LineString, Polygon, and the Multi* counterparts — into GeoJSON\n* objects. Z and M coordinates are not supported; if a wire value carries\n* them, decoding throws so the caller can detect the mismatch instead of\n* silently dropping data.\n*/\nconst FLAG_Z = 2147483648;\nconst FLAG_M = 1073741824;\nconst FLAG_SRID = 536870912;\nconst TYPE_MASK = 536870911;\nconst TYPE_POINT = 1;\nconst TYPE_LINESTRING = 2;\nconst TYPE_POLYGON = 3;\nconst TYPE_MULTIPOINT = 4;\nconst TYPE_MULTILINESTRING = 5;\nconst TYPE_MULTIPOLYGON = 6;\nconst HEX_PAIR_RE = /^[0-9a-fA-F]{2}$/;\nfunction hexToBytes(hex) {\n\tif (hex.length % 2 !== 0) throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: odd-length hex string\", { meta: { wirePreview: hex.slice(0, 32) } });\n\tconst bytes = new Uint8Array(hex.length / 2);\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tconst pair = hex.slice(i * 2, i * 2 + 2);\n\t\tif (!HEX_PAIR_RE.test(pair)) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: invalid hex byte at offset ${i * 2}`, { meta: { wirePreview: hex.slice(0, 32) } });\n\t\tbytes[i] = Number.parseInt(pair, 16);\n\t}\n\treturn bytes;\n}\nvar Reader = class {\n\toffset = 0;\n\tview;\n\tconstructor(bytes) {\n\t\tthis.view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n\t}\n\trequireBytes(needed) {\n\t\tif (this.offset + needed > this.view.byteLength) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unexpected end of buffer (need ${needed} bytes at offset ${this.offset}, ${this.view.byteLength - this.offset} available)`);\n\t}\n\treadUint8() {\n\t\tthis.requireBytes(1);\n\t\tconst v = this.view.getUint8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn v;\n\t}\n\treadUint32(littleEndian) {\n\t\tthis.requireBytes(4);\n\t\tconst v = this.view.getUint32(this.offset, littleEndian);\n\t\tthis.offset += 4;\n\t\treturn v >>> 0;\n\t}\n\treadFloat64(littleEndian) {\n\t\tthis.requireBytes(8);\n\t\tconst v = this.view.getFloat64(this.offset, littleEndian);\n\t\tthis.offset += 8;\n\t\treturn v;\n\t}\n\thasRemaining() {\n\t\treturn this.offset !== this.view.byteLength;\n\t}\n\tremainingBytes() {\n\t\treturn this.view.byteLength - this.offset;\n\t}\n};\nvar Writer = class {\n\tbytes = [];\n\twriteUint8(value) {\n\t\tthis.bytes.push(value);\n\t}\n\twriteUint32(value) {\n\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(4);\n\t\tnew DataView(buffer).setUint32(0, value, true);\n\t\tthis.bytes.push(...new Uint8Array(buffer));\n\t}\n\twriteFloat64(value) {\n\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(8);\n\t\tnew DataView(buffer).setFloat64(0, value, true);\n\t\tthis.bytes.push(...new Uint8Array(buffer));\n\t}\n\ttoHex() {\n\t\treturn this.bytes.map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\").toUpperCase();\n\t}\n};\nfunction readHeader(reader) {\n\tconst byteOrder = reader.readUint8();\n\tif (byteOrder !== 0 && byteOrder !== 1) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: invalid byte order ${byteOrder}`);\n\tconst littleEndian = byteOrder === 1;\n\tconst typeCode = reader.readUint32(littleEndian);\n\tif ((typeCode & FLAG_Z) !== 0 || (typeCode & FLAG_M) !== 0) throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: Z/M coordinates are not supported\");\n\tconst geomType = typeCode & TYPE_MASK;\n\tif ((typeCode & FLAG_SRID) !== 0) return {\n\t\tgeomType,\n\t\tlittleEndian,\n\t\tsrid: reader.readUint32(littleEndian)\n\t};\n\treturn {\n\t\tgeomType,\n\t\tlittleEndian\n\t};\n}\nfunction readPosition(reader, littleEndian) {\n\treturn [reader.readFloat64(littleEndian), reader.readFloat64(littleEndian)];\n}\nfunction readPoint(reader, header) {\n\tconst coords = readPosition(reader, header.littleEndian);\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"Point\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"Point\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readLineString(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst coords = [];\n\tfor (let i = 0; i < n; i++) coords.push(readPosition(reader, header.littleEndian));\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"LineString\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"LineString\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readPolygon(reader, header) {\n\tconst numRings = reader.readUint32(header.littleEndian);\n\tconst rings = [];\n\tfor (let r = 0; r < numRings; r++) {\n\t\tconst n = reader.readUint32(header.littleEndian);\n\t\tconst ring = [];\n\t\tfor (let i = 0; i < n; i++) ring.push(readPosition(reader, header.littleEndian));\n\t\trings.push(ring);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"Polygon\",\n\t\tcoordinates: rings,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"Polygon\",\n\t\tcoordinates: rings\n\t};\n}\nfunction readSubGeometry(reader) {\n\tconst header = readHeader(reader);\n\tswitch (header.geomType) {\n\t\tcase TYPE_POINT: return readPoint(reader, header);\n\t\tcase TYPE_LINESTRING: return readLineString(reader, header);\n\t\tcase TYPE_POLYGON: return readPolygon(reader, header);\n\t\tdefault: throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unsupported sub-type ${header.geomType}`);\n\t}\n}\nfunction readMultiPoint(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst coords = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"Point\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiPoint contains non-Point sub-geometry\");\n\t\tcoords.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiPoint\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiPoint\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readMultiLineString(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst lines = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"LineString\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiLineString contains non-LineString sub-geometry\");\n\t\tlines.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiLineString\",\n\t\tcoordinates: lines,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiLineString\",\n\t\tcoordinates: lines\n\t};\n}\nfunction readMultiPolygon(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst polys = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"Polygon\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiPolygon contains non-Polygon sub-geometry\");\n\t\tpolys.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiPolygon\",\n\t\tcoordinates: polys,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiPolygon\",\n\t\tcoordinates: polys\n\t};\n}\nfunction decodeEWKBHex(hex) {\n\tconst reader = new Reader(hexToBytes(hex));\n\tconst geometry = readGeometryBody(reader, readHeader(reader));\n\tif (reader.hasRemaining()) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: trailing data after geometry (${reader.remainingBytes()} bytes)`, { meta: { wirePreview: hex.slice(0, 32) } });\n\treturn geometry;\n}\nfunction encodeEWKBHex(value) {\n\tconst writer = new Writer();\n\twriteGeometry(writer, value);\n\treturn writer.toHex();\n}\nfunction writeHeader(writer, geomType, srid) {\n\twriter.writeUint8(1);\n\twriter.writeUint32(srid === void 0 ? geomType : geomType | FLAG_SRID);\n\tif (srid !== void 0) writer.writeUint32(srid);\n}\nfunction writePosition(writer, position) {\n\tif (!Number.isFinite(position[0]) || !Number.isFinite(position[1])) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry encode: coordinates must be finite numbers\");\n\twriter.writeFloat64(position[0]);\n\twriter.writeFloat64(position[1]);\n}\nfunction writeLineStringBody(writer, positions) {\n\twriter.writeUint32(positions.length);\n\tfor (const position of positions) writePosition(writer, position);\n}\nfunction writePolygonBody(writer, rings) {\n\twriter.writeUint32(rings.length);\n\tfor (const ring of rings) writeLineStringBody(writer, ring);\n}\nfunction writeGeometry(writer, value) {\n\tswitch (value.type) {\n\t\tcase \"Point\":\n\t\t\twriteHeader(writer, TYPE_POINT, value.srid);\n\t\t\twritePosition(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"LineString\":\n\t\t\twriteHeader(writer, TYPE_LINESTRING, value.srid);\n\t\t\twriteLineStringBody(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"Polygon\":\n\t\t\twriteHeader(writer, TYPE_POLYGON, value.srid);\n\t\t\twritePolygonBody(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"MultiPoint\":\n\t\t\twriteHeader(writer, TYPE_MULTIPOINT, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const position of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_POINT);\n\t\t\t\twritePosition(writer, position);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"MultiLineString\":\n\t\t\twriteHeader(writer, TYPE_MULTILINESTRING, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const line of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_LINESTRING);\n\t\t\t\twriteLineStringBody(writer, line);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"MultiPolygon\":\n\t\t\twriteHeader(writer, TYPE_MULTIPOLYGON, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const polygon of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_POLYGON);\n\t\t\t\twritePolygonBody(writer, polygon);\n\t\t\t}\n\t\t\tbreak;\n\t}\n}\nfunction readGeometryBody(reader, header) {\n\tswitch (header.geomType) {\n\t\tcase TYPE_POINT: return readPoint(reader, header);\n\t\tcase TYPE_LINESTRING: return readLineString(reader, header);\n\t\tcase TYPE_POLYGON: return readPolygon(reader, header);\n\t\tcase TYPE_MULTIPOINT: return readMultiPoint(reader, header);\n\t\tcase TYPE_MULTILINESTRING: return readMultiLineString(reader, header);\n\t\tcase TYPE_MULTIPOLYGON: return readMultiPolygon(reader, header);\n\t\tdefault: throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unsupported geometry type ${header.geomType}`);\n\t}\n}\n/**\n* Encode a GeoJSON-shaped geometry to an EWKT string PostGIS understands\n* via `'<ewkt>'::geometry`. We use EWKT (not EWKB) on the way in so the\n* generated SQL stays human-readable.\n*/\nfunction encodeEWKT(value) {\n\tconst sridPrefix = value.srid !== void 0 ? `SRID=${value.srid};` : \"\";\n\tswitch (value.type) {\n\t\tcase \"Point\": return `${sridPrefix}POINT(${formatPosition(value.coordinates)})`;\n\t\tcase \"LineString\": return `${sridPrefix}LINESTRING(${value.coordinates.map(formatPosition).join(\",\")})`;\n\t\tcase \"Polygon\": return `${sridPrefix}POLYGON(${formatRings(value.coordinates)})`;\n\t\tcase \"MultiPoint\": return `${sridPrefix}MULTIPOINT(${value.coordinates.map(formatPosition).join(\",\")})`;\n\t\tcase \"MultiLineString\": return `${sridPrefix}MULTILINESTRING(${value.coordinates.map((line) => `(${line.map(formatPosition).join(\",\")})`).join(\",\")})`;\n\t\tcase \"MultiPolygon\": return `${sridPrefix}MULTIPOLYGON(${value.coordinates.map((poly) => `(${formatRings(poly)})`).join(\",\")})`;\n\t}\n}\nfunction formatPosition(p) {\n\tif (!Number.isFinite(p[0]) || !Number.isFinite(p[1])) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry encode: coordinates must be finite numbers\");\n\treturn `${p[0]} ${p[1]}`;\n}\nfunction formatRings(rings) {\n\treturn rings.map((ring) => `(${ring.map(formatPosition).join(\",\")})`).join(\",\");\n}\n//#endregion\n//#region src/core/codecs.ts\nconst HEX_TEXT = /^(?:[0-9A-Fa-f]{2})*$/;\nconst geometryParamsSchema = type({ \"srid?\": \"number\" }).narrow((params, ctx) => {\n\tconst { srid } = params;\n\tif (srid === void 0) return true;\n\tif (!Number.isInteger(srid)) return ctx.mustBe(\"an integer\");\n\tif (srid < 0) return ctx.mustBe(\"a non-negative integer\");\n\treturn true;\n});\nconst POSTGIS_GEOMETRY_NATIVE_TYPE = \"geometry\";\nconst allowedGeometryTypes = /* @__PURE__ */ new Set([\n\t\"Point\",\n\t\"LineString\",\n\t\"Polygon\",\n\t\"MultiPoint\",\n\t\"MultiLineString\",\n\t\"MultiPolygon\"\n]);\nfunction assertGeometry(value) {\n\tif (!value || typeof value !== \"object\") throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry value must be a GeoJSON-shaped object\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\tconst type = value.type;\n\tif (typeof type !== \"string\" || !allowedGeometryTypes.has(type)) throw postgisError(\"RUNTIME.ENCODE_FAILED\", `Geometry value: unsupported type \"${String(type)}\" (expected Point, LineString, Polygon, MultiPoint, MultiLineString, or MultiPolygon)`, { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\tif (!Array.isArray(value.coordinates)) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry value: \\\"coordinates\\\" must be an array\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n}\nvar PostgisGeometryCodec = class extends CodecImpl {\n\tconstructor(descriptor) {\n\t\tsuper(descriptor);\n\t}\n\tasync encode(value, _ctx) {\n\t\tassertGeometry(value);\n\t\treturn encodeEWKT(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\tif (typeof wire !== \"string\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value must be a string\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\t\treturn decodeEWKBHex(wire);\n\t}\n\tencodeJson(value) {\n\t\tassertGeometry(value);\n\t\treturn encodeEWKBHex(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeEWKBHex(decodeJsonMatching(POSTGIS_GEOMETRY_CODEC_ID, json, HEX_TEXT, \"a HEXEWKB string\"));\n\t}\n};\nvar PostgisGeometryDescriptor = class extends PostgresCodecDescriptor {\n\tnativeType() {\n\t\treturn POSTGIS_GEOMETRY_NATIVE_TYPE;\n\t}\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = postgisGeometry.id;\n\tcodecId = POSTGIS_GEOMETRY_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"geometry\"];\n\tparamsSchema = geometryParamsSchema;\n\trenderOutputType(params) {\n\t\tconst { srid } = params;\n\t\tif (srid === void 0) return \"Geometry\";\n\t\treturn `Geometry<${srid}>`;\n\t}\n\t/**\n\t* Runtime materialization uses an empty parameter object for the\n\t* existing unparameterized `geometryColumn` variant and `{ srid }` for\n\t* constrained columns. Both resolve to the same SRID-agnostic codec:\n\t* the wire format already carries SRID inside the EWKT/EWKB payload,\n\t* so codec behavior is parameter-independent.\n\t*/\n\tfactory(_params) {\n\t\treturn () => new PostgisGeometryCodec(this);\n\t}\n};\nconst codecDescriptorMap = { geometry: new PostgisGeometryDescriptor() };\n//#endregion\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/extension-postgis`.\n*\n* Public consumer surface for the postgis codec set. Currently a single\n* entry (`pg/geometry@1`); the registry shape stays consistent with\n* the other codec-shipping packages so consumers don't need to\n* special-case extensions.\n*/\nconst postgisCodecRegistry = buildCodecDescriptorRegistry(definePostgresCodecs(Object.values(codecDescriptorMap)));\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst postgisTypeId = \"pg/geometry@1\";\n/**\n* Build the PostGIS query operations exposed on `geometry` columns.\n*\n* Each operation lowers to a function-template that the SQL renderer\n* stitches into the surrounding statement (`{{self}}` is the receiver,\n* `{{argN}}` are the call arguments). All templates rely on the implicit\n* `geometry`/`float8`/`bool` casts already wired up by the SQL family —\n* we only add the PostGIS-specific function names.\n*/\nfunction postgisQueryOperations() {\n\treturn {\n\t\tdistance: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"distance\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/float8@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Distance({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdistanceSphere: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"distanceSphere\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/float8@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_DistanceSphere({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdwithin: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other, distance) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"dwithin\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self, selfCodec),\n\t\t\t\t\t\ttoExpr(other, selfCodec),\n\t\t\t\t\t\ttoExpr(distance, { codecId: \"pg/float8@1\" })\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_DWithin({{self}}, {{arg0}}, {{arg1}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcontains: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"contains\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Contains({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twithin: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"within\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Within({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tintersects: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"intersects\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Intersects({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tintersectsBbox: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"intersectsBbox\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"({{self}} && {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}\nconst postgisPackMeta = {\n\tkind: \"extension\",\n\tid: \"postgis\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: { postgres: { \"postgis.geometry\": true } },\n\tauthoring: { type: postgisAuthoringTypes },\n\tdataTypes: postgisDataTypes,\n\ttypes: {\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgisCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/extension-postgis/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PostgisTypes\"\n\t\t\t},\n\t\t\ttypeImports: [{\n\t\t\t\tpackage: \"@internal/extension-postgis/codec-types\",\n\t\t\t\tnamed: \"Geometry\",\n\t\t\t\talias: \"Geometry\"\n\t\t\t}]\n\t\t},\n\t\tqueryOperationTypes: { import: {\n\t\t\tpackage: \"@internal/extension-postgis/operation-types\",\n\t\t\tnamed: \"QueryOperationTypes\",\n\t\t\talias: \"PostgisQueryOperationTypes\"\n\t\t} },\n\t\tstorage: [{\n\t\t\ttypeId: postgisTypeId,\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\",\n\t\t\tnativeType: \"geometry\"\n\t\t}]\n\t}\n};\n//#endregion\nexport { postgisQueryOperations as n, postgisCodecRegistry as r, postgisPackMeta as t };\n\n//# sourceMappingURL=descriptor-meta-Dg_0iDad.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,wBAAwB,EAAE,SAAS,EAAE,UAAU;CACpD,MAAM;CACN,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;EACT,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY;EACZ,YAAY,EAAE,MAAM;GACnB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE;;AAIJ,MAAM,kBAAkB,SAAS,oBAAoB,EAAE,OAAO,GAAG,OAAO,MAAM,UAAU,MAAM,EAAE,CAAC;AACjG,MAAM,mBAAmB,CAAC,eAAe;;;;;;;;;;;AAazC,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB;AAC1B,MAAM,cAAc;AACpB,SAAS,WAAW,KAAK;CACxB,IAAI,IAAI,SAAS,MAAM,GAAG,MAAM,aAAa,yBAAyB,8CAA8C,EAAE,MAAM,EAAE,aAAa,IAAI,MAAM,GAAG,EAAE,EAAE,EAAE,CAAC;CAC/J,MAAM,QAAQ,IAAI,WAAW,IAAI,SAAS,CAAC;CAC3C,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;EACtC,MAAM,OAAO,IAAI,MAAM,IAAI,G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;EACF;EACA,qBAAqB,EAAE,QAAQ;GAC9B,SAAS;GACT,OAAO;GACP,OAAO;EACR,EAAE;EACF,SAAS,CAAC;GACT,QAAQ;GACR,UAAU;GACV,UAAU;GACV,YAAY;EACb,CAAC;CACF;AACD"}
|
package/dist/pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as postgisPackMeta } from "./descriptor-meta-
|
|
1
|
+
import { n as postgisPackMeta } from "./descriptor-meta-Dg_0iDad-D95jFzvF.mjs";
|
|
2
2
|
export { postgisPackMeta as default };
|
package/dist/runtime.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as postgisPackMeta, r as postgisQueryOperations, t as postgisCodecRegistry } from "./descriptor-meta-
|
|
1
|
+
import { n as postgisPackMeta, r as postgisQueryOperations, t as postgisCodecRegistry } from "./descriptor-meta-Dg_0iDad-D95jFzvF.mjs";
|
|
2
2
|
//#region ../../../3-extensions/postgis/dist/runtime.mjs
|
|
3
3
|
const postgisRuntimeDescriptor = {
|
|
4
4
|
kind: "extension",
|
package/dist/runtime.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/runtime.mjs"],"sourcesContent":["import { n as postgisQueryOperations, r as postgisCodecRegistry, t as postgisPackMeta } from \"./descriptor-meta-
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/runtime.mjs"],"sourcesContent":["import { n as postgisQueryOperations, r as postgisCodecRegistry, t as postgisPackMeta } from \"./descriptor-meta-Dg_0iDad.mjs\";\n//#region src/exports/runtime.ts\nconst postgisRuntimeDescriptor = {\n\tkind: \"extension\",\n\tid: postgisPackMeta.id,\n\tversion: postgisPackMeta.version,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\ttypes: { codecTypes: { codecDescriptors: Array.from(postgisCodecRegistry.values()) } },\n\tcodecs: () => Array.from(postgisCodecRegistry.values()),\n\tqueryOperations: () => postgisQueryOperations(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { postgisRuntimeDescriptor as default, postgisCodecRegistry };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;AAEA,MAAM,2BAA2B;CAChC,MAAM;CACN,IAAI,gBAAgB;CACpB,SAAS,gBAAgB;CACzB,UAAU;CACV,UAAU;CACV,OAAO,EAAE,YAAY,EAAE,kBAAkB,MAAM,KAAK,qBAAqB,OAAO,CAAC,EAAE,EAAE;CACrF,cAAc,MAAM,KAAK,qBAAqB,OAAO,CAAC;CACtD,uBAAuB,uBAAuB;CAC9C,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-extension-postgis",
|
|
3
|
-
"version": "8.0.0-rc.14-dev.
|
|
3
|
+
"version": "8.0.0-rc.14-dev.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.14-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.14-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.14-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.14-dev.7",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.14-dev.7",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.14-dev.7",
|
|
15
15
|
"@standard-schema/spec": "^1.1.0",
|
|
16
16
|
"arktype": "^2.2.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@internal/extension-postgis": "8.0.0-rc.14-dev.
|
|
20
|
-
"@repo/tsconfig": "8.0.0-rc.14-dev.
|
|
21
|
-
"@repo/tsdown": "8.0.0-rc.14-dev.
|
|
22
|
-
"@prisma/orm-target-postgres": "8.0.0-rc.14-dev.
|
|
19
|
+
"@internal/extension-postgis": "8.0.0-rc.14-dev.7",
|
|
20
|
+
"@repo/tsconfig": "8.0.0-rc.14-dev.7",
|
|
21
|
+
"@repo/tsdown": "8.0.0-rc.14-dev.7",
|
|
22
|
+
"@prisma/orm-target-postgres": "8.0.0-rc.14-dev.7",
|
|
23
23
|
"tsdown": "0.22.14",
|
|
24
24
|
"typescript": "5.9.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@prisma/orm-target-postgres": "8.0.0-rc.14-dev.
|
|
27
|
+
"@prisma/orm-target-postgres": "8.0.0-rc.14-dev.7",
|
|
28
28
|
"typescript": ">=5.9"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-B_Tvchf6-CtY0EGNJ.mjs","names":[],"sources":["../../../../3-extensions/postgis/dist/descriptor-meta-B_Tvchf6.mjs"],"sourcesContent":["import { t as POSTGIS_GEOMETRY_CODEC_ID } from \"./constants-CWW72xGt.mjs\";\nimport { t as postgisError } from \"./errors-Bg6kDFR-.mjs\";\nimport { buildOperation, codecOf, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { CodecImpl, dataType } from \"@internal/framework-components/codec\";\nimport { pgText } from \"@internal/target-postgres/data-types\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\nimport { PostgresCodecDescriptor, definePostgresCodecs } from \"@internal/target-postgres/codec-descriptor\";\nimport { type } from \"arktype\";\n//#region src/core/authoring.ts\nconst postgisAuthoringTypes = { postgis: { Geometry: {\n\tkind: \"typeConstructor\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"srid\",\n\t\tinteger: true,\n\t\tminimum: 0\n\t}],\n\toutput: {\n\t\tcodecId: POSTGIS_GEOMETRY_CODEC_ID,\n\t\tnativeType: \"geometry\",\n\t\ttypeParams: { srid: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\n//#region src/core/data-types.ts\n/** The data type this extension owns. A geometry is written as text, which it takes unchanged. ADR 254. */\nconst postgisGeometry = dataType(\"postgis/geometry\", { casts: { [pgText.id]: (value) => value } });\nconst postgisDataTypes = [postgisGeometry];\n//#endregion\n//#region src/core/ewkb.ts\n/**\n* Minimal EWKB (Extended Well-Known Binary) reader for the PostGIS codec.\n*\n* `node-postgres` returns geometry columns as hex-encoded EWKB strings by\n* default. This reader parses the subset we ship with the extension —\n* Point, LineString, Polygon, and the Multi* counterparts — into GeoJSON\n* objects. Z and M coordinates are not supported; if a wire value carries\n* them, decoding throws so the caller can detect the mismatch instead of\n* silently dropping data.\n*/\nconst FLAG_Z = 2147483648;\nconst FLAG_M = 1073741824;\nconst FLAG_SRID = 536870912;\nconst TYPE_MASK = 536870911;\nconst TYPE_POINT = 1;\nconst TYPE_LINESTRING = 2;\nconst TYPE_POLYGON = 3;\nconst TYPE_MULTIPOINT = 4;\nconst TYPE_MULTILINESTRING = 5;\nconst TYPE_MULTIPOLYGON = 6;\nconst HEX_PAIR_RE = /^[0-9a-fA-F]{2}$/;\nfunction hexToBytes(hex) {\n\tif (hex.length % 2 !== 0) throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: odd-length hex string\", { meta: { wirePreview: hex.slice(0, 32) } });\n\tconst bytes = new Uint8Array(hex.length / 2);\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tconst pair = hex.slice(i * 2, i * 2 + 2);\n\t\tif (!HEX_PAIR_RE.test(pair)) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: invalid hex byte at offset ${i * 2}`, { meta: { wirePreview: hex.slice(0, 32) } });\n\t\tbytes[i] = Number.parseInt(pair, 16);\n\t}\n\treturn bytes;\n}\nvar Reader = class {\n\toffset = 0;\n\tview;\n\tconstructor(bytes) {\n\t\tthis.view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n\t}\n\trequireBytes(needed) {\n\t\tif (this.offset + needed > this.view.byteLength) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unexpected end of buffer (need ${needed} bytes at offset ${this.offset}, ${this.view.byteLength - this.offset} available)`);\n\t}\n\treadUint8() {\n\t\tthis.requireBytes(1);\n\t\tconst v = this.view.getUint8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn v;\n\t}\n\treadUint32(littleEndian) {\n\t\tthis.requireBytes(4);\n\t\tconst v = this.view.getUint32(this.offset, littleEndian);\n\t\tthis.offset += 4;\n\t\treturn v >>> 0;\n\t}\n\treadFloat64(littleEndian) {\n\t\tthis.requireBytes(8);\n\t\tconst v = this.view.getFloat64(this.offset, littleEndian);\n\t\tthis.offset += 8;\n\t\treturn v;\n\t}\n\thasRemaining() {\n\t\treturn this.offset !== this.view.byteLength;\n\t}\n\tremainingBytes() {\n\t\treturn this.view.byteLength - this.offset;\n\t}\n};\nvar Writer = class {\n\tbytes = [];\n\twriteUint8(value) {\n\t\tthis.bytes.push(value);\n\t}\n\twriteUint32(value) {\n\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(4);\n\t\tnew DataView(buffer).setUint32(0, value, true);\n\t\tthis.bytes.push(...new Uint8Array(buffer));\n\t}\n\twriteFloat64(value) {\n\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(8);\n\t\tnew DataView(buffer).setFloat64(0, value, true);\n\t\tthis.bytes.push(...new Uint8Array(buffer));\n\t}\n\ttoHex() {\n\t\treturn this.bytes.map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\").toUpperCase();\n\t}\n};\nfunction readHeader(reader) {\n\tconst byteOrder = reader.readUint8();\n\tif (byteOrder !== 0 && byteOrder !== 1) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: invalid byte order ${byteOrder}`);\n\tconst littleEndian = byteOrder === 1;\n\tconst typeCode = reader.readUint32(littleEndian);\n\tif ((typeCode & FLAG_Z) !== 0 || (typeCode & FLAG_M) !== 0) throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: Z/M coordinates are not supported\");\n\tconst geomType = typeCode & TYPE_MASK;\n\tif ((typeCode & FLAG_SRID) !== 0) return {\n\t\tgeomType,\n\t\tlittleEndian,\n\t\tsrid: reader.readUint32(littleEndian)\n\t};\n\treturn {\n\t\tgeomType,\n\t\tlittleEndian\n\t};\n}\nfunction readPosition(reader, littleEndian) {\n\treturn [reader.readFloat64(littleEndian), reader.readFloat64(littleEndian)];\n}\nfunction readPoint(reader, header) {\n\tconst coords = readPosition(reader, header.littleEndian);\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"Point\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"Point\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readLineString(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst coords = [];\n\tfor (let i = 0; i < n; i++) coords.push(readPosition(reader, header.littleEndian));\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"LineString\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"LineString\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readPolygon(reader, header) {\n\tconst numRings = reader.readUint32(header.littleEndian);\n\tconst rings = [];\n\tfor (let r = 0; r < numRings; r++) {\n\t\tconst n = reader.readUint32(header.littleEndian);\n\t\tconst ring = [];\n\t\tfor (let i = 0; i < n; i++) ring.push(readPosition(reader, header.littleEndian));\n\t\trings.push(ring);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"Polygon\",\n\t\tcoordinates: rings,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"Polygon\",\n\t\tcoordinates: rings\n\t};\n}\nfunction readSubGeometry(reader) {\n\tconst header = readHeader(reader);\n\tswitch (header.geomType) {\n\t\tcase TYPE_POINT: return readPoint(reader, header);\n\t\tcase TYPE_LINESTRING: return readLineString(reader, header);\n\t\tcase TYPE_POLYGON: return readPolygon(reader, header);\n\t\tdefault: throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unsupported sub-type ${header.geomType}`);\n\t}\n}\nfunction readMultiPoint(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst coords = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"Point\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiPoint contains non-Point sub-geometry\");\n\t\tcoords.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiPoint\",\n\t\tcoordinates: coords,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiPoint\",\n\t\tcoordinates: coords\n\t};\n}\nfunction readMultiLineString(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst lines = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"LineString\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiLineString contains non-LineString sub-geometry\");\n\t\tlines.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiLineString\",\n\t\tcoordinates: lines,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiLineString\",\n\t\tcoordinates: lines\n\t};\n}\nfunction readMultiPolygon(reader, header) {\n\tconst n = reader.readUint32(header.littleEndian);\n\tconst polys = [];\n\tfor (let i = 0; i < n; i++) {\n\t\tconst sub = readSubGeometry(reader);\n\t\tif (sub.type !== \"Polygon\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value: MultiPolygon contains non-Polygon sub-geometry\");\n\t\tpolys.push(sub.coordinates);\n\t}\n\treturn header.srid !== void 0 ? {\n\t\ttype: \"MultiPolygon\",\n\t\tcoordinates: polys,\n\t\tsrid: header.srid\n\t} : {\n\t\ttype: \"MultiPolygon\",\n\t\tcoordinates: polys\n\t};\n}\nfunction decodeEWKBHex(hex) {\n\tconst reader = new Reader(hexToBytes(hex));\n\tconst geometry = readGeometryBody(reader, readHeader(reader));\n\tif (reader.hasRemaining()) throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: trailing data after geometry (${reader.remainingBytes()} bytes)`, { meta: { wirePreview: hex.slice(0, 32) } });\n\treturn geometry;\n}\nfunction encodeEWKBHex(value) {\n\tconst writer = new Writer();\n\twriteGeometry(writer, value);\n\treturn writer.toHex();\n}\nfunction writeHeader(writer, geomType, srid) {\n\twriter.writeUint8(1);\n\twriter.writeUint32(srid === void 0 ? geomType : geomType | FLAG_SRID);\n\tif (srid !== void 0) writer.writeUint32(srid);\n}\nfunction writePosition(writer, position) {\n\tif (!Number.isFinite(position[0]) || !Number.isFinite(position[1])) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry encode: coordinates must be finite numbers\");\n\twriter.writeFloat64(position[0]);\n\twriter.writeFloat64(position[1]);\n}\nfunction writeLineStringBody(writer, positions) {\n\twriter.writeUint32(positions.length);\n\tfor (const position of positions) writePosition(writer, position);\n}\nfunction writePolygonBody(writer, rings) {\n\twriter.writeUint32(rings.length);\n\tfor (const ring of rings) writeLineStringBody(writer, ring);\n}\nfunction writeGeometry(writer, value) {\n\tswitch (value.type) {\n\t\tcase \"Point\":\n\t\t\twriteHeader(writer, TYPE_POINT, value.srid);\n\t\t\twritePosition(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"LineString\":\n\t\t\twriteHeader(writer, TYPE_LINESTRING, value.srid);\n\t\t\twriteLineStringBody(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"Polygon\":\n\t\t\twriteHeader(writer, TYPE_POLYGON, value.srid);\n\t\t\twritePolygonBody(writer, value.coordinates);\n\t\t\tbreak;\n\t\tcase \"MultiPoint\":\n\t\t\twriteHeader(writer, TYPE_MULTIPOINT, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const position of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_POINT);\n\t\t\t\twritePosition(writer, position);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"MultiLineString\":\n\t\t\twriteHeader(writer, TYPE_MULTILINESTRING, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const line of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_LINESTRING);\n\t\t\t\twriteLineStringBody(writer, line);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"MultiPolygon\":\n\t\t\twriteHeader(writer, TYPE_MULTIPOLYGON, value.srid);\n\t\t\twriter.writeUint32(value.coordinates.length);\n\t\t\tfor (const polygon of value.coordinates) {\n\t\t\t\twriteHeader(writer, TYPE_POLYGON);\n\t\t\t\twritePolygonBody(writer, polygon);\n\t\t\t}\n\t\t\tbreak;\n\t}\n}\nfunction readGeometryBody(reader, header) {\n\tswitch (header.geomType) {\n\t\tcase TYPE_POINT: return readPoint(reader, header);\n\t\tcase TYPE_LINESTRING: return readLineString(reader, header);\n\t\tcase TYPE_POLYGON: return readPolygon(reader, header);\n\t\tcase TYPE_MULTIPOINT: return readMultiPoint(reader, header);\n\t\tcase TYPE_MULTILINESTRING: return readMultiLineString(reader, header);\n\t\tcase TYPE_MULTIPOLYGON: return readMultiPolygon(reader, header);\n\t\tdefault: throw postgisError(\"RUNTIME.DECODE_FAILED\", `Geometry wire value: unsupported geometry type ${header.geomType}`);\n\t}\n}\n/**\n* Encode a GeoJSON-shaped geometry to an EWKT string PostGIS understands\n* via `'<ewkt>'::geometry`. We use EWKT (not EWKB) on the way in so the\n* generated SQL stays human-readable.\n*/\nfunction encodeEWKT(value) {\n\tconst sridPrefix = value.srid !== void 0 ? `SRID=${value.srid};` : \"\";\n\tswitch (value.type) {\n\t\tcase \"Point\": return `${sridPrefix}POINT(${formatPosition(value.coordinates)})`;\n\t\tcase \"LineString\": return `${sridPrefix}LINESTRING(${value.coordinates.map(formatPosition).join(\",\")})`;\n\t\tcase \"Polygon\": return `${sridPrefix}POLYGON(${formatRings(value.coordinates)})`;\n\t\tcase \"MultiPoint\": return `${sridPrefix}MULTIPOINT(${value.coordinates.map(formatPosition).join(\",\")})`;\n\t\tcase \"MultiLineString\": return `${sridPrefix}MULTILINESTRING(${value.coordinates.map((line) => `(${line.map(formatPosition).join(\",\")})`).join(\",\")})`;\n\t\tcase \"MultiPolygon\": return `${sridPrefix}MULTIPOLYGON(${value.coordinates.map((poly) => `(${formatRings(poly)})`).join(\",\")})`;\n\t}\n}\nfunction formatPosition(p) {\n\tif (!Number.isFinite(p[0]) || !Number.isFinite(p[1])) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry encode: coordinates must be finite numbers\");\n\treturn `${p[0]} ${p[1]}`;\n}\nfunction formatRings(rings) {\n\treturn rings.map((ring) => `(${ring.map(formatPosition).join(\",\")})`).join(\",\");\n}\n//#endregion\n//#region src/core/codecs.ts\nconst geometryParamsSchema = type({ \"srid?\": \"number\" }).narrow((params, ctx) => {\n\tconst { srid } = params;\n\tif (srid === void 0) return true;\n\tif (!Number.isInteger(srid)) return ctx.mustBe(\"an integer\");\n\tif (srid < 0) return ctx.mustBe(\"a non-negative integer\");\n\treturn true;\n});\nconst POSTGIS_GEOMETRY_NATIVE_TYPE = \"geometry\";\nconst allowedGeometryTypes = /* @__PURE__ */ new Set([\n\t\"Point\",\n\t\"LineString\",\n\t\"Polygon\",\n\t\"MultiPoint\",\n\t\"MultiLineString\",\n\t\"MultiPolygon\"\n]);\nfunction assertGeometry(value) {\n\tif (!value || typeof value !== \"object\") throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry value must be a GeoJSON-shaped object\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\tconst type = value.type;\n\tif (typeof type !== \"string\" || !allowedGeometryTypes.has(type)) throw postgisError(\"RUNTIME.ENCODE_FAILED\", `Geometry value: unsupported type \"${String(type)}\" (expected Point, LineString, Polygon, MultiPoint, MultiLineString, or MultiPolygon)`, { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\tif (!Array.isArray(value.coordinates)) throw postgisError(\"RUNTIME.ENCODE_FAILED\", \"Geometry value: \\\"coordinates\\\" must be an array\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n}\nvar PostgisGeometryCodec = class extends CodecImpl {\n\tconstructor(descriptor) {\n\t\tsuper(descriptor);\n\t}\n\tasync encode(value, _ctx) {\n\t\tassertGeometry(value);\n\t\treturn encodeEWKT(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\tif (typeof wire !== \"string\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry wire value must be a string\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\t\treturn decodeEWKBHex(wire);\n\t}\n\tencodeJson(value) {\n\t\tassertGeometry(value);\n\t\treturn encodeEWKBHex(value);\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\") throw postgisError(\"RUNTIME.DECODE_FAILED\", \"Geometry database JSON value must be a HEXEWKB string\", { meta: { codecId: POSTGIS_GEOMETRY_CODEC_ID } });\n\t\treturn decodeEWKBHex(json);\n\t}\n};\nvar PostgisGeometryDescriptor = class extends PostgresCodecDescriptor {\n\tnativeType() {\n\t\treturn POSTGIS_GEOMETRY_NATIVE_TYPE;\n\t}\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = postgisGeometry.id;\n\tcodecId = POSTGIS_GEOMETRY_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"geometry\"];\n\tparamsSchema = geometryParamsSchema;\n\trenderOutputType(params) {\n\t\tconst { srid } = params;\n\t\tif (srid === void 0) return \"Geometry\";\n\t\treturn `Geometry<${srid}>`;\n\t}\n\t/**\n\t* Runtime materialization uses an empty parameter object for the\n\t* existing unparameterized `geometryColumn` variant and `{ srid }` for\n\t* constrained columns. Both resolve to the same SRID-agnostic codec:\n\t* the wire format already carries SRID inside the EWKT/EWKB payload,\n\t* so codec behavior is parameter-independent.\n\t*/\n\tfactory(_params) {\n\t\treturn () => new PostgisGeometryCodec(this);\n\t}\n};\nconst codecDescriptorMap = { geometry: new PostgisGeometryDescriptor() };\n//#endregion\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/extension-postgis`.\n*\n* Public consumer surface for the postgis codec set. Currently a single\n* entry (`pg/geometry@1`); the registry shape stays consistent with\n* the other codec-shipping packages so consumers don't need to\n* special-case extensions.\n*/\nconst postgisCodecRegistry = buildCodecDescriptorRegistry(definePostgresCodecs(Object.values(codecDescriptorMap)));\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst postgisTypeId = \"pg/geometry@1\";\n/**\n* Build the PostGIS query operations exposed on `geometry` columns.\n*\n* Each operation lowers to a function-template that the SQL renderer\n* stitches into the surrounding statement (`{{self}}` is the receiver,\n* `{{argN}}` are the call arguments). All templates rely on the implicit\n* `geometry`/`float8`/`bool` casts already wired up by the SQL family —\n* we only add the PostGIS-specific function names.\n*/\nfunction postgisQueryOperations() {\n\treturn {\n\t\tdistance: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"distance\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/float8@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Distance({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdistanceSphere: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"distanceSphere\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/float8@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_DistanceSphere({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdwithin: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other, distance) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"dwithin\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self, selfCodec),\n\t\t\t\t\t\ttoExpr(other, selfCodec),\n\t\t\t\t\t\ttoExpr(distance, { codecId: \"pg/float8@1\" })\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_DWithin({{self}}, {{arg0}}, {{arg1}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcontains: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"contains\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Contains({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twithin: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"within\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Within({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tintersects: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"intersects\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"ST_Intersects({{self}}, {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tintersectsBbox: {\n\t\t\tself: { codecId: postgisTypeId },\n\t\t\timpl: (self, other) => {\n\t\t\t\tconst selfCodec = codecOf(self);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"intersectsBbox\",\n\t\t\t\t\targs: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: \"pg/bool@1\",\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: \"({{self}} && {{arg0}})\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}\nconst postgisPackMeta = {\n\tkind: \"extension\",\n\tid: \"postgis\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: { postgres: { \"postgis.geometry\": true } },\n\tauthoring: { type: postgisAuthoringTypes },\n\tdataTypes: postgisDataTypes,\n\ttypes: {\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgisCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/extension-postgis/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PostgisTypes\"\n\t\t\t},\n\t\t\ttypeImports: [{\n\t\t\t\tpackage: \"@internal/extension-postgis/codec-types\",\n\t\t\t\tnamed: \"Geometry\",\n\t\t\t\talias: \"Geometry\"\n\t\t\t}]\n\t\t},\n\t\tqueryOperationTypes: { import: {\n\t\t\tpackage: \"@internal/extension-postgis/operation-types\",\n\t\t\tnamed: \"QueryOperationTypes\",\n\t\t\talias: \"PostgisQueryOperationTypes\"\n\t\t} },\n\t\tstorage: [{\n\t\t\ttypeId: postgisTypeId,\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\",\n\t\t\tnativeType: \"geometry\"\n\t\t}]\n\t}\n};\n//#endregion\nexport { postgisQueryOperations as n, postgisCodecRegistry as r, postgisPackMeta as t };\n\n//# sourceMappingURL=descriptor-me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