public class FlightSqlClient extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
FlightSqlClient.PreparedStatement
Helper class to encapsulate Flight SQL prepared statement logic.
|
| Constructor and Description |
|---|
FlightSqlClient(FlightClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
FlightInfo |
execute(String query,
CallOption... options)
Execute a query on the server.
|
long |
executeUpdate(String query,
CallOption... options)
Execute an update query on the server.
|
FlightInfo |
getCatalogs(CallOption... options)
Request a list of catalogs.
|
FlightInfo |
getCrossReference(TableRef pkTableRef,
TableRef fkTableRef,
CallOption... options)
Retrieves a description of the foreign key columns that reference the given table's
primary key columns (the foreign keys exported by a table).
|
FlightInfo |
getExportedKeys(TableRef tableRef,
CallOption... options)
Retrieves a description about the foreign key columns that reference the primary key columns of the given table.
|
FlightInfo |
getImportedKeys(TableRef tableRef,
CallOption... options)
Retrieves the foreign key columns for the given table.
|
FlightInfo |
getPrimaryKeys(TableRef tableRef,
CallOption... options)
Request the primary keys for a table.
|
SchemaResult |
getSchema(FlightDescriptor descriptor,
CallOption... options)
Get schema for a stream.
|
FlightInfo |
getSchemas(String catalog,
String dbSchemaFilterPattern,
CallOption... options)
Request a list of schemas.
|
FlightInfo |
getSqlInfo(FlightSql.SqlInfo... info)
Request a set of Flight SQL metadata.
|
FlightInfo |
getSqlInfo(FlightSql.SqlInfo[] info,
CallOption... options)
Request a set of Flight SQL metadata.
|
FlightInfo |
getSqlInfo(int[] info,
CallOption... options)
Request a set of Flight SQL metadata.
|
FlightInfo |
getSqlInfo(Iterable<Integer> info,
CallOption... options)
Request a set of Flight SQL metadata.
|
FlightStream |
getStream(Ticket ticket,
CallOption... options)
Retrieve a stream from the server.
|
FlightInfo |
getTables(String catalog,
String dbSchemaFilterPattern,
String tableFilterPattern,
List<String> tableTypes,
boolean includeSchema,
CallOption... options)
Request a list of tables.
|
FlightInfo |
getTableTypes(CallOption... options)
Request a list of table types.
|
FlightInfo |
getXdbcTypeInfo(CallOption... options)
Request the information about all the data types supported.
|
FlightInfo |
getXdbcTypeInfo(int dataType,
CallOption... options)
Request the information about the data types supported related to
a filter data type.
|
FlightSqlClient.PreparedStatement |
prepare(String query,
CallOption... options)
Create a prepared statement on the server.
|
public FlightSqlClient(FlightClient client)
public FlightInfo execute(String query, CallOption... options)
query - The query to execute.options - RPC-layer hints for this call.public long executeUpdate(String query, CallOption... options)
query - The query to execute.options - RPC-layer hints for this call.public FlightInfo getCatalogs(CallOption... options)
options - RPC-layer hints for this call.public FlightInfo getSchemas(String catalog, String dbSchemaFilterPattern, CallOption... options)
catalog - The catalog.dbSchemaFilterPattern - The schema filter pattern.options - RPC-layer hints for this call.public SchemaResult getSchema(FlightDescriptor descriptor, CallOption... options)
descriptor - The descriptor for the stream.options - RPC-layer hints for this call.public FlightStream getStream(Ticket ticket, CallOption... options)
ticket - The ticket granting access to the data stream.options - RPC-layer hints for this call.public FlightInfo getSqlInfo(FlightSql.SqlInfo... info)
info - The set of metadata to retrieve. None to retrieve all metadata.public FlightInfo getSqlInfo(FlightSql.SqlInfo[] info, CallOption... options)
info - The set of metadata to retrieve. None to retrieve all metadata.options - RPC-layer hints for this call.public FlightInfo getSqlInfo(int[] info, CallOption... options)
info - The set of metadata to retrieve. None to retrieve all metadata.options - RPC-layer hints for this call.public FlightInfo getSqlInfo(Iterable<Integer> info, CallOption... options)
info - The set of metadata to retrieve. None to retrieve all metadata.options - RPC-layer hints for this call.public FlightInfo getXdbcTypeInfo(int dataType, CallOption... options)
dataType - the data type to be used as filter.options - RPC-layer hints for this call.public FlightInfo getXdbcTypeInfo(CallOption... options)
options - RPC-layer hints for this call.public FlightInfo getTables(String catalog, String dbSchemaFilterPattern, String tableFilterPattern, List<String> tableTypes, boolean includeSchema, CallOption... options)
catalog - The catalog.dbSchemaFilterPattern - The schema filter pattern.tableFilterPattern - The table filter pattern.tableTypes - The table types to include.includeSchema - True to include the schema upon return, false to not include the schema.options - RPC-layer hints for this call.public FlightInfo getPrimaryKeys(TableRef tableRef, CallOption... options)
tableRef - An object which hold info about catalog, dbSchema and table.options - RPC-layer hints for this call.public FlightInfo getExportedKeys(TableRef tableRef, CallOption... options)
tableRef - An object which hold info about catalog, dbSchema and table.options - RPC-layer hints for this call.public FlightInfo getImportedKeys(TableRef tableRef, CallOption... options)
tableRef - An object which hold info about catalog, dbSchema and table.options - RPC-layer hints for this call.public FlightInfo getCrossReference(TableRef pkTableRef, TableRef fkTableRef, CallOption... options)
pkTableRef - An object which hold info about catalog, dbSchema and table from a primary table.fkTableRef - An object which hold info about catalog, dbSchema and table from a foreign table.options - RPC-layer hints for this call.public FlightInfo getTableTypes(CallOption... options)
options - RPC-layer hints for this call.public FlightSqlClient.PreparedStatement prepare(String query, CallOption... options)
query - The query to prepare.options - RPC-layer hints for this call.public void close()
throws SQLException
close in interface AutoCloseableSQLExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.