pub struct Processor<'a> { /* private fields */ }Expand description
DML processor and SQL generator
Collects DBObject’s and creates SQL sql_statements using the supplied TypeWriter or Postgresql if none is provided
Implementations§
source§impl<'a> Processor<'a>
impl<'a> Processor<'a>
sourcepub fn new(type_writer: Option<Box<dyn TypeWriter>>) -> Self
pub fn new(type_writer: Option<Box<dyn TypeWriter>>) -> Self
Create a new Processor optionally specifying a TypeWriter to use
sourcepub fn new_with_objects(
objects: &'a Vec<Box<dyn DBObject>>,
type_writer: Option<Box<dyn TypeWriter>>
) -> Self
pub fn new_with_objects( objects: &'a Vec<Box<dyn DBObject>>, type_writer: Option<Box<dyn TypeWriter>> ) -> Self
Create a new Processor optionally specifying a TypeWriter to use
sourcepub fn sql_statements(&self) -> Vec<String>
pub fn sql_statements(&self) -> Vec<String>
Get the list of serialized SQL sql_statements
sourcepub fn join_sql_statements(&self) -> String
pub fn join_sql_statements(&self) -> String
Get a String with all of the SQL statments
sourcepub fn serialize_to_yaml_file(
&self,
file_name: &str
) -> Result<(), Box<dyn Error>>
pub fn serialize_to_yaml_file( &self, file_name: &str ) -> Result<(), Box<dyn Error>>
Write objects to a YAML file
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Processor<'a>
impl<'a> !Send for Processor<'a>
impl<'a> !Sync for Processor<'a>
impl<'a> Unpin for Processor<'a>
impl<'a> !UnwindSafe for Processor<'a>
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