Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions napi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ serde_json = "1"
# Version kept in lock-step with the kernel's `chrono` dep.
chrono = { version = "0.4", default-features = false, features = ["clock"] }

[dev-dependencies]
wiremock = "0.6"

[build-dependencies]
napi-build = "2" # napi-build stays on 2.x; napi-rs 3 build script is compatible

Expand Down
4 changes: 4 additions & 0 deletions napi/NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ layout, or npm publishing. Pure-kernel changes go in the root

### Added

- Added `ExecuteOptions.rawParams`, allowing Node.js callers to preserve
pre-marshalled SQL type names such as `INTERVAL MONTH` and `INTERVAL DAY`
instead of collapsing them through `TypedValue::Interval`.

### Changed

### Updated
Expand Down
19 changes: 19 additions & 0 deletions napi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* `rowLimit` (SEA `row_limit`) is exposed here and threaded onto the kernel
* `StatementSpec`. `positionalParams` (`?`) and `namedParams` (`:name`)
* carry bound query parameters, decoded via `params::parse_typed_value`.
* `rawParams` forwards pre-marshalled SEA parameters unchanged.
* (There is no `queryTimeoutSecs`: it abused the SEA `wait_timeout` inline-hold
* window and was removed — a real per-statement timeout is `STATEMENT_TIMEOUT`.)
*
Expand Down Expand Up @@ -85,6 +86,12 @@ export interface ExecuteOptions {
* mutually exclusive at the SQL level (`?` vs `:name`).
*/
namedParams?: Array<NamedTypedValueInput>
/**
* Pre-marshalled parameters passed through `StatementSpec::param_raw`.
* Omit `name` for positional values. Raw parameters cannot be mixed with
* typed parameters or combine named and positional markers.
*/
rawParams?: Array<RawParameterInput>
}
/**
* A named bound parameter — a [`TypedValueInput`] plus its `:name`. Kept a
Expand Down Expand Up @@ -675,6 +682,18 @@ export interface TypedValueInput {
*/
value?: string
}
/**
* A pre-marshalled SEA parameter that preserves `sql_type` verbatim.
* Omit `name` for positional markers; the kernel assigns their ordinals.
*/
export interface RawParameterInput {
/** Named marker name. Omit for a positional marker. */
name?: string
/** Databricks SQL type name sent verbatim to SEA. */
sqlType: string
/** String-encoded value. `None` represents SQL NULL. */
value?: string
}
/**
* A single Arrow IPC stream payload encoding one record batch (plus
* the schema header so the JS-side reader is stateless).
Expand Down
Loading
Loading