pub struct Returning {
pub columns: Vec<ReturningColumn>,
pub operation: ReturnOperation,
}Expand description
RETURNING clause specification.
Fields§
§columns: Vec<ReturningColumn>Columns to return.
operation: ReturnOperationOperation type (for MSSQL OUTPUT).
Implementations§
Source§impl Returning
impl Returning
Sourcepub fn all(operation: ReturnOperation) -> Self
pub fn all(operation: ReturnOperation) -> Self
Create RETURNING all columns.
Sourcepub fn columns<I, S>(operation: ReturnOperation, columns: I) -> Self
pub fn columns<I, S>(operation: ReturnOperation, columns: I) -> Self
Create RETURNING specific columns.
Sourcepub fn to_postgres_sql(&self) -> String
pub fn to_postgres_sql(&self) -> String
Generate PostgreSQL RETURNING clause.
Sourcepub fn to_sqlite_sql(&self) -> String
pub fn to_sqlite_sql(&self) -> String
Generate SQLite RETURNING clause.
Sourcepub fn to_mssql_sql(&self) -> String
pub fn to_mssql_sql(&self) -> String
Generate MSSQL OUTPUT clause.
Sourcepub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<String>
pub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<String>
Generate SQL for database type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Returning
impl<'de> Deserialize<'de> for Returning
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Returning
impl StructuralPartialEq for Returning
Auto Trait Implementations§
impl Freeze for Returning
impl RefUnwindSafe for Returning
impl Send for Returning
impl Sync for Returning
impl Unpin for Returning
impl UnwindSafe for Returning
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