sqlx_cloudflare_d1/
statement.rs1use sqlx_core::sql_str::SqlStr;
2use sqlx_core::statement::Statement;
3use sqlx_core::Either;
4
5use crate::{D1Arguments, D1Column, D1TypeInfo, D1};
6
7#[derive(Debug, Clone)]
13pub struct D1Statement {
14 pub(crate) sql: SqlStr,
15}
16
17impl Statement for D1Statement {
18 type Database = D1;
19
20 fn into_sql(self) -> SqlStr {
21 self.sql
22 }
23
24 fn sql(&self) -> &SqlStr {
25 &self.sql
26 }
27
28 fn parameters(&self) -> Option<Either<&[D1TypeInfo], usize>> {
29 None
30 }
31
32 fn columns(&self) -> &[D1Column] {
33 &[]
34 }
35
36 sqlx_core::impl_statement_query!(D1Arguments);
37}