pub struct CommandGetTables {
    pub catalog: Option<String>,
    pub db_schema_filter_pattern: Option<String>,
    pub table_name_filter_pattern: Option<String>,
    pub table_types: Vec<String>,
    pub include_schema: bool,
}
Expand description

Represents a request to retrieve the list of tables, and optionally their schemas, on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:

  • GetSchema: return the Arrow schema of the query.
  • GetFlightInfo: execute the catalog metadata request.

The returned Arrow schema will be: < catalog_name: utf8, db_schema_name: utf8, table_name: utf8 not null, table_type: utf8 not null, [optional] table_schema: bytes not null (schema of the table as described in Schema.fbs::Schema, it is serialized as an IPC message.) > Fields on table_schema may contain the following metadata:

  • ARROW:FLIGHT:SQL:CATALOG_NAME - Table’s catalog name
  • ARROW:FLIGHT:SQL:DB_SCHEMA_NAME - Database schema name
  • ARROW:FLIGHT:SQL:TABLE_NAME - Table name
  • ARROW:FLIGHT:SQL:TYPE_NAME - The data source-specific name for the data type of the column.
  • ARROW:FLIGHT:SQL:PRECISION - Column precision/size
  • ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable
  • ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - “1” indicates if the column is auto incremented, “0” otherwise.
  • ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - “1” indicates if the column is case sensitive, “0” otherwise.
  • ARROW:FLIGHT:SQL:IS_READ_ONLY - “1” indicates if the column is read only, “0” otherwise.
  • ARROW:FLIGHT:SQL:IS_SEARCHABLE - “1” indicates if the column is searchable via WHERE clause, “0” otherwise. The returned data should be ordered by catalog_name, db_schema_name, table_name, then table_type, followed by table_schema if requested.

Fields§

§catalog: Option<String>

Specifies the Catalog to search for the tables. An empty string retrieves those without a catalog. If omitted the catalog name should not be used to narrow the search.

§db_schema_filter_pattern: Option<String>

Specifies a filter pattern for schemas to search for. When no db_schema_filter_pattern is provided, all schemas matching other filters are searched. In the pattern string, two special characters can be used to denote matching rules: - “%” means to match any substring with 0 or more characters. - “_” means to match any one character.

§table_name_filter_pattern: Option<String>

Specifies a filter pattern for tables to search for. When no table_name_filter_pattern is provided, all tables matching other filters are searched. In the pattern string, two special characters can be used to denote matching rules: - “%” means to match any substring with 0 or more characters. - “_” means to match any one character.

§table_types: Vec<String>

Specifies a filter of table types which must match. The table types depend on vendor/implementation. It is usually used to separate tables from views or system tables. TABLE, VIEW, and SYSTEM TABLE are commonly supported.

§include_schema: bool

Specifies if the Arrow schema should be returned for found tables.

Implementations§

Returns the value of catalog, or the default value if catalog is unset.

Returns the value of db_schema_filter_pattern, or the default value if db_schema_filter_pattern is unset.

Returns the value of table_name_filter_pattern, or the default value if table_name_filter_pattern is unset.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Returns the encoded length of the message without a length delimiter.
Clears the message, resetting all fields to their default.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self. Read more
Decodes a length-delimited instance of the message from buffer, and merges it into self.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
type_url for this Message
Convert this Message to Any

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Converts to this type from a reference to the input type.
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more