pub struct SqlJoin {
pub other_table_name: Name,
pub other_column_name: Name,
pub real_table_name: Option<Name>,
pub using_table_name: Name,
pub using_column_name: Name,
}
Expand description
Struct for generating the JOIN
clause.
Fields§
§other_table_name: Name
§other_column_name: Name
§real_table_name: Option<Name>
§using_table_name: Name
§using_column_name: Name
Implementations§
Source§impl SqlJoin
impl SqlJoin
Sourcepub fn to_mysql_join_clause<'a>(&self, s: &'a mut String) -> &'a str
pub fn to_mysql_join_clause<'a>(&self, s: &'a mut String) -> &'a str
Generate a JOIN
clause for MySQL.
If real_table_name
exists,
JOIN `<real_table_name>` AS `<other_table_name>` ON `<other_table_name>`.`<other_column_name>` = `<using_table_name>`.`<using_column_name>`
or
JOIN `<other_table_name>` ON `<other_table_name>`.`<other_column_name>` = `<using_table_name>`.`<using_column_name>`
Sourcepub fn format_mysql_join_clauses<'a>(
joins: &[SqlJoin],
s: &'a mut String,
) -> &'a str
pub fn format_mysql_join_clauses<'a>( joins: &[SqlJoin], s: &'a mut String, ) -> &'a str
Generate JOIN
clauses for MySQL.
Concatenate a series of SqlJoin
s with \n
.
Source§impl SqlJoin
impl SqlJoin
Sourcepub fn to_sqlite_join_clause<'a>(&self, s: &'a mut String) -> &'a str
pub fn to_sqlite_join_clause<'a>(&self, s: &'a mut String) -> &'a str
Generate a JOIN
clause for SQLite.
If real_table_name
exists,
JOIN `<real_table_name>` AS `<other_table_name>` ON `<other_table_name>`.`<other_column_name>` = `<using_table_name>`.`<using_column_name>`
or
JOIN `<other_table_name>` ON `<other_table_name>`.`<other_column_name>` = `<using_table_name>`.`<using_column_name>`
Sourcepub fn format_sqlite_join_clauses<'a>(
joins: &[SqlJoin],
s: &'a mut String,
) -> &'a str
pub fn format_sqlite_join_clauses<'a>( joins: &[SqlJoin], s: &'a mut String, ) -> &'a str
Generate JOIN
clauses for SQLite.
Concatenate a series of SqlJoin
s with \n
.
Trait Implementations§
impl Eq for SqlJoin
impl StructuralPartialEq for SqlJoin
Auto Trait Implementations§
impl Freeze for SqlJoin
impl RefUnwindSafe for SqlJoin
impl Send for SqlJoin
impl Sync for SqlJoin
impl Unpin for SqlJoin
impl UnwindSafe for SqlJoin
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