@honua/react 0.1.2-beta.0 → 0.1.4-beta.0
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/contract/discovery.d.ts +34 -0
- package/contract/discovery.d.ts.map +1 -1
- package/contract/index.d.ts +7 -5
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +3 -2
- package/contract/pmtiles.d.ts +10 -1
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +10 -2
- package/contract/protocol-module.d.ts +84 -9
- package/contract/protocol-module.d.ts.map +1 -1
- package/contract/query-filter-fes.d.ts +18 -0
- package/contract/query-filter-fes.d.ts.map +1 -0
- package/contract/query-filter-fes.js +122 -0
- package/contract/query-filter.d.ts +300 -0
- package/contract/query-filter.d.ts.map +1 -0
- package/contract/query-filter.js +883 -0
- package/contract/schema.d.ts +12 -0
- package/contract/schema.d.ts.map +1 -1
- package/contract/schema.js +34 -0
- package/contract/source-capability-support.d.ts.map +1 -1
- package/contract/source-capability-support.js +15 -3
- package/contract/source.d.ts +45 -25
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +719 -479
- package/contract/types.d.ts +87 -18
- package/contract/types.d.ts.map +1 -1
- package/contract/widget-source.d.ts.map +1 -1
- package/core/client.d.ts +45 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +224 -46
- package/core/error-classifications.d.ts +6 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +6 -0
- package/core/error-code-registry.d.ts +6 -0
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +6 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +68 -4
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +325 -8
- package/core/odata-write-codec.d.ts.map +1 -1
- package/core/odata-write-codec.js +0 -1
- package/core/odata.d.ts +6 -0
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +6 -1
- package/core/ogc-processes.d.ts +182 -25
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +602 -30
- package/core/process-runner.d.ts +8 -1
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +1 -0
- package/core/protocol-transport.d.ts +2 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/stac.d.ts +31 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +136 -19
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +123 -9
- package/core/types.d.ts.map +1 -1
- package/core/wfs-axis-order.d.ts +18 -0
- package/core/wfs-axis-order.d.ts.map +1 -0
- package/core/wfs-axis-order.js +108 -0
- package/core/wfs-capabilities.d.ts +65 -24
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +237 -27
- package/core/wfs-filter.d.ts +26 -3
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +48 -53
- package/core/wfs-protocol-error.d.ts +12 -0
- package/core/wfs-protocol-error.d.ts.map +1 -0
- package/core/wfs-protocol-error.js +13 -0
- package/core/wfs.d.ts +53 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +251 -29
- package/core/wms-feature-info.d.ts +92 -0
- package/core/wms-feature-info.d.ts.map +1 -0
- package/core/wms-feature-info.js +285 -0
- package/core/wms.d.ts +9 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +17 -5
- package/esri-compat/event-bus.d.ts +20 -0
- package/esri-compat/event-bus.d.ts.map +1 -1
- package/esri-compat/feature-filter.d.ts +46 -1
- package/esri-compat/feature-filter.d.ts.map +1 -1
- package/esri-compat/feature-filter.js +49 -0
- package/esri-compat/geojson-layer.d.ts +4 -2
- package/esri-compat/geojson-layer.d.ts.map +1 -1
- package/esri-compat/geojson-layer.js +4 -2
- package/esri-compat/identity-manager.js +2 -2
- package/esri-compat/imagery-layer.d.ts +2 -1
- package/esri-compat/imagery-layer.d.ts.map +1 -1
- package/esri-compat/imagery-layer.js +2 -1
- package/esri-compat/layer-list.d.ts +8 -1
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +11 -4
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +1 -1
- package/esri-compat/locator.d.ts +297 -0
- package/esri-compat/locator.d.ts.map +1 -0
- package/esri-compat/locator.js +579 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +1 -1
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/time-slider.d.ts +29 -0
- package/esri-compat/time-slider.d.ts.map +1 -1
- package/esri-compat/time-slider.js +117 -0
- package/esri-compat/wfs-layer.d.ts +2 -1
- package/esri-compat/wfs-layer.d.ts.map +1 -1
- package/esri-compat/wfs-layer.js +2 -1
- package/esri-compat/widget-host.d.ts +42 -6
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +99 -10
- package/generated-app/projection.d.ts.map +1 -1
- package/generated-app/runtime.d.ts.map +1 -1
- package/map/data-to-map-bridge.d.ts +1 -1
- package/map/data-to-map-bridge.d.ts.map +1 -1
- package/map/data-to-map-bridge.js +1 -2
- package/map/honua-map.d.ts.map +1 -1
- package/map/honua-map.js +1 -1
- package/map/index.d.ts +2 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +2 -0
- package/map/realtime-reconciliation-adapter.d.ts +98 -0
- package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
- package/map/realtime-reconciliation-adapter.js +84 -0
- package/map/temporal-playback.d.ts +25 -0
- package/map/temporal-playback.d.ts.map +1 -1
- package/map/temporal-playback.js +29 -1
- package/package.json +4 -3
- package/query-planner/canonical-filter.d.ts +30 -0
- package/query-planner/canonical-filter.d.ts.map +1 -0
- package/query-planner/canonical-filter.js +30 -0
- package/query-planner/columnar-plan.d.ts +63 -0
- package/query-planner/columnar-plan.d.ts.map +1 -0
- package/query-planner/columnar-plan.js +94 -0
- package/query-planner/diagnostics.d.ts +3 -3
- package/query-planner/diagnostics.d.ts.map +1 -1
- package/query-planner/diagnostics.js +17 -4
- package/query-planner/duckdb.d.ts.map +1 -1
- package/query-planner/duckdb.js +16 -2
- package/query-planner/execution-context.d.ts.map +1 -1
- package/query-planner/execution-context.js +3 -1
- package/query-planner/executor.d.ts.map +1 -1
- package/query-planner/executor.js +7 -1
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +24 -5
- package/query-planner/grpc.d.ts.map +1 -1
- package/query-planner/grpc.js +29 -5
- package/query-planner/index.d.ts +20 -5
- package/query-planner/index.d.ts.map +1 -1
- package/query-planner/index.js +16 -3
- package/query-planner/ir.d.ts +6 -1
- package/query-planner/ir.d.ts.map +1 -1
- package/query-planner/ir.js +63 -1
- package/query-planner/odata-protocol-module.d.ts +54 -0
- package/query-planner/odata-protocol-module.d.ts.map +1 -0
- package/query-planner/odata-protocol-module.js +199 -0
- package/query-planner/odata-v1.d.ts +23 -0
- package/query-planner/odata-v1.d.ts.map +1 -0
- package/query-planner/odata-v1.js +202 -0
- package/query-planner/odata.d.ts +0 -3
- package/query-planner/odata.d.ts.map +1 -1
- package/query-planner/odata.js +0 -143
- package/query-planner/ogc-features.d.ts.map +1 -1
- package/query-planner/ogc-features.js +23 -1
- package/query-planner/planner.d.ts +2 -2
- package/query-planner/planner.d.ts.map +1 -1
- package/query-planner/planner.js +146 -27
- package/query-planner/representation.d.ts +59 -0
- package/query-planner/representation.d.ts.map +1 -0
- package/query-planner/representation.js +140 -0
- package/query-planner/types.d.ts +153 -3
- package/query-planner/types.d.ts.map +1 -1
- package/query-planner/wfs-protocol-module.d.ts +57 -0
- package/query-planner/wfs-protocol-module.d.ts.map +1 -0
- package/query-planner/wfs-protocol-module.js +731 -0
- package/query-planner/wfs-v1.d.ts +41 -0
- package/query-planner/wfs-v1.d.ts.map +1 -0
- package/query-planner/wfs-v1.js +366 -0
- package/query-planner/wfs.d.ts +1 -3
- package/query-planner/wfs.d.ts.map +1 -1
- package/query-planner/wfs.js +1 -70
- package/react/honua-map.d.ts +3 -1
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +11 -1
- package/react/hooks.d.ts +1 -1
- package/react/hooks.js +1 -1
- package/react/selection.d.ts.map +1 -1
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +1 -1
- package/react/use-mounted-source.js +1 -1
- package/realtime/checkpoint-store.d.ts +206 -0
- package/realtime/checkpoint-store.d.ts.map +1 -0
- package/realtime/checkpoint-store.js +504 -0
- package/realtime/contract.d.ts +142 -0
- package/realtime/contract.d.ts.map +1 -0
- package/realtime/contract.js +154 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +131 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +302 -0
- package/realtime/index.d.ts +39 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +26 -0
- package/realtime/odata-delta.d.ts +114 -0
- package/realtime/odata-delta.d.ts.map +1 -0
- package/realtime/odata-delta.js +483 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/resumable-transport.d.ts +111 -0
- package/realtime/resumable-transport.d.ts.map +1 -0
- package/realtime/resumable-transport.js +406 -0
- package/realtime/resumable.d.ts +104 -0
- package/realtime/resumable.d.ts.map +1 -0
- package/realtime/resumable.js +632 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +147 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/realtime/websocket.d.ts +60 -0
- package/realtime/websocket.d.ts.map +1 -0
- package/realtime/websocket.js +157 -0
- package/realtime/wire.d.ts +28 -0
- package/realtime/wire.d.ts.map +1 -0
- package/realtime/wire.js +73 -0
- package/runtime/index.d.ts +6 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -1
- package/runtime/load-package.d.ts +24 -0
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +45 -1
- package/runtime/maplibre-renderer.d.ts +11 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -1
- package/runtime/maplibre-renderer.js +32 -7
- package/runtime/offline-region-protocol.d.ts +73 -0
- package/runtime/offline-region-protocol.d.ts.map +1 -0
- package/runtime/offline-region-protocol.js +63 -0
- package/runtime/offline-region-style.d.ts +78 -0
- package/runtime/offline-region-style.d.ts.map +1 -0
- package/runtime/offline-region-style.js +147 -0
- package/runtime/pmtiles-protocol.d.ts +7 -8
- package/runtime/pmtiles-protocol.d.ts.map +1 -1
- package/runtime/pmtiles-protocol.js +19 -66
- package/runtime/protocol-registry.d.ts +55 -0
- package/runtime/protocol-registry.d.ts.map +1 -0
- package/runtime/protocol-registry.js +103 -0
- package/runtime/runtime.d.ts +2 -0
- package/runtime/runtime.d.ts.map +1 -1
- package/runtime/runtime.js +6 -1
- package/studio/index.d.ts +24 -7
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +21 -7
- package/studio/lifecycle-client.d.ts +164 -0
- package/studio/lifecycle-client.d.ts.map +1 -0
- package/studio/lifecycle-client.js +299 -0
- package/studio/lifecycle-errors.d.ts +91 -0
- package/studio/lifecycle-errors.d.ts.map +1 -0
- package/studio/lifecycle-errors.js +77 -0
- package/studio/lifecycle-types.d.ts +321 -0
- package/studio/lifecycle-types.d.ts.map +1 -0
- package/studio/lifecycle-types.js +22 -0
- package/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
package/core/geoparquet-sql.d.ts
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* (b) a string literal escaped by {@link stringLiteral} (single quotes doubled,
|
|
17
17
|
* embedded NULs rejected), or (c) a SQL identifier escaped by
|
|
18
18
|
* {@link quoteIdentifier} (double quotes doubled, embedded NULs / control chars
|
|
19
|
-
* rejected).
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* rejected). {@link Query.where} is the one raw-text lane: it is caller-authored
|
|
20
|
+
* DuckDB filter SQL, so it cannot be escaped like a value. It is instead
|
|
21
|
+
* **contained** by {@link validateWhereExpression} before it is embedded — see
|
|
22
|
+
* that function for the exact trust model.
|
|
23
23
|
*
|
|
24
24
|
* @module
|
|
25
25
|
*/
|
|
@@ -48,6 +48,70 @@ export declare function numberLiteral(value: number): string;
|
|
|
48
48
|
* validates non-negative finiteness.
|
|
49
49
|
*/
|
|
50
50
|
export declare function integerLiteral(value: number): string;
|
|
51
|
+
/**
|
|
52
|
+
* Fixed rejection codes emitted by {@link validateWhereExpression}. Codes are
|
|
53
|
+
* stable and the thrown message never echoes the rejected text, so a hostile
|
|
54
|
+
* `where` cannot smuggle content into logs or a UI error toast.
|
|
55
|
+
*/
|
|
56
|
+
export type GeoParquetWhereRejectionCode = "GEOPARQUET_WHERE_NOT_TEXT" | "GEOPARQUET_WHERE_EMPTY" | "GEOPARQUET_WHERE_CONTROL_CHARACTER" | "GEOPARQUET_WHERE_UNTERMINATED_QUOTE" | "GEOPARQUET_WHERE_STATEMENT_SEPARATOR" | "GEOPARQUET_WHERE_COMMENT" | "GEOPARQUET_WHERE_UNBALANCED_PARENTHESES" | "GEOPARQUET_WHERE_PARAMETER_MARKER" | "GEOPARQUET_WHERE_ESCAPE_STRING" | "GEOPARQUET_WHERE_FORBIDDEN_KEYWORD";
|
|
57
|
+
/**
|
|
58
|
+
* A `Query.where` expression was rejected before it could be embedded in
|
|
59
|
+
* DuckDB SQL. Carries a fixed {@link GeoParquetWhereRejectionCode} rather than
|
|
60
|
+
* the offending text.
|
|
61
|
+
*/
|
|
62
|
+
export declare class GeoParquetWhereClauseError extends Error {
|
|
63
|
+
readonly code: GeoParquetWhereRejectionCode;
|
|
64
|
+
/** The denylisted keyword for `GEOPARQUET_WHERE_FORBIDDEN_KEYWORD`; never caller text otherwise. */
|
|
65
|
+
readonly keyword: string | undefined;
|
|
66
|
+
constructor(code: GeoParquetWhereRejectionCode, detail: string, keyword?: string);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Contain a caller-authored {@link Query.where} expression before it is
|
|
70
|
+
* embedded in generated DuckDB SQL, returning the trimmed text on success.
|
|
71
|
+
*
|
|
72
|
+
* ## Trust model
|
|
73
|
+
*
|
|
74
|
+
* `where` is raw filter SQL — the GeoParquet/DuckDB lane has no value-escaping
|
|
75
|
+
* equivalent for it, and the semantic (typed, parameterized) compiler in
|
|
76
|
+
* `query-planner/duckdb.ts` is the path that removes the raw text entirely.
|
|
77
|
+
* Until a caller migrates to that path, this validator draws the boundary:
|
|
78
|
+
*
|
|
79
|
+
* **Guaranteed by this function.** The accepted text is a *single* expression
|
|
80
|
+
* that cannot leave the `WHERE ( … )` slot it is spliced into. It rejects, with
|
|
81
|
+
* a typed {@link GeoParquetWhereClauseError}:
|
|
82
|
+
*
|
|
83
|
+
* - statement separators (`;`) and therefore chained/multi-statement input;
|
|
84
|
+
* - SQL comments — both line (`--`) and block comment markers — including the
|
|
85
|
+
* trailing-comment trick that would otherwise swallow the compiler's own
|
|
86
|
+
* `AND (<spatial predicate>)`;
|
|
87
|
+
* - unterminated string / quoted-identifier literals, which is how `x' OR 1=1`
|
|
88
|
+
* style probes escape a literal;
|
|
89
|
+
* - `E'…'` escape strings, where a backslash escapes a quote: that second
|
|
90
|
+
* escaping grammar would let a literal end for this scanner but not for
|
|
91
|
+
* DuckDB, so every boundary after it is mis-parsed. Plain literals with
|
|
92
|
+
* doubled quotes carry the same data;
|
|
93
|
+
* - unbalanced parentheses, so the wrapping `( … )` cannot be closed early to
|
|
94
|
+
* re-associate or append clauses;
|
|
95
|
+
* - `SELECT` / `UNION` and other statement or set-operation keywords, plus a
|
|
96
|
+
* table-context `FROM`, so a filter cannot become a subquery or UNION probe
|
|
97
|
+
* that reads other tables or files registered in the same DuckDB session.
|
|
98
|
+
* `FROM` stays available in its expression forms — `EXTRACT(YEAR FROM ts)`,
|
|
99
|
+
* `TRIM(BOTH ' ' FROM name)`, `SUBSTRING(name FROM 2 FOR 3)`, `OVERLAY(…)`;
|
|
100
|
+
* - parameter markers (`?`, `$1`, `$name`) — this lane binds no values;
|
|
101
|
+
* - control characters other than tab / newline / carriage return.
|
|
102
|
+
*
|
|
103
|
+
* **Still the caller's responsibility.** This is containment, not a semantic
|
|
104
|
+
* parser: accepted text is still executed by DuckDB. It can reference any
|
|
105
|
+
* column in the scanned files, call any scalar function the session exposes,
|
|
106
|
+
* and cost arbitrary CPU. Fabricating a syntactically invalid expression still
|
|
107
|
+
* fails at DuckDB, not here. Applications that forward end-user input (a filter
|
|
108
|
+
* box, a URL parameter) should build the expression from typed inputs rather
|
|
109
|
+
* than concatenating strings, and treat this validator as a backstop.
|
|
110
|
+
*
|
|
111
|
+
* The `Source.protocol("geoparquet").sql(...)` handle remains an explicit,
|
|
112
|
+
* opt-in raw-SQL escape hatch and is deliberately not covered here.
|
|
113
|
+
*/
|
|
114
|
+
export declare function validateWhereExpression(where: string): string;
|
|
51
115
|
/**
|
|
52
116
|
* Build the `read_parquet(...)` table expression from one or more file URLs /
|
|
53
117
|
* globs. A single source renders `read_parquet('url')`; multiple sources
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geoparquet-sql.d.ts","sourceRoot":"","sources":["../../../src/core/geoparquet-sql.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;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AAE,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAW7E;AAID,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAyHD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,GAAG,WAAW,CAkB/E;AAsBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,GAAG;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE,EAC/C,OAAO,EAAE,cAAc,GACtB,WAAW,CA6Bb;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAIjE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAIjE"}
|
package/core/geoparquet-sql.js
CHANGED
|
@@ -16,13 +16,15 @@
|
|
|
16
16
|
* (b) a string literal escaped by {@link stringLiteral} (single quotes doubled,
|
|
17
17
|
* embedded NULs rejected), or (c) a SQL identifier escaped by
|
|
18
18
|
* {@link quoteIdentifier} (double quotes doubled, embedded NULs / control chars
|
|
19
|
-
* rejected).
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* rejected). {@link Query.where} is the one raw-text lane: it is caller-authored
|
|
20
|
+
* DuckDB filter SQL, so it cannot be escaped like a value. It is instead
|
|
21
|
+
* **contained** by {@link validateWhereExpression} before it is embedded — see
|
|
22
|
+
* that function for the exact trust model.
|
|
23
23
|
*
|
|
24
24
|
* @module
|
|
25
25
|
*/
|
|
26
|
+
import { andQueryFilters, compileQueryFilterToDuckDbSql, temporalFilterToExpression, } from "../contract/query-filter.js";
|
|
27
|
+
import { HonuaCapabilityNotSupportedError } from "./errors.js";
|
|
26
28
|
// ── Identifier / literal escaping ─────────────────────────────
|
|
27
29
|
/**
|
|
28
30
|
* Quote a SQL identifier for DuckDB: wrap in double quotes and double any
|
|
@@ -74,6 +76,267 @@ export function integerLiteral(value) {
|
|
|
74
76
|
}
|
|
75
77
|
return String(Math.trunc(value));
|
|
76
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* A `Query.where` expression was rejected before it could be embedded in
|
|
81
|
+
* DuckDB SQL. Carries a fixed {@link GeoParquetWhereRejectionCode} rather than
|
|
82
|
+
* the offending text.
|
|
83
|
+
*/
|
|
84
|
+
export class GeoParquetWhereClauseError extends Error {
|
|
85
|
+
code;
|
|
86
|
+
/** The denylisted keyword for `GEOPARQUET_WHERE_FORBIDDEN_KEYWORD`; never caller text otherwise. */
|
|
87
|
+
keyword;
|
|
88
|
+
constructor(code, detail, keyword) {
|
|
89
|
+
super(`geoparquet: ${code}: ${detail}`);
|
|
90
|
+
this.name = "GeoParquetWhereClauseError";
|
|
91
|
+
this.code = code;
|
|
92
|
+
this.keyword = keyword;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Keywords that would turn a filter expression into a statement, a set
|
|
97
|
+
* operation, or a second table scan. They are rejected as bare words only:
|
|
98
|
+
* a column genuinely named `union` or `select` stays addressable by quoting it
|
|
99
|
+
* (`"union" = 1`), because quoted identifiers are skipped by the scanner.
|
|
100
|
+
*
|
|
101
|
+
* `FROM` is contextual: it is denied as a table context but allowed inside the
|
|
102
|
+
* SQL-standard expression forms listed in {@link WHERE_EXPRESSION_FROM_HEADS}.
|
|
103
|
+
*/
|
|
104
|
+
const WHERE_FORBIDDEN_KEYWORDS = new Set([
|
|
105
|
+
"ABORT",
|
|
106
|
+
"ALTER",
|
|
107
|
+
"ANALYZE",
|
|
108
|
+
"ATTACH",
|
|
109
|
+
"BEGIN",
|
|
110
|
+
"CALL",
|
|
111
|
+
"CHECKPOINT",
|
|
112
|
+
"COMMIT",
|
|
113
|
+
"COPY",
|
|
114
|
+
"CREATE",
|
|
115
|
+
"DEALLOCATE",
|
|
116
|
+
"DELETE",
|
|
117
|
+
"DESCRIBE",
|
|
118
|
+
"DETACH",
|
|
119
|
+
"DROP",
|
|
120
|
+
"EXCEPT",
|
|
121
|
+
"EXECUTE",
|
|
122
|
+
"EXPLAIN",
|
|
123
|
+
"EXPORT",
|
|
124
|
+
"FROM",
|
|
125
|
+
"GRANT",
|
|
126
|
+
"IMPORT",
|
|
127
|
+
"INSERT",
|
|
128
|
+
"INSTALL",
|
|
129
|
+
"INTERSECT",
|
|
130
|
+
"JOIN",
|
|
131
|
+
"LATERAL",
|
|
132
|
+
"LOAD",
|
|
133
|
+
"MERGE",
|
|
134
|
+
"PIVOT",
|
|
135
|
+
"PRAGMA",
|
|
136
|
+
"PREPARE",
|
|
137
|
+
"REINDEX",
|
|
138
|
+
"RESET",
|
|
139
|
+
"REVOKE",
|
|
140
|
+
"ROLLBACK",
|
|
141
|
+
"SELECT",
|
|
142
|
+
"SET",
|
|
143
|
+
"START",
|
|
144
|
+
"SUMMARIZE",
|
|
145
|
+
"TRUNCATE",
|
|
146
|
+
"UNION",
|
|
147
|
+
"UNPIVOT",
|
|
148
|
+
"UPDATE",
|
|
149
|
+
"USE",
|
|
150
|
+
"VACUUM",
|
|
151
|
+
"VALUES",
|
|
152
|
+
"WITH",
|
|
153
|
+
]);
|
|
154
|
+
/**
|
|
155
|
+
* Function heads whose SQL-standard grammar uses `FROM` inside an expression:
|
|
156
|
+
* `EXTRACT(YEAR FROM ts)`, `TRIM(BOTH ' ' FROM name)`,
|
|
157
|
+
* `SUBSTRING(name FROM 2 FOR 3)`, `OVERLAY(a PLACING b FROM 2)`. A `FROM`
|
|
158
|
+
* whose innermost enclosing parenthesis was opened by one of these is an
|
|
159
|
+
* expression operand, not a table context. (`POSITION(a IN b)` spells its
|
|
160
|
+
* separator `IN`, which is never denied.)
|
|
161
|
+
*/
|
|
162
|
+
const WHERE_EXPRESSION_FROM_HEADS = new Set(["EXTRACT", "TRIM", "SUBSTRING", "OVERLAY"]);
|
|
163
|
+
// Tab / newline / carriage return are legitimate formatting in a multi-line
|
|
164
|
+
// filter; every other C0 control character and DEL is a smuggling vector.
|
|
165
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: rejecting control chars in caller SQL is the point
|
|
166
|
+
const WHERE_CONTROL_CHARACTERS = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/;
|
|
167
|
+
const WHERE_WORD_START = /[\p{L}_]/u;
|
|
168
|
+
const WHERE_WORD_CHARACTER = /[\p{L}\p{N}_]/u;
|
|
169
|
+
// Sticky (not anchored-on-a-slice) so scanning stays linear in the input size.
|
|
170
|
+
const WHERE_DOLLAR_QUOTE = /\$(?:[A-Za-z_][A-Za-z0-9_]*)?\$/y;
|
|
171
|
+
/** The `$tag$` dollar-quote delimiter starting exactly at `index`, if any. */
|
|
172
|
+
function dollarQuoteDelimiterAt(text, index) {
|
|
173
|
+
WHERE_DOLLAR_QUOTE.lastIndex = index;
|
|
174
|
+
return WHERE_DOLLAR_QUOTE.exec(text)?.[0];
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Contain a caller-authored {@link Query.where} expression before it is
|
|
178
|
+
* embedded in generated DuckDB SQL, returning the trimmed text on success.
|
|
179
|
+
*
|
|
180
|
+
* ## Trust model
|
|
181
|
+
*
|
|
182
|
+
* `where` is raw filter SQL — the GeoParquet/DuckDB lane has no value-escaping
|
|
183
|
+
* equivalent for it, and the semantic (typed, parameterized) compiler in
|
|
184
|
+
* `query-planner/duckdb.ts` is the path that removes the raw text entirely.
|
|
185
|
+
* Until a caller migrates to that path, this validator draws the boundary:
|
|
186
|
+
*
|
|
187
|
+
* **Guaranteed by this function.** The accepted text is a *single* expression
|
|
188
|
+
* that cannot leave the `WHERE ( … )` slot it is spliced into. It rejects, with
|
|
189
|
+
* a typed {@link GeoParquetWhereClauseError}:
|
|
190
|
+
*
|
|
191
|
+
* - statement separators (`;`) and therefore chained/multi-statement input;
|
|
192
|
+
* - SQL comments — both line (`--`) and block comment markers — including the
|
|
193
|
+
* trailing-comment trick that would otherwise swallow the compiler's own
|
|
194
|
+
* `AND (<spatial predicate>)`;
|
|
195
|
+
* - unterminated string / quoted-identifier literals, which is how `x' OR 1=1`
|
|
196
|
+
* style probes escape a literal;
|
|
197
|
+
* - `E'…'` escape strings, where a backslash escapes a quote: that second
|
|
198
|
+
* escaping grammar would let a literal end for this scanner but not for
|
|
199
|
+
* DuckDB, so every boundary after it is mis-parsed. Plain literals with
|
|
200
|
+
* doubled quotes carry the same data;
|
|
201
|
+
* - unbalanced parentheses, so the wrapping `( … )` cannot be closed early to
|
|
202
|
+
* re-associate or append clauses;
|
|
203
|
+
* - `SELECT` / `UNION` and other statement or set-operation keywords, plus a
|
|
204
|
+
* table-context `FROM`, so a filter cannot become a subquery or UNION probe
|
|
205
|
+
* that reads other tables or files registered in the same DuckDB session.
|
|
206
|
+
* `FROM` stays available in its expression forms — `EXTRACT(YEAR FROM ts)`,
|
|
207
|
+
* `TRIM(BOTH ' ' FROM name)`, `SUBSTRING(name FROM 2 FOR 3)`, `OVERLAY(…)`;
|
|
208
|
+
* - parameter markers (`?`, `$1`, `$name`) — this lane binds no values;
|
|
209
|
+
* - control characters other than tab / newline / carriage return.
|
|
210
|
+
*
|
|
211
|
+
* **Still the caller's responsibility.** This is containment, not a semantic
|
|
212
|
+
* parser: accepted text is still executed by DuckDB. It can reference any
|
|
213
|
+
* column in the scanned files, call any scalar function the session exposes,
|
|
214
|
+
* and cost arbitrary CPU. Fabricating a syntactically invalid expression still
|
|
215
|
+
* fails at DuckDB, not here. Applications that forward end-user input (a filter
|
|
216
|
+
* box, a URL parameter) should build the expression from typed inputs rather
|
|
217
|
+
* than concatenating strings, and treat this validator as a backstop.
|
|
218
|
+
*
|
|
219
|
+
* The `Source.protocol("geoparquet").sql(...)` handle remains an explicit,
|
|
220
|
+
* opt-in raw-SQL escape hatch and is deliberately not covered here.
|
|
221
|
+
*/
|
|
222
|
+
export function validateWhereExpression(where) {
|
|
223
|
+
if (typeof where !== "string") {
|
|
224
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_NOT_TEXT", "where must be a string expression");
|
|
225
|
+
}
|
|
226
|
+
const text = where.trim();
|
|
227
|
+
if (text.length === 0) {
|
|
228
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_EMPTY", "where must not be blank");
|
|
229
|
+
}
|
|
230
|
+
if (WHERE_CONTROL_CHARACTERS.test(text)) {
|
|
231
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_CONTROL_CHARACTER", "where contains a control character outside tab/newline/carriage return");
|
|
232
|
+
}
|
|
233
|
+
// One entry per open parenthesis, holding the function head that opened it
|
|
234
|
+
// (`EXTRACT` for `EXTRACT(`), so a contextual `FROM` can be told apart from a
|
|
235
|
+
// table context. Its length is the current nesting depth.
|
|
236
|
+
const parenHeads = [];
|
|
237
|
+
// The most recent bare word, still eligible to be the head of a `(` that
|
|
238
|
+
// follows it across whitespace only.
|
|
239
|
+
let pendingHead;
|
|
240
|
+
let index = 0;
|
|
241
|
+
while (index < text.length) {
|
|
242
|
+
const character = text[index];
|
|
243
|
+
if (character === "'" || character === '"') {
|
|
244
|
+
index = skipWhereQuotedToken(text, index, character);
|
|
245
|
+
pendingHead = undefined;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (character === "$") {
|
|
249
|
+
const delimiter = dollarQuoteDelimiterAt(text, index);
|
|
250
|
+
if (!delimiter) {
|
|
251
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_PARAMETER_MARKER", "where must not contain a parameter marker; this lane binds no values");
|
|
252
|
+
}
|
|
253
|
+
const end = text.indexOf(delimiter, index + delimiter.length);
|
|
254
|
+
if (end === -1) {
|
|
255
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_UNTERMINATED_QUOTE", "where contains an unterminated dollar-quoted literal");
|
|
256
|
+
}
|
|
257
|
+
index = end + delimiter.length;
|
|
258
|
+
pendingHead = undefined;
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (character === "?") {
|
|
262
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_PARAMETER_MARKER", "where must not contain a parameter marker; this lane binds no values");
|
|
263
|
+
}
|
|
264
|
+
if (character === ";") {
|
|
265
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_STATEMENT_SEPARATOR", "where must be one expression, not a statement sequence");
|
|
266
|
+
}
|
|
267
|
+
if ((character === "-" && text[index + 1] === "-") ||
|
|
268
|
+
(character === "/" && text[index + 1] === "*") ||
|
|
269
|
+
(character === "*" && text[index + 1] === "/")) {
|
|
270
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_COMMENT", "where must not contain a SQL comment");
|
|
271
|
+
}
|
|
272
|
+
if (character === "(") {
|
|
273
|
+
parenHeads.push(pendingHead);
|
|
274
|
+
pendingHead = undefined;
|
|
275
|
+
index += 1;
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
if (character === ")") {
|
|
279
|
+
if (parenHeads.length === 0) {
|
|
280
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_UNBALANCED_PARENTHESES", "where closes more parentheses than it opens");
|
|
281
|
+
}
|
|
282
|
+
parenHeads.pop();
|
|
283
|
+
pendingHead = undefined;
|
|
284
|
+
index += 1;
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (WHERE_WORD_START.test(character)) {
|
|
288
|
+
let end = index + 1;
|
|
289
|
+
while (end < text.length && WHERE_WORD_CHARACTER.test(text[end]))
|
|
290
|
+
end += 1;
|
|
291
|
+
const word = text.slice(index, end).toUpperCase();
|
|
292
|
+
// `E'…'` / `e'…'` escape strings give backslash its escaping power, so
|
|
293
|
+
// `\'` would end the literal for this scanner but not for DuckDB. Refuse
|
|
294
|
+
// the prefix rather than model a second escaping grammar.
|
|
295
|
+
if (word === "E" && text[end] === "'") {
|
|
296
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_ESCAPE_STRING", "where must not use an E-prefixed escape string; use a plain literal with doubled quotes");
|
|
297
|
+
}
|
|
298
|
+
if (word === "FROM" && !WHERE_EXPRESSION_FROM_HEADS.has(parenHeads[parenHeads.length - 1] ?? "")) {
|
|
299
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_FORBIDDEN_KEYWORD", "where must be a single boolean expression; a table-context FROM keyword is not addressable from a filter (FROM is allowed only inside EXTRACT/TRIM/SUBSTRING/OVERLAY)", word);
|
|
300
|
+
}
|
|
301
|
+
if (word !== "FROM" && WHERE_FORBIDDEN_KEYWORDS.has(word)) {
|
|
302
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_FORBIDDEN_KEYWORD", `where must be a single boolean expression; the ${word} keyword is not addressable from a filter (quote it to reference a column of that name)`, word);
|
|
303
|
+
}
|
|
304
|
+
pendingHead = word;
|
|
305
|
+
index = end;
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
// Whitespace keeps a pending function head alive across `EXTRACT (…`.
|
|
309
|
+
if (!(character === " " || character === "\t" || character === "\n" || character === "\r")) {
|
|
310
|
+
pendingHead = undefined;
|
|
311
|
+
}
|
|
312
|
+
index += 1;
|
|
313
|
+
}
|
|
314
|
+
if (parenHeads.length !== 0) {
|
|
315
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_UNBALANCED_PARENTHESES", "where leaves a parenthesis open");
|
|
316
|
+
}
|
|
317
|
+
return text;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Advance past a `'…'` string literal or a `"…"` quoted identifier, honouring
|
|
321
|
+
* the SQL doubled-quote escape. Throws when the literal never closes.
|
|
322
|
+
*/
|
|
323
|
+
function skipWhereQuotedToken(text, start, quote) {
|
|
324
|
+
let index = start + 1;
|
|
325
|
+
while (index < text.length) {
|
|
326
|
+
if (text[index] !== quote) {
|
|
327
|
+
index += 1;
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (text[index + 1] === quote) {
|
|
331
|
+
index += 2;
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
return index + 1;
|
|
335
|
+
}
|
|
336
|
+
throw new GeoParquetWhereClauseError("GEOPARQUET_WHERE_UNTERMINATED_QUOTE", quote === "'"
|
|
337
|
+
? "where contains an unterminated string literal"
|
|
338
|
+
: "where contains an unterminated quoted identifier");
|
|
339
|
+
}
|
|
77
340
|
// ── read_parquet(...) source expression ───────────────────────
|
|
78
341
|
/**
|
|
79
342
|
* Build the `read_parquet(...)` table expression from one or more file URLs /
|
|
@@ -202,15 +465,63 @@ export function spatialPredicate(bbox, plan) {
|
|
|
202
465
|
}
|
|
203
466
|
const DEFAULT_GEOMETRY_ALIAS = "geometry";
|
|
204
467
|
// ── WHERE + ORDER BY + LIMIT fragments ────────────────────────
|
|
205
|
-
|
|
468
|
+
/**
|
|
469
|
+
* Assemble the `WHERE` fragment. A caller-authored `where` is contained by
|
|
470
|
+
* {@link validateWhereExpression} first, so a hostile expression throws a
|
|
471
|
+
* {@link GeoParquetWhereClauseError} here instead of reaching DuckDB.
|
|
472
|
+
*/
|
|
473
|
+
function whereClause(query, spatial, typed) {
|
|
206
474
|
const clauses = [];
|
|
207
475
|
if (typeof query.where === "string" && query.where.trim().length > 0) {
|
|
208
|
-
clauses.push(`(${query.where})`);
|
|
476
|
+
clauses.push(`(${validateWhereExpression(query.where)})`);
|
|
209
477
|
}
|
|
478
|
+
if (typed)
|
|
479
|
+
clauses.push(`(${typed})`);
|
|
210
480
|
if (spatial)
|
|
211
481
|
clauses.push(`(${spatial})`);
|
|
212
482
|
return clauses.length > 0 ? ` WHERE ${clauses.join(" AND ")}` : "";
|
|
213
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Compile `Query.filter` / `Query.temporalFilter` into DuckDB SQL. Spatial
|
|
486
|
+
* nodes reduce to the bbox predicate the driver already pushes down; a
|
|
487
|
+
* non-envelope geometry is therefore a documented widening, reported through
|
|
488
|
+
* `bboxApproximated` (and from there `Result.degraded`) rather than dropped.
|
|
489
|
+
* GeoParquet has no protocol-level time parameter, so a temporal filter must
|
|
490
|
+
* name its field.
|
|
491
|
+
*/
|
|
492
|
+
function typedFilterSql(query, options) {
|
|
493
|
+
const ctx = {
|
|
494
|
+
protocol: "geoparquet",
|
|
495
|
+
...(options.geometry ? { geometryProperty: options.geometry.column } : {}),
|
|
496
|
+
};
|
|
497
|
+
const temporal = query.temporalFilter ? temporalFilterToExpression(query.temporalFilter, ctx) : undefined;
|
|
498
|
+
if (query.temporalFilter && temporal === undefined) {
|
|
499
|
+
throw new HonuaCapabilityNotSupportedError("temporalFilter.field", "geoparquet");
|
|
500
|
+
}
|
|
501
|
+
const expression = andQueryFilters(query.filter, temporal);
|
|
502
|
+
if (!expression)
|
|
503
|
+
return { bboxApproximated: false };
|
|
504
|
+
const compiled = compileQueryFilterToDuckDbSql(expression, ctx, (node) => {
|
|
505
|
+
const geometry = options.geometry;
|
|
506
|
+
if (!geometry) {
|
|
507
|
+
throw new HonuaCapabilityNotSupportedError("filter.spatial.geometry-column", "geoparquet");
|
|
508
|
+
}
|
|
509
|
+
const spatialFilter = {
|
|
510
|
+
geometry: node.geometry.geometry,
|
|
511
|
+
geometryType: node.geometry.geometryType,
|
|
512
|
+
};
|
|
513
|
+
const bbox = bboxFromSpatialFilter(spatialFilter);
|
|
514
|
+
if (!bbox) {
|
|
515
|
+
throw new HonuaCapabilityNotSupportedError("filter.spatial.geometry", "geoparquet");
|
|
516
|
+
}
|
|
517
|
+
if (node.operator !== "intersects" && node.operator !== "bbox-intersects") {
|
|
518
|
+
// A bbox predicate cannot preserve within / contains / crosses semantics.
|
|
519
|
+
throw new HonuaCapabilityNotSupportedError(`filter.spatial.${node.operator}`, "geoparquet");
|
|
520
|
+
}
|
|
521
|
+
return { sql: spatialPredicate(bbox, geometry), bboxApproximated: !isEnvelopeFilter(spatialFilter) };
|
|
522
|
+
});
|
|
523
|
+
return { sql: compiled.sql, bboxApproximated: compiled.bboxApproximated };
|
|
524
|
+
}
|
|
214
525
|
function orderByClause(orderBy) {
|
|
215
526
|
if (!orderBy || orderBy.length === 0)
|
|
216
527
|
return "";
|
|
@@ -286,7 +597,10 @@ export function compileQuery(query, options) {
|
|
|
286
597
|
bboxApproximated = !isEnvelopeFilter(query.spatialFilter);
|
|
287
598
|
}
|
|
288
599
|
}
|
|
289
|
-
const
|
|
600
|
+
const typed = typedFilterSql(query, options);
|
|
601
|
+
if (typed.bboxApproximated)
|
|
602
|
+
bboxApproximated = true;
|
|
603
|
+
const sql = `SELECT ${projection(query, options)} FROM ${from}${whereClause(query, spatial, typed.sql)}${orderByClause(query.orderBy)}${limitOffsetClause(query)}`;
|
|
290
604
|
return { sql, bboxApproximated };
|
|
291
605
|
}
|
|
292
606
|
function aggregateFn(fn, field) {
|
|
@@ -336,8 +650,11 @@ export function compileAggregate(query, options) {
|
|
|
336
650
|
bboxApproximated = !isEnvelopeFilter(query.spatialFilter);
|
|
337
651
|
}
|
|
338
652
|
}
|
|
653
|
+
const typed = typedFilterSql(query, options);
|
|
654
|
+
if (typed.bboxApproximated)
|
|
655
|
+
bboxApproximated = true;
|
|
339
656
|
const groupByClause = groupBy.length > 0 ? ` GROUP BY ${groupBy.map((f) => quoteIdentifier(f)).join(", ")}` : "";
|
|
340
|
-
const sql = `SELECT ${selectParts.join(", ")} FROM ${from}${whereClause(query, spatial)}${groupByClause}${orderByClause(query.orderBy)}${limitOffsetClause(query)}`;
|
|
657
|
+
const sql = `SELECT ${selectParts.join(", ")} FROM ${from}${whereClause(query, spatial, typed.sql)}${groupByClause}${orderByClause(query.orderBy)}${limitOffsetClause(query)}`;
|
|
341
658
|
return { sql, bboxApproximated };
|
|
342
659
|
}
|
|
343
660
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odata-write-codec.d.ts","sourceRoot":"","sources":["../../../src/core/odata-write-codec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,YAAY,CAAC;AAwCpB,0EAA0E;AAC1E,MAAM,MAAM,8BAA8B,GACtC,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,yBAAyB,GACzB,oBAAoB,GACpB,kBAAkB,CAAC;AAEvB;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,SAAS;IACvD,SAAgB,IAAI,EAAE,8BAA8B,CAAC;IACrD,SAAgB,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,MAAM;CAMtE;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,mDAAmD;AACnD,MAAM,WAAW,kCAAmC,SAAQ,4BAA4B;IACtF;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,uEAAuE;AACvE,MAAM,WAAW,0BAA0B;IACzC,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,4EAA4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DAAmD;AACnD,MAAM,WAAW,kCAAmC,SAAQ,4BAA4B;IACtF;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,uEAAuE;AACvE,MAAM,WAAW,0BAA0B;IACzC,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;CAC7C;AAED,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAkBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,EAC5B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACvC,OAAO,GAAE,4BAAiC,GACzC,0BAA0B,CAS5B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,EAC5B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,kCAAuC,GAC/C,0BAA0B,CAwC5B"}
|
|
@@ -79,7 +79,6 @@ export function encodeOdataWriteBody(metadata, entitySet, body, options = {}) {
|
|
|
79
79
|
*/
|
|
80
80
|
export function encodeOdataEntityKey(metadata, entitySet, key, options = {}) {
|
|
81
81
|
try {
|
|
82
|
-
const context = encodingContext(options);
|
|
83
82
|
const model = codecModel(metadata, entitySet);
|
|
84
83
|
const configuredKeyFields = dataProperty(options, "keyFields", ["options", "keyFields"], "invalid-options");
|
|
85
84
|
const keys = configuredKeyFields === undefined
|
package/core/odata.d.ts
CHANGED
|
@@ -395,5 +395,11 @@ export declare function buildOdataSpatialFilter(spatialFilter: {
|
|
|
395
395
|
spatialRel?: string;
|
|
396
396
|
distance?: number;
|
|
397
397
|
}, context?: OdataSpatialFilterContext): string;
|
|
398
|
+
/**
|
|
399
|
+
* Serialize a canonical (Esri-shaped) geometry as WKT. Shared with the
|
|
400
|
+
* canonical CQL2 filter compiler so both wire dialects emit identical geometry
|
|
401
|
+
* text from the same geometry value.
|
|
402
|
+
*/
|
|
403
|
+
export declare function geometryToWkt(geometry: Record<string, unknown>, geometryType: string): string;
|
|
398
404
|
export {};
|
|
399
405
|
//# sourceMappingURL=odata.d.ts.map
|
package/core/odata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../../src/core/odata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,2BAA2B,EAQjC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,WAAW,CAAC;IACpB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID;;;;;GAKG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3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AwJlE;AAqHD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,cAAc,EAAE,CAM3G;AAyOD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAqC/D;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,yBAAyB;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACpD,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED,wBAAgB,uBAAuB,CACrC,aAAa,EAAE;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,EACD,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAsBR;AAkED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAgC7F"}
|
package/core/odata.js
CHANGED
|
@@ -1210,7 +1210,12 @@ function wktCoordinate(value, context) {
|
|
|
1210
1210
|
function wktPoint(pt, context) {
|
|
1211
1211
|
return `${wktCoordinate(pt[0], `${context}[0]`)} ${wktCoordinate(pt[1], `${context}[1]`)}`;
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1213
|
+
/**
|
|
1214
|
+
* Serialize a canonical (Esri-shaped) geometry as WKT. Shared with the
|
|
1215
|
+
* canonical CQL2 filter compiler so both wire dialects emit identical geometry
|
|
1216
|
+
* text from the same geometry value.
|
|
1217
|
+
*/
|
|
1218
|
+
export function geometryToWkt(geometry, geometryType) {
|
|
1214
1219
|
if (geometryType === "esriGeometryEnvelope") {
|
|
1215
1220
|
const xmin = wktCoordinate(geometry.xmin, "envelope.xmin");
|
|
1216
1221
|
const ymin = wktCoordinate(geometry.ymin, "envelope.ymin");
|