mirror of
https://github.com/lancedb/lancedb.git
synced 2026-09-11 15:52:17 +00:00
An embedder can extend the SQL dialect with its own statements, but has had nowhere to say what a statement *is*: its grammar, the label it reports to an audit log, and the access it needs are three separate facts, and describing them separately means a host ends up with parallel downcast chains that must be kept in step by hand. Adding a statement to only two of the three is a silent gap rather than a compile error. `lancedb::sql` gains the seam that keeps them together: - `CustomSqlHandler` contributes a grammar; `route_custom_sql` picks the one that owns a statement and leaves the rest to DataFusion. - `SqlStatement` pairs a planned node with its audit label and the `AccessRequirement`s it needs. The vocabulary names what is reached for -- read, write, own, create, database, namespace, system -- rather than a privilege, so no access-control model has to live in the dialect. - `StatementRegistry` holds both, with the consultation order it is given. Registration is front-insertion so an extension can get ahead of a catch-all that would otherwise swallow its keyword. - `WriteObserver` reports a committed write without the statement knowing how its host represents that. - `DmlResult` carries what a DML statement did as a one-row batch. The feature adds no dependency that is not already required, so it is on by default; the flag is there so an embedder that does not want the surface can opt out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53 lines
1.5 KiB
TOML
53 lines
1.5 KiB
TOML
[package]
|
|
name = "lancedb-python"
|
|
version = "0.39.0-beta.6"
|
|
publish = false
|
|
edition.workspace = true
|
|
description = "Python bindings for LanceDB"
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
categories.workspace = true
|
|
rust-version = "1.91.0"
|
|
|
|
[lib]
|
|
name = "_lancedb"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
arrow = { workspace = true, features = ["pyarrow"] }
|
|
async-trait.workspace = true
|
|
bytes.workspace = true
|
|
lancedb.workspace = true
|
|
datafusion-common.workspace = true
|
|
lance-core.workspace = true
|
|
lance-namespace.workspace = true
|
|
lance-namespace-impls.workspace = true
|
|
lance-io.workspace = true
|
|
env_logger.workspace = true
|
|
log.workspace = true
|
|
# Maturin enables extension-module mode for Python builds. Keeping it out of
|
|
# Cargo features lets Rust unit tests link against libpython.
|
|
pyo3 = { version = "0.28", features = ["abi3-py310", "chrono", "uuid"] }
|
|
chrono.workspace = true
|
|
pyo3-async-runtimes = { version = "0.28", features = [
|
|
"attributes",
|
|
"tokio-runtime",
|
|
] }
|
|
pin-project.workspace = true
|
|
futures.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
snafu.workspace = true
|
|
tokio.workspace = true
|
|
uuid.workspace = true
|
|
libc = "0.2"
|
|
|
|
[build-dependencies]
|
|
pyo3-build-config = { version = "0.28", features = ["abi3-py310"] }
|
|
|
|
[features]
|
|
default = ["remote", "lancedb/sql", "lancedb/aws", "lancedb/gcs", "lancedb/azure", "lancedb/dynamodb", "lancedb/oss", "lancedb/huggingface", "lancedb/cos", "lancedb/goosefs", "lancedb/metrics-otel"]
|
|
fp16kernels = ["lancedb/fp16kernels"]
|
|
remote = ["lancedb/remote"]
|