#[non_exhaustive]pub struct Table {Show 24 fields
pub name: String,
pub database_name: Option<String>,
pub description: Option<String>,
pub owner: Option<String>,
pub create_time: Option<DateTime>,
pub update_time: Option<DateTime>,
pub last_access_time: Option<DateTime>,
pub last_analyzed_time: Option<DateTime>,
pub retention: i32,
pub storage_descriptor: Option<StorageDescriptor>,
pub partition_keys: Option<Vec<Column>>,
pub view_original_text: Option<String>,
pub view_expanded_text: Option<String>,
pub table_type: Option<String>,
pub parameters: Option<HashMap<String, String>>,
pub created_by: Option<String>,
pub is_registered_with_lake_formation: bool,
pub target_table: Option<TableIdentifier>,
pub catalog_id: Option<String>,
pub version_id: Option<String>,
pub federated_table: Option<FederatedTable>,
pub view_definition: Option<ViewDefinition>,
pub is_multi_dialect_view: Option<bool>,
pub status: Option<TableStatus>,
}
Expand description
Represents a collection of related data organized in columns and rows.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The table name. For Hive compatibility, this must be entirely lowercase.
database_name: Option<String>
The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.
description: Option<String>
A description of the table.
owner: Option<String>
The owner of the table.
create_time: Option<DateTime>
The time when the table definition was created in the Data Catalog.
update_time: Option<DateTime>
The last time that the table was updated.
last_access_time: Option<DateTime>
The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
last_analyzed_time: Option<DateTime>
The last time that column statistics were computed for this table.
retention: i32
The retention time for this table.
storage_descriptor: Option<StorageDescriptor>
A storage descriptor containing information about the physical storage of this table.
partition_keys: Option<Vec<Column>>
A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you must at least set the value of partitionKeys
to an empty list. For example:
"PartitionKeys": \[\]
view_original_text: Option<String>
Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a VIRTUAL_VIEW
, certain Athena configuration encoded in base64.
view_expanded_text: Option<String>
Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
table_type: Option<String>
The type of this table. Glue will create tables with the EXTERNAL_TABLE
type. Other services, such as Athena, may create tables with additional table types.
Glue related table types:
- EXTERNAL_TABLE
-
Hive compatible attribute - indicates a non-Hive managed table.
- GOVERNED
-
Used by Lake Formation. The Glue Data Catalog understands
GOVERNED
.
parameters: Option<HashMap<String, String>>
These key-value pairs define properties associated with the table.
created_by: Option<String>
The person or entity who created the table.
is_registered_with_lake_formation: bool
Indicates whether the table has been registered with Lake Formation.
target_table: Option<TableIdentifier>
A TableIdentifier
structure that describes a target table for resource linking.
catalog_id: Option<String>
The ID of the Data Catalog in which the table resides.
version_id: Option<String>
The ID of the table version.
federated_table: Option<FederatedTable>
A FederatedTable
structure that references an entity outside the Glue Data Catalog.
view_definition: Option<ViewDefinition>
A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
is_multi_dialect_view: Option<bool>
Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.
status: Option<TableStatus>
A structure containing information about the state of an asynchronous change to a table.
Implementations§
source§impl Table
impl Table
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The table name. For Hive compatibility, this must be entirely lowercase.
sourcepub fn database_name(&self) -> Option<&str>
pub fn database_name(&self) -> Option<&str>
The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description of the table.
sourcepub fn create_time(&self) -> Option<&DateTime>
pub fn create_time(&self) -> Option<&DateTime>
The time when the table definition was created in the Data Catalog.
sourcepub fn update_time(&self) -> Option<&DateTime>
pub fn update_time(&self) -> Option<&DateTime>
The last time that the table was updated.
sourcepub fn last_access_time(&self) -> Option<&DateTime>
pub fn last_access_time(&self) -> Option<&DateTime>
The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
sourcepub fn last_analyzed_time(&self) -> Option<&DateTime>
pub fn last_analyzed_time(&self) -> Option<&DateTime>
The last time that column statistics were computed for this table.
sourcepub fn storage_descriptor(&self) -> Option<&StorageDescriptor>
pub fn storage_descriptor(&self) -> Option<&StorageDescriptor>
A storage descriptor containing information about the physical storage of this table.
sourcepub fn partition_keys(&self) -> &[Column]
pub fn partition_keys(&self) -> &[Column]
A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you must at least set the value of partitionKeys
to an empty list. For example:
"PartitionKeys": \[\]
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .partition_keys.is_none()
.
sourcepub fn view_original_text(&self) -> Option<&str>
pub fn view_original_text(&self) -> Option<&str>
Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a VIRTUAL_VIEW
, certain Athena configuration encoded in base64.
sourcepub fn view_expanded_text(&self) -> Option<&str>
pub fn view_expanded_text(&self) -> Option<&str>
Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
sourcepub fn table_type(&self) -> Option<&str>
pub fn table_type(&self) -> Option<&str>
The type of this table. Glue will create tables with the EXTERNAL_TABLE
type. Other services, such as Athena, may create tables with additional table types.
Glue related table types:
- EXTERNAL_TABLE
-
Hive compatible attribute - indicates a non-Hive managed table.
- GOVERNED
-
Used by Lake Formation. The Glue Data Catalog understands
GOVERNED
.
sourcepub fn parameters(&self) -> Option<&HashMap<String, String>>
pub fn parameters(&self) -> Option<&HashMap<String, String>>
These key-value pairs define properties associated with the table.
sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
The person or entity who created the table.
sourcepub fn is_registered_with_lake_formation(&self) -> bool
pub fn is_registered_with_lake_formation(&self) -> bool
Indicates whether the table has been registered with Lake Formation.
sourcepub fn target_table(&self) -> Option<&TableIdentifier>
pub fn target_table(&self) -> Option<&TableIdentifier>
A TableIdentifier
structure that describes a target table for resource linking.
sourcepub fn catalog_id(&self) -> Option<&str>
pub fn catalog_id(&self) -> Option<&str>
The ID of the Data Catalog in which the table resides.
sourcepub fn version_id(&self) -> Option<&str>
pub fn version_id(&self) -> Option<&str>
The ID of the table version.
sourcepub fn federated_table(&self) -> Option<&FederatedTable>
pub fn federated_table(&self) -> Option<&FederatedTable>
A FederatedTable
structure that references an entity outside the Glue Data Catalog.
sourcepub fn view_definition(&self) -> Option<&ViewDefinition>
pub fn view_definition(&self) -> Option<&ViewDefinition>
A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
sourcepub fn is_multi_dialect_view(&self) -> Option<bool>
pub fn is_multi_dialect_view(&self) -> Option<bool>
Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.
sourcepub fn status(&self) -> Option<&TableStatus>
pub fn status(&self) -> Option<&TableStatus>
A structure containing information about the state of an asynchronous change to a table.
Trait Implementations§
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);