pub struct SchemaBuilder { /* private fields */ }Implementations§
Source§impl SchemaBuilder
impl SchemaBuilder
pub fn new(dialect: Dialect) -> SchemaBuilder
Sourcepub fn table<T>(self) -> SchemaBuilderwhere
T: IntoTable,
pub fn table<T>(self) -> SchemaBuilderwhere
T: IntoTable,
Add a table from any type that implements IntoTable.
Sourcepub fn table_def(self, table: Table) -> SchemaBuilder
pub fn table_def(self, table: Table) -> SchemaBuilder
Add a fully constructed modeled table definition.
pub fn extension(self, name: impl Into<String>) -> SchemaBuilder
pub fn extension_versioned( self, name: impl Into<String>, version: impl Into<String>, ) -> SchemaBuilder
Sourcepub fn extension_def(self, extension: ExtensionDef) -> SchemaBuilder
pub fn extension_def(self, extension: ExtensionDef) -> SchemaBuilder
Add a fully constructed extension definition.
pub fn view( self, name: impl Into<String>, definition: impl Into<String>, ) -> SchemaBuilder
Sourcepub fn view_def(self, view: ViewDef) -> SchemaBuilder
pub fn view_def(self, view: ViewDef) -> SchemaBuilder
Add a fully constructed view definition.
pub fn function(self, f: FunctionDef) -> SchemaBuilder
pub fn enum_type( self, name: impl Into<String>, values: &[&str], ) -> SchemaBuilder
Sourcepub fn enum_def(self, enum_def: EnumDef) -> SchemaBuilder
pub fn enum_def(self, enum_def: EnumDef) -> SchemaBuilder
Add a fully constructed enum definition.
Sourcepub fn build(self) -> Result<Schema, SchemaLoadError>
pub fn build(self) -> Result<Schema, SchemaLoadError>
Build a schema through the same normalize and prepare lifecycle as file and SQL ingestion.
Auto Trait Implementations§
impl Freeze for SchemaBuilder
impl RefUnwindSafe for SchemaBuilder
impl Send for SchemaBuilder
impl Sync for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnsafeUnpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more