1use super::connection::{SqliteBindCollector, SqliteValue};
4use super::query_builder::SqliteQueryBuilder;
5use crate::backend::*;
6use crate::sql_types::TypeMetadata;
7
8#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Sqlite {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Sqlite")
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for Sqlite { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Sqlite {
#[inline]
fn clone(&self) -> Sqlite { *self }
}Clone, #[automatically_derived]
impl ::core::hash::Hash for Sqlite {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialEq for Sqlite {
#[inline]
fn eq(&self, other: &Sqlite) -> bool { true }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Sqlite {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::default::Default for Sqlite {
#[inline]
fn default() -> Sqlite { Sqlite {} }
}Default)]
10pub struct Sqlite;
11
12#[allow(missing_debug_implementations)]
21#[derive(#[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::fmt::Debug for SqliteType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
SqliteType::Binary => "Binary",
SqliteType::Text => "Text",
SqliteType::Float => "Float",
SqliteType::Double => "Double",
SqliteType::SmallInt => "SmallInt",
SqliteType::Integer => "Integer",
SqliteType::Long => "Long",
})
}
}Debug, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::hash::Hash for SqliteType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::cmp::PartialEq for SqliteType {
#[inline]
fn eq(&self, other: &SqliteType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::cmp::Eq for SqliteType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::clone::Clone for SqliteType {
#[inline]
fn clone(&self) -> SqliteType { *self }
}Clone, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::marker::Copy for SqliteType { }Copy)]
22pub enum SqliteType {
23 Binary,
25 Text,
27 Float,
29 Double,
31 SmallInt,
33 Integer,
35 Long,
37}
38
39impl Backend for Sqlite {
40 type QueryBuilder = SqliteQueryBuilder;
41 type RawValue<'a> = SqliteValue<'a, 'a, 'a>;
42 type BindCollector<'a> = SqliteBindCollector<'a>;
43}
44
45impl TypeMetadata for Sqlite {
46 type TypeMetadata = SqliteType;
47 type MetadataLookup = ();
48}
49
50impl SqlDialect for Sqlite {
51 #[cfg(not(feature = "returning_clauses_for_sqlite_3_35"))]
52 type ReturningClause = sql_dialect::returning_clause::DoesNotSupportReturningClause;
53 #[cfg(feature = "returning_clauses_for_sqlite_3_35")]
54 type ReturningClause = SqliteReturningClause;
55
56 type OnConflictClause = SqliteOnConflictClause;
57
58 type InsertWithDefaultKeyword =
59 sql_dialect::default_keyword_for_insert::DoesNotSupportDefaultKeyword;
60 type BatchInsertSupport = SqliteBatchInsert;
61 type ConcatClause = sql_dialect::concat_clause::ConcatWithPipesClause;
62 type DefaultValueClauseForInsert = sql_dialect::default_value_clause::AnsiDefaultValueClause;
63
64 type BatchUpdateSupport = SqliteBatchUpdate;
65
66 type EmptyFromClauseSyntax = sql_dialect::from_clause_syntax::AnsiSqlFromClauseSyntax;
67 type SelectStatementSyntax = sql_dialect::select_statement_syntax::AnsiSqlSelectStatement;
68
69 type ExistsSyntax = sql_dialect::exists_syntax::AnsiSqlExistsSyntax;
70 type ArrayComparison = sql_dialect::array_comparison::AnsiSqlArrayComparison;
71 type AliasSyntax = sql_dialect::alias_syntax::AsAliasSyntax;
72
73 type WindowFrameClauseGroupSupport =
74 sql_dialect::window_frame_clause_group_support::IsoGroupWindowFrameUnit;
75 type WindowFrameExclusionSupport =
76 sql_dialect::window_frame_exclusion_support::FrameExclusionSupport;
77 type AggregateFunctionExpressions =
78 sql_dialect::aggregate_function_expressions::PostgresLikeAggregateFunctionExpressions;
79 type BuiltInWindowFunctionRequireOrder =
80 sql_dialect::built_in_window_function_require_order::NoOrderRequired;
81}
82
83impl DieselReserveSpecialization for Sqlite {}
84impl TrustedBackend for Sqlite {}
85
86#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqliteOnConflictClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "SqliteOnConflictClause")
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for SqliteOnConflictClause { }Copy, #[automatically_derived]
impl ::core::clone::Clone for SqliteOnConflictClause {
#[inline]
fn clone(&self) -> SqliteOnConflictClause { *self }
}Clone)]
87pub struct SqliteOnConflictClause;
88
89impl sql_dialect::on_conflict_clause::SupportsOnConflictClause for SqliteOnConflictClause {}
90impl sql_dialect::on_conflict_clause::SupportsOnConflictClauseWhere for SqliteOnConflictClause {}
91impl sql_dialect::on_conflict_clause::PgLikeOnConflictClause for SqliteOnConflictClause {}
92
93#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqliteBatchInsert {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "SqliteBatchInsert")
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for SqliteBatchInsert { }Copy, #[automatically_derived]
impl ::core::clone::Clone for SqliteBatchInsert {
#[inline]
fn clone(&self) -> SqliteBatchInsert { *self }
}Clone)]
94pub struct SqliteBatchInsert;
95
96#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqliteReturningClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "SqliteReturningClause")
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for SqliteReturningClause { }Copy, #[automatically_derived]
impl ::core::clone::Clone for SqliteReturningClause {
#[inline]
fn clone(&self) -> SqliteReturningClause { *self }
}Clone)]
97pub struct SqliteReturningClause;
98
99impl sql_dialect::returning_clause::SupportsReturningClause for SqliteReturningClause {}
100
101#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqliteBatchUpdate {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "SqliteBatchUpdate")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SqliteBatchUpdate {
#[inline]
fn clone(&self) -> SqliteBatchUpdate { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SqliteBatchUpdate { }Copy)]
102pub struct SqliteBatchUpdate;
103
104impl sql_dialect::batch_update_support::SupportsBatchUpdate for SqliteBatchUpdate {}