diesel/sqlite/query_builder/
returning.rs

1use crate::backend::Backend;
2use crate::query_builder::returning_clause::ReturningClause;
3use crate::query_builder::{AstPass, QueryFragment};
4use crate::result::QueryResult;
5use crate::sqlite::backend::SqliteReturningClause;
6
7impl<Expr, DB> QueryFragment<DB, SqliteReturningClause> for ReturningClause<Expr>
8where
9    DB: Backend<ReturningClause = SqliteReturningClause>,
10    Expr: QueryFragment<DB>,
11{
12    fn walk_ast<'b>(&'b self, mut out: AstPass<'_, 'b, DB>) -> QueryResult<()> {
13        out.skip_from(true);
14        out.push_sql(" RETURNING ");
15        self.0.walk_ast(out.reborrow())?;
16        Ok(())
17    }
18}