Creates a new FlightSqlClient.
Either FlightClientOptions to create a new FlightClient, or an existing FlightClient instance to wrap.
Whether the client has been closed.
The underlying Flight client. Use this for advanced Flight operations not covered by Flight SQL.
The base URL of the Flight server.
Authenticate with the server using configured credentials.
Close the client and release resources.
Close a prepared statement and release server resources.
Prepared statement to close
Execute a prepared query statement and return results as a Table.
Prepared statement from prepare()
Arrow Table containing query results
Execute a prepared query statement and return results as a stream.
Prepared statement from prepare()
Execute a prepared update statement and return affected row count.
Prepared statement from prepare()
Optionalparameters: AsyncIterable<RecordBatch<any>, any, any> | Iterable<RecordBatch<any>, any, any>Optional parameter values as RecordBatches
Update result with affected row count
Execute a SQL update statement (INSERT, UPDATE, DELETE, DDL).
SQL update statement
Optionaloptions: ExecuteUpdateOptionsUpdate execution options
Update result with affected row count
Get the list of catalogs in the database.
Arrow Table with catalog_name column
Get the list of database schemas.
Optionaloptions: { catalog?: string; dbSchemaFilterPattern?: string }Filter options
Optionalcatalog?: stringFilter by catalog name
OptionaldbSchemaFilterPattern?: stringFilter pattern for schema names (supports % and _ wildcards)
Arrow Table with catalog_name and db_schema_name columns
Get the primary keys for a table.
Table name (required)
Optionaloptions: { catalog?: string; dbSchema?: string }Additional filter options
Optionalcatalog?: stringCatalog containing the table
OptionaldbSchema?: stringSchema containing the table
Arrow Table with catalog_name, db_schema_name, table_name, column_name, key_name, key_sequence columns
Get FlightInfo for a SQL query without executing it.
Use this to inspect the query plan, schema, or endpoints before fetching data.
SQL query string
Optionaloptions: ExecuteQueryOptionsQuery execution options
FlightInfo describing the query results
Get the list of tables.
Optionaloptions: {Filter options
Optionalcatalog?: stringFilter by catalog name
OptionaldbSchemaFilterPattern?: stringFilter pattern for schema names (supports % and _ wildcards)
OptionalincludeSchema?: booleanInclude table schema in results
OptionaltableNameFilterPattern?: stringFilter pattern for table names (supports % and _ wildcards)
OptionaltableTypes?: string[]Filter by table types (e.g., "TABLE", "VIEW")
Arrow Table with catalog_name, db_schema_name, table_name, table_type columns
Get the list of table types supported by the server.
Arrow Table with table_type column
Prepare a SQL statement for repeated execution.
SQL query with optional parameter placeholders
OptionaltransactionId: Uint8Array<ArrayBufferLike>Optional transaction to associate with the statement
Prepared statement handle
Execute a SQL query and return results as an Arrow Table.
This is a convenience method that combines getFlightInfo and doGet to fetch all query results into memory.
SQL query string
Optionaloptions: ExecuteQueryOptionsQuery execution options
Arrow Table containing query results
Execute a SQL query and return results as a stream of RecordBatches.
Use this for large result sets to avoid loading all data into memory.
SQL query string
Optionaloptions: ExecuteQueryOptionsQuery execution options
Execute a SQL query and return the raw FlightData stream.
This is the lowest-level query method, useful when you need access to raw Flight data or custom decoding.
SQL query string
Optionaloptions: ExecuteQueryOptionsQuery execution options
Roll back a transaction.
Transaction to roll back
Arrow Flight SQL client for executing SQL queries and managing transactions.
FlightSqlClient wraps FlightClient using composition, providing Flight SQL specific operations while delegating core Flight RPC to the underlying client.
Example