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> Freeze for Processor<'a>
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