public final class ArrowFlightSqlClientHandler extends Object implements AutoCloseable
FlightSqlClient
handler.Modifier and Type | Class and Description |
---|---|
static class |
ArrowFlightSqlClientHandler.Builder
Builder for
ArrowFlightSqlClientHandler . |
static interface |
ArrowFlightSqlClientHandler.PreparedStatement
A prepared statement handler.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static ArrowFlightSqlClientHandler |
createNewHandler(FlightClient client,
Collection<CallOption> options)
|
FlightInfo |
getCatalogs()
Makes an RPC "getCatalogs" request.
|
FlightInfo |
getCrossReference(String pkCatalog,
String pkSchema,
String pkTable,
String fkCatalog,
String fkSchema,
String fkTable)
Makes an RPC "getCrossReference" request based on the provided info.
|
FlightInfo |
getExportedKeys(String catalog,
String schema,
String table)
Makes an RPC "getExportedKeys" request based on the provided info.
|
FlightInfo |
getImportedKeys(String catalog,
String schema,
String table)
Makes an RPC "getImportedKeys" request based on the provided info.
|
FlightInfo |
getInfo(String query)
Makes an RPC "getInfo" request based on the provided
query
object. |
FlightInfo |
getPrimaryKeys(String catalog,
String schema,
String table)
Makes an RPC "getPrimaryKeys" request based on the provided info.
|
FlightInfo |
getSchemas(String catalog,
String schemaPattern)
Makes an RPC "getSchemas" request based on the provided info.
|
FlightInfo |
getSqlInfo(FlightSql.SqlInfo... info)
Gets SQL info.
|
List<FlightStream> |
getStreams(FlightInfo flightInfo)
Makes an RPC "getStream" request based on the provided
FlightInfo
object. |
FlightInfo |
getTables(String catalog,
String schemaPattern,
String tableNamePattern,
List<String> types,
boolean includeSchema)
Makes an RPC "getTables" request based on the provided info.
|
FlightInfo |
getTableTypes()
Makes an RPC "getTableTypes" request.
|
ArrowFlightSqlClientHandler.PreparedStatement |
prepare(String query)
Creates a new
ArrowFlightSqlClientHandler.PreparedStatement for the given query . |
public static ArrowFlightSqlClientHandler createNewHandler(FlightClient client, Collection<CallOption> options)
client
- the FlightClient
to manage under a FlightSqlClient
wrapper.options
- the CallOption
s to persist in between subsequent client calls.ArrowFlightSqlClientHandler
.public List<FlightStream> getStreams(FlightInfo flightInfo)
FlightInfo
object. Retrieves the result of the query previously prepared with "getInfo."flightInfo
- The FlightInfo
instance from which to fetch results.FlightStream
of results.public FlightInfo getInfo(String query)
query
object.query
- The query.FlightStream
of results.public void close() throws SQLException
close
in interface AutoCloseable
SQLException
public ArrowFlightSqlClientHandler.PreparedStatement prepare(String query)
ArrowFlightSqlClientHandler.PreparedStatement
for the given query
.query
- the SQL query.public FlightInfo getCatalogs()
FlightStream
of results.public FlightInfo getImportedKeys(String catalog, String schema, String table)
catalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.schema
- The schema name. Must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to narrow
the search.table
- The table name. Must match the table name as it is stored in the database.FlightStream
of results.public FlightInfo getExportedKeys(String catalog, String schema, String table)
catalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.schema
- The schema name. Must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to narrow
the search.table
- The table name. Must match the table name as it is stored in the database.FlightStream
of results.public FlightInfo getSchemas(String catalog, String schemaPattern)
catalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.schemaPattern
- The schema name pattern. Must match the schema name as it is stored in the database.
Null means that schema name should not be used to narrow down the search.FlightStream
of results.public FlightInfo getTableTypes()
FlightStream
of results.public FlightInfo getTables(String catalog, String schemaPattern, String tableNamePattern, List<String> types, boolean includeSchema)
catalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.schemaPattern
- The schema name pattern. Must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to
narrow the search.tableNamePattern
- The table name pattern. Must match the table name as it is stored in the database.types
- The list of table types, which must be from the list of table types to include.
Null returns all types.includeSchema
- Whether to include schema.FlightStream
of results.public FlightInfo getSqlInfo(FlightSql.SqlInfo... info)
public FlightInfo getPrimaryKeys(String catalog, String schema, String table)
catalog
- The catalog name; must match the catalog name as it is stored in the database.
"" retrieves those without a catalog.
Null means that the catalog name should not be used to narrow the search.schema
- The schema name; must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to narrow
the search.table
- The table name. Must match the table name as it is stored in the database.FlightStream
of results.public FlightInfo getCrossReference(String pkCatalog, String pkSchema, String pkTable, String fkCatalog, String fkSchema, String fkTable)
pkCatalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.pkSchema
- The schema name. Must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to narrow
the search.pkTable
- The table name. Must match the table name as it is stored in the database.fkCatalog
- The catalog name. Must match the catalog name as it is stored in the database.
Retrieves those without a catalog. Null means that the catalog name should not be used to
narrow the search.fkSchema
- The schema name. Must match the schema name as it is stored in the database.
"" retrieves those without a schema. Null means that the schema name should not be used to narrow
the search.fkTable
- The table name. Must match the table name as it is stored in the database.FlightStream
of results.Copyright © 2023 The Apache Software Foundation. All rights reserved.