dlt.destinations.impl.lancedb.pyflightsql
A PEP 249 interface over Arrow Flight SQL, implemented with pyarrow alone.
Flight SQL is a protobuf protocol layered on Arrow Flight. pyarrow ships the Flight transport but
none of the Flight SQL messages, and running queries needs exactly one of them:
CommandStatementQuery wrapped in google.protobuf.Any. Both are single length-delimited fields,
encoded here directly so that neither a protobuf runtime nor a native driver becomes a dependency.
Servers that implement only the query surface of Flight SQL are supported: prepared statements are not used (parameters are escaped into the query) and transactions are no-ops.
statement_query_command
def statement_query_command(query: str) -> bytes
Encodes query as a Flight SQL CommandStatementQuery inside a google.protobuf.Any.
interpolate_parameters
def interpolate_parameters(query: str,
parameters: Optional[Sequence[Any]]) -> str
Escapes parameters into query.