pub struct InferredTableSchema {
pub columns: Vec<InferredColumn>,
pub source_files: Vec<PathBuf>,
}Expand description
An inferred table schema from one or more source files.
Fields§
§columns: Vec<InferredColumn>Column definitions in order.
source_files: Vec<PathBuf>Source files used for inference (for error context).
Implementations§
Source§impl InferredTableSchema
impl InferredTableSchema
Sourcepub fn to_ddl(&self, table_name: &str, schema_name: Option<&str>) -> String
pub fn to_ddl(&self, table_name: &str, schema_name: Option<&str>) -> String
Generate a CREATE TABLE DDL statement from this schema.
§Arguments
table_name- The name of the table to createschema_name- Optional schema/database name prefix
§Returns
A complete CREATE TABLE DDL statement as a string.
§Example
ⓘ
let ddl = schema.to_ddl("my_table", Some("my_schema"));
// CREATE TABLE my_schema.my_table (
// "id" DECIMAL(18,0),
// "name" VARCHAR(2000000),
// ...
// );Note: Table and schema names are NOT quoted to match how IMPORT statements
reference tables. In Exasol, unquoted identifiers are converted to uppercase.
Column names are quoted/sanitized according to the column_name_mode used
during schema inference.
Trait Implementations§
Source§impl Clone for InferredTableSchema
impl Clone for InferredTableSchema
Source§fn clone(&self) -> InferredTableSchema
fn clone(&self) -> InferredTableSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InferredTableSchema
impl RefUnwindSafe for InferredTableSchema
impl Send for InferredTableSchema
impl Sync for InferredTableSchema
impl Unpin for InferredTableSchema
impl UnsafeUnpin for InferredTableSchema
impl UnwindSafe for InferredTableSchema
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