pub struct GetTablesBuilder {
catalog_filter: Option<String>,
table_types_filter: Vec<String>,
db_schema_filter_pattern: Option<String>,
table_name_filter_pattern: Option<String>,
catalog_name: StringBuilder,
db_schema_name: StringBuilder,
table_name: StringBuilder,
table_type: StringBuilder,
table_schema: Option<BinaryBuilder>,
}
Expand description
A builder for a CommandGetTables
response.
Builds rows like this:
- 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§
§catalog_filter: Option<String>
§table_types_filter: Vec<String>
§db_schema_filter_pattern: Option<String>
§table_name_filter_pattern: Option<String>
§catalog_name: StringBuilder
§db_schema_name: StringBuilder
§table_name: StringBuilder
§table_type: StringBuilder
§table_schema: Option<BinaryBuilder>
Implementations§
Source§impl GetTablesBuilder
impl GetTablesBuilder
Sourcepub fn new(
catalog: Option<impl Into<String>>,
db_schema_filter_pattern: Option<impl Into<String>>,
table_name_filter_pattern: Option<impl Into<String>>,
table_types: impl IntoIterator<Item = impl Into<String>>,
include_schema: bool,
) -> Self
pub fn new( catalog: Option<impl Into<String>>, db_schema_filter_pattern: Option<impl Into<String>>, table_name_filter_pattern: Option<impl Into<String>>, table_types: impl IntoIterator<Item = impl Into<String>>, include_schema: bool, ) -> Self
Create a new instance of GetTablesBuilder
§Parameters
catalog
: Specifies the Catalog to search for the tables.- An empty string retrieves those without a catalog.
- If omitted the catalog name is not used to narrow the search.
db_schema_filter_pattern
: Specifies a filter pattern for schemas to search for. When no pattern is provided, the pattern will not be used to narrow the search. 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
: Specifies a filter pattern for tables to search for. When no 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
: Specifies a filter of table types which must match. An empy Vec matches all table types.include_schema
: Specifies if the Arrow schema should be returned for found tables.
Sourcepub fn append(
&mut self,
catalog_name: impl AsRef<str>,
schema_name: impl AsRef<str>,
table_name: impl AsRef<str>,
table_type: impl AsRef<str>,
table_schema: &Schema,
) -> Result<()>
pub fn append( &mut self, catalog_name: impl AsRef<str>, schema_name: impl AsRef<str>, table_name: impl AsRef<str>, table_type: impl AsRef<str>, table_schema: &Schema, ) -> Result<()>
Append a row
Sourcepub fn schema(&self) -> SchemaRef
pub fn schema(&self) -> SchemaRef
Return the schema of the RecordBatch that will be returned from CommandGetTables
Note the schema differs based on the values of `include_schema
Sourcepub fn include_schema(&self) -> bool
pub fn include_schema(&self) -> bool
Should the “schema” column be included
Trait Implementations§
Source§impl From<CommandGetTables> for GetTablesBuilder
impl From<CommandGetTables> for GetTablesBuilder
Source§fn from(value: CommandGetTables) -> Self
fn from(value: CommandGetTables) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GetTablesBuilder
impl RefUnwindSafe for GetTablesBuilder
impl Send for GetTablesBuilder
impl Sync for GetTablesBuilder
impl Unpin for GetTablesBuilder
impl UnwindSafe for GetTablesBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request