pub struct RedshiftDataState {
pub statements: HashMap<String, Statement>,
pub databases: Vec<String>,
pub schemas: Vec<String>,
pub table_names: Vec<String>,
pub table_columns: HashMap<String, Vec<(String, String)>>,
}Fields§
§statements: HashMap<String, Statement>§databases: Vec<String>Databases available in the mock cluster catalogue.
schemas: Vec<String>Schemas available in the mock cluster catalogue.
table_names: Vec<String>Table names available in the mock cluster catalogue.
table_columns: HashMap<String, Vec<(String, String)>>Column metadata keyed by table name.
Implementations§
Source§impl RedshiftDataState
impl RedshiftDataState
pub fn execute_statement( &mut self, sql: &str, database: &str, cluster_identifier: Option<&str>, workgroup_name: Option<&str>, db_user: Option<&str>, secret_arn: Option<&str>, parameters: Vec<StatementParameter>, result: StatementResult, ) -> Result<String, RedshiftDataError>
pub fn describe_statement( &self, id: &str, ) -> Result<&Statement, RedshiftDataError>
pub fn cancel_statement(&mut self, id: &str) -> Result<bool, RedshiftDataError>
pub fn list_statements(&self) -> Vec<&Statement>
pub fn batch_execute_statement( &mut self, sqls: Vec<String>, database: &str, cluster_identifier: Option<&str>, workgroup_name: Option<&str>, db_user: Option<&str>, secret_arn: Option<&str>, statement_name: Option<&str>, result: StatementResult, ) -> Result<String, RedshiftDataError>
pub fn list_databases(&self) -> Vec<String>
pub fn list_schemas(&self) -> Vec<String>
pub fn list_tables(&self) -> Vec<String>
pub fn describe_table(&self, table: Option<&str>) -> Vec<(String, String)>
Trait Implementations§
Source§impl Debug for RedshiftDataState
impl Debug for RedshiftDataState
Source§impl Default for RedshiftDataState
impl Default for RedshiftDataState
Source§fn default() -> RedshiftDataState
fn default() -> RedshiftDataState
Returns the “default value” for a type. Read more
Source§impl From<&RedshiftDataState> for RedshiftDataStateView
impl From<&RedshiftDataState> for RedshiftDataStateView
Source§fn from(state: &RedshiftDataState) -> Self
fn from(state: &RedshiftDataState) -> Self
Converts to this type from the input type.
Source§impl From<RedshiftDataStateView> for RedshiftDataState
impl From<RedshiftDataStateView> for RedshiftDataState
Source§fn from(view: RedshiftDataStateView) -> Self
fn from(view: RedshiftDataStateView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RedshiftDataState
impl RefUnwindSafe for RedshiftDataState
impl Send for RedshiftDataState
impl Sync for RedshiftDataState
impl Unpin for RedshiftDataState
impl UnsafeUnpin for RedshiftDataState
impl UnwindSafe for RedshiftDataState
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
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.