Skip to main content

diesel/type_impls/
primitives.rs

1use crate::backend::Backend;
2use crate::deserialize::{self, FromSql, FromSqlRef, Queryable};
3#[cfg(feature = "std")]
4use crate::query_builder::bind_collector::RawBytesBindCollector;
5use crate::serialize::{self, Output, ToSql};
6use crate::sql_types::{
7    self, BigInt, Binary, Bool, Double, Float, Integer, SingleValue, SmallInt, Text,
8};
9use alloc::borrow::Cow;
10use alloc::borrow::ToOwned;
11use alloc::fmt;
12use alloc::string::String;
13use alloc::vec::Vec;
14
15#[allow(dead_code)]
16mod foreign_impls {
17    use super::*;
18    use crate::deserialize::FromSqlRow;
19
20    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Bool> for &'__expr bool
            {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Bool, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Bool>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>
            for &'__expr bool {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Bool>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Bool> for
            &'__expr2 &'__expr bool {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Bool, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Bool>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>
            for &'__expr2 &'__expr bool {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Bool>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Bool>, __DB>
            for bool where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Bool, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Bool, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Bool> for bool {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Bool, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Bool>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>
            for bool {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Bool>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Bool>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for bool
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
21    #[diesel(foreign_derive)]
22    #[diesel(sql_type = Bool)]
23    struct BoolProxy(bool);
24
25    #[derive(const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for i8
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
26    #[cfg_attr(feature = "mysql_backend", derive(const _: () =
    {
        use diesel;
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::TinyInt> for
            &'__expr i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::TinyInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::TinyInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>
            for &'__expr i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::TinyInt> for
            &'__expr2 &'__expr i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::TinyInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::TinyInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>
            for &'__expr2 &'__expr i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::TinyInt>,
            __DB> for i8 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::TinyInt, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::TinyInt,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::TinyInt> for
            i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::TinyInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::TinyInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>
            for i8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression))]
27    #[diesel(foreign_derive)]
28    #[cfg_attr(feature = "mysql_backend", diesel(sql_type = crate::sql_types::TinyInt))]
29    struct I8Proxy(i8);
30
31    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<SmallInt> for
            &'__expr i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<SmallInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<SmallInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>
            for &'__expr i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<SmallInt> for
            &'__expr2 &'__expr i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<SmallInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<SmallInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>
            for &'__expr2 &'__expr i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<SmallInt>,
            __DB> for i16 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<SmallInt, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<SmallInt, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<SmallInt> for i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<SmallInt,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<SmallInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>
            for i16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for i16
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
32    #[diesel(foreign_derive)]
33    #[diesel(sql_type = SmallInt)]
34    struct I16Proxy(i16);
35
36    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Integer> for
            &'__expr i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Integer,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Integer>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>
            for &'__expr i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Integer> for
            &'__expr2 &'__expr i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Integer,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Integer>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>
            for &'__expr2 &'__expr i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Integer>,
            __DB> for i32 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Integer, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Integer, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Integer> for i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Integer,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Integer>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>
            for i32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for i32
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
37    #[diesel(foreign_derive)]
38    #[diesel(sql_type = Integer)]
39    struct I32Proxy(i32);
40
41    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<BigInt> for
            &'__expr i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<BigInt, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<BigInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>
            for &'__expr i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<BigInt> for
            &'__expr2 &'__expr i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<BigInt, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<BigInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>
            for &'__expr2 &'__expr i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<BigInt>,
            __DB> for i64 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<BigInt, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<BigInt, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<BigInt> for i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<BigInt, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<BigInt>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>
            for i64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for i64
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
42    #[diesel(foreign_derive)]
43    #[diesel(sql_type = BigInt)]
44    struct I64Proxy(i64);
45
46    #[derive(const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for u8
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
47    #[cfg_attr(
48        any(feature = "mysql_backend", feature = "postgres_backend"),
49        derive(const _: () =
    {
        use diesel;
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>
            for &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>
            for &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>
            for &'__expr2 &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>
            for &'__expr2 &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>,
            __DB> for u8 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Unsigned<crate::sql_types::TinyInt>,
            __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Unsigned<crate::sql_types::TinyInt>,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>
            for u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<crate::sql_types::TinyInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>
            for u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<crate::sql_types::TinyInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::CChar> for
            &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::CChar,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::CChar>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>
            for &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::CChar>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::CChar> for
            &'__expr2 &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::CChar,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::CChar>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>
            for &'__expr2 &'__expr u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::CChar>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::CChar>,
            __DB> for u8 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::CChar, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::CChar,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::CChar> for u8
            {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::CChar,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::CChar>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>
            for u8 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::CChar>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::CChar>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression)
50    )]
51    #[diesel(foreign_derive)]
52    #[cfg_attr(
53        feature = "mysql_backend",
54        diesel(sql_type = crate::sql_types::Unsigned<crate::sql_types::TinyInt>)
55    )]
56    #[cfg_attr(feature = "postgres_backend", diesel(foreign_derive, sql_type = crate::sql_types::CChar))]
57    struct U8Proxy(u8);
58
59    #[derive(const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for u16
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
60    #[cfg_attr(feature = "mysql_backend", derive(const _: () =
    {
        use diesel;
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>
            for &'__expr u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>
            for &'__expr u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>
            for &'__expr2 &'__expr u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>
            for &'__expr2 &'__expr u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>,
            __DB> for u16 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Unsigned<SmallInt>,
            __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Unsigned<SmallInt>,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>
            for u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<SmallInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<SmallInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>
            for u16 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<SmallInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression))]
61    #[diesel(foreign_derive)]
62    #[cfg_attr(feature = "mysql_backend", diesel(sql_type = crate::sql_types::Unsigned<SmallInt>))]
63    struct U16Proxy(u16);
64
65    #[derive(const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for u32
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
66    #[cfg_attr(
67        any(feature = "mysql_backend", feature = "postgres_backend"),
68        derive(const _: () =
    {
        use diesel;
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>
            for &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>
            for &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>
            for &'__expr2 &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>
            for &'__expr2 &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>,
            __DB> for u32 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Unsigned<Integer>,
            __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Unsigned<Integer>,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>
            for u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<Integer>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<Integer>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>
            for u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<Integer>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr> diesel::expression::AsExpression<crate::sql_types::Oid>
            for &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Oid,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Oid>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>
            for &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Oid>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Oid> for
            &'__expr2 &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Oid,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Oid>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>
            for &'__expr2 &'__expr u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Oid>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Oid>,
            __DB> for u32 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Oid, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Oid,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Oid> for u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Oid,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Oid>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>
            for u32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Oid>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Oid>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression)
69    )]
70    #[diesel(foreign_derive)]
71    #[cfg_attr(feature = "mysql_backend", diesel(sql_type = crate::sql_types::Unsigned<Integer>))]
72    #[cfg_attr(feature = "postgres_backend", diesel(sql_type = crate::sql_types::Oid))]
73    struct U32Proxy(u32);
74
75    #[derive(const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for u64
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
76    #[cfg_attr(feature = "mysql_backend", derive(const _: () =
    {
        use diesel;
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>
            for &'__expr u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>
            for &'__expr u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>
            for &'__expr2 &'__expr u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>
            for &'__expr2 &'__expr u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>,
            __DB> for u64 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Unsigned<BigInt>,
            __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Unsigned<BigInt>,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>
            for u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Unsigned<BigInt>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Unsigned<BigInt>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>
            for u64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Unsigned<BigInt>>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression))]
77    #[diesel(foreign_derive)]
78    #[cfg_attr(feature = "mysql_backend", diesel(sql_type = crate::sql_types::Unsigned<BigInt>))]
79    struct U64Proxy(u64);
80
81    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Float> for &'__expr f32
            {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Float, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Float>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>
            for &'__expr f32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Float>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Float> for
            &'__expr2 &'__expr f32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Float, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Float>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>
            for &'__expr2 &'__expr f32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Float>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Float>, __DB>
            for f32 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Float, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Float, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Float> for f32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Float, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Float>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>
            for f32 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Float>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Float>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for f32
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
82    #[diesel(foreign_derive)]
83    #[diesel(sql_type = Float)]
84    struct F32Proxy(f32);
85
86    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Double> for
            &'__expr f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Double, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Double>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>
            for &'__expr f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Double>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Double> for
            &'__expr2 &'__expr f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Double, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Double>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>
            for &'__expr2 &'__expr f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Double>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Double>,
            __DB> for f64 where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Double, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Double, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Double> for f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Double, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Double>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>
            for f64 {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Double>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Double>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for f64
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
87    #[diesel(foreign_derive)]
88    #[diesel(sql_type = Double)]
89    struct F64Proxy(f64);
90
91    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Text> for
            &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Text, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Text>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Text>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Text> for
            &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Text, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Text>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>
            for &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Text>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Text>, __DB>
            for String where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Text, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Text, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Text> for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Text, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Text>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>
            for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Text>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr> diesel::expression::AsExpression<crate::sql_types::Date>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Date,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Date>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Date>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Date> for
            &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Date,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Date>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>
            for &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Date>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Date>,
            __DB> for String where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Date, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Date,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Date> for
            String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Date,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Date>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>
            for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Date>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr> diesel::expression::AsExpression<crate::sql_types::Time>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Time,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Time>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Time>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Time> for
            &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Time,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Time>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>
            for &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Time>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Time>,
            __DB> for String where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Time, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Time,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Time> for
            String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Time,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Time>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>
            for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Time>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Timestamp> for
            &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Timestamp,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Timestamp>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Timestamp> for
            &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Timestamp,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Timestamp>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>
            for &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
            __DB> for String where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Timestamp, __DB>
            {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Timestamp,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Timestamp> for
            String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Timestamp,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Timestamp>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>
            for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Citext> for
            &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Citext,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Citext>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>
            for &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Citext>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Citext> for
            &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Citext,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Citext>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>
            for &'__expr2 &'__expr String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Citext>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Citext>,
            __DB> for String where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Citext, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Citext,
                        __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<crate::sql_types::Citext> for
            String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Citext,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Citext>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>
            for String {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Citext>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression, const _: () =
    {
        use diesel;
        impl<__DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for String
            where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
92    #[diesel(foreign_derive)]
93    #[diesel(sql_type = Text)]
94    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Date))]
95    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Time))]
96    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Timestamp))]
97    #[cfg_attr(feature = "postgres_backend", diesel(sql_type = crate::sql_types::Citext))]
98    struct StringProxy(String);
99
100    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Text> for &'__expr str
            {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Text, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Text>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Text>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Text> for
            &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Text, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Text>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>
            for &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Text>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Text>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Text>, __DB>
            for str where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Text, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Text, __DB>::to_sql(self, out)
            }
        }
        impl<'__expr> diesel::expression::AsExpression<crate::sql_types::Date>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Date,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Date>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Date>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Date> for
            &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Date,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Date>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>
            for &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Date>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Date>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Date>,
            __DB> for str where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Date, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Date,
                        __DB>::to_sql(self, out)
            }
        }
        impl<'__expr> diesel::expression::AsExpression<crate::sql_types::Time>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Time,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Time>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Time>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Time> for
            &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Time,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Time>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>
            for &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Time>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Time>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Time>,
            __DB> for str where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Time, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Time,
                        __DB>::to_sql(self, out)
            }
        }
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Timestamp> for
            &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Timestamp,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Timestamp>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Timestamp> for
            &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Timestamp,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Timestamp>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>
            for &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Timestamp>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Timestamp>,
            __DB> for str where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Timestamp, __DB>
            {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Timestamp,
                        __DB>::to_sql(self, out)
            }
        }
        impl<'__expr>
            diesel::expression::AsExpression<crate::sql_types::Citext> for
            &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Citext,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Citext>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>
            for &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Citext>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<crate::sql_types::Citext> for
            &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<crate::sql_types::Citext,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<crate::sql_types::Citext>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>
            for &'__expr2 &'__expr str {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<crate::sql_types::Citext>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<crate::sql_types::Citext>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<crate::sql_types::Citext>,
            __DB> for str where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<crate::sql_types::Citext, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<crate::sql_types::Citext,
                        __DB>::to_sql(self, out)
            }
        }
    };AsExpression)]
101    #[diesel(foreign_derive, not_sized)]
102    #[diesel(sql_type = Text)]
103    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Date))]
104    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Time))]
105    #[cfg_attr(feature = "__sqlite-shared", diesel(sql_type = crate::sql_types::Timestamp))]
106    #[cfg_attr(feature = "postgres_backend", diesel(sql_type = crate::sql_types::Citext))]
107    struct StrProxy(str);
108
109    #[derive(const _: () =
    {
        use diesel;
        impl<T, __DB, __ST> diesel::deserialize::Queryable<__ST, __DB> for
            Vec<T> where __DB: diesel::backend::Backend,
            __ST: diesel::sql_types::SingleValue,
            Self: diesel::deserialize::FromSql<__ST, __DB> {
            type Row = Self;
            fn build(row: Self) -> diesel::deserialize::Result<Self> {
                diesel::deserialize::Result::Ok(row)
            }
        }
    };FromSqlRow)]
110    #[diesel(foreign_derive)]
111    struct VecProxy<T>(Vec<T>);
112
113    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Binary> for
            &'__expr Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Binary> for
            &'__expr2 &'__expr Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr2 &'__expr Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Binary>,
            __DB> for Vec<u8> where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Binary, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Binary, __DB>::to_sql(self, out)
            }
        }
        impl diesel::expression::AsExpression<Binary> for Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for Vec<u8> {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression)]
114    #[diesel(foreign_derive)]
115    #[diesel(sql_type = Binary)]
116    struct BinaryVecProxy(Vec<u8>);
117
118    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr> diesel::expression::AsExpression<Binary> for
            &'__expr [u8] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr [u8] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2> diesel::expression::AsExpression<Binary> for
            &'__expr2 &'__expr [u8] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr2 &'__expr [u8] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<__DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Binary>,
            __DB> for [u8] where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Binary, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Binary, __DB>::to_sql(self, out)
            }
        }
    };AsExpression)]
119    #[diesel(foreign_derive, not_sized)]
120    #[diesel(sql_type = Binary)]
121    struct BinarySliceProxy([u8]);
122
123    #[derive(const _: () =
    {
        use diesel;
        impl<'__expr, const N : usize>
            diesel::expression::AsExpression<Binary> for &'__expr [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, const N : usize>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2, const N : usize>
            diesel::expression::AsExpression<Binary> for
            &'__expr2 &'__expr [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        #[diagnostic::do_not_recommend]
        impl<'__expr, '__expr2, const N : usize>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for &'__expr2 &'__expr [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<const N : usize, __DB>
            diesel::serialize::ToSql<diesel::sql_types::Nullable<Binary>,
            __DB> for [u8; N] where __DB: diesel::backend::Backend,
            Self: diesel::serialize::ToSql<Binary, __DB> {
            fn to_sql<'__b>(&'__b self,
                out: &mut diesel::serialize::Output<'__b, '_, __DB>)
                -> diesel::serialize::Result {
                diesel::serialize::ToSql::<Binary, __DB>::to_sql(self, out)
            }
        }
        impl<const N : usize> diesel::expression::AsExpression<Binary> for
            [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<Binary, Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<Binary>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
        impl<const N : usize>
            diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>
            for [u8; N] {
            type Expression =
                diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<Binary>,
                Self>;
            fn as_expression(self)
                ->
                    <Self as
                    diesel::expression::AsExpression<diesel::sql_types::Nullable<Binary>>>::Expression {
                diesel::internal::derives::as_expression::Bound::new(self)
            }
        }
    };AsExpression)]
124    #[diesel(foreign_derive)]
125    #[diesel(sql_type = Binary)]
126    struct BinaryArrayProxy<const N: usize>([u8; N]);
127}
128
129#[diagnostic::do_not_recommend]
130impl<ST, DB> FromSql<ST, DB> for String
131where
132    DB: Backend,
133    for<'a> &'a str: FromSqlRef<'a, ST, DB>,
134{
135    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
136        <&str as FromSqlRef<'_, ST, DB>>::from_sql(bytes).map(|v| v.to_owned())
137    }
138}
139
140#[cfg(feature = "std")]
141impl<DB> ToSql<sql_types::Text, DB> for str
142where
143    for<'a> DB: Backend<BindCollector<'a> = RawBytesBindCollector<DB>>,
144{
145    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
146        use alloc::boxed::Box;
147        use std::io::Write;
148
149        out.write_all(self.as_bytes())
150            .map(|_| crate::serialize::IsNull::No)
151            .map_err(|e| Box::new(e) as Box<dyn core::error::Error + Send + Sync>)
152    }
153}
154
155impl<DB> ToSql<sql_types::Text, DB> for String
156where
157    DB: Backend,
158    str: ToSql<sql_types::Text, DB>,
159{
160    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
161        (self as &str).to_sql(out)
162    }
163}
164
165impl<ST, DB> FromSql<ST, DB> for Vec<u8>
166where
167    DB: Backend,
168    for<'a> &'a [u8]: FromSqlRef<'a, ST, DB>,
169{
170    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
171        <&[u8] as FromSqlRef<'_, ST, DB>>::from_sql(bytes).map(|v| v.to_owned())
172    }
173}
174
175impl<DB> ToSql<sql_types::Binary, DB> for Vec<u8>
176where
177    DB: Backend,
178    [u8]: ToSql<sql_types::Binary, DB>,
179{
180    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
181        (self as &[u8]).to_sql(out)
182    }
183}
184
185impl<DB, const N: usize> ToSql<sql_types::Binary, DB> for [u8; N]
186where
187    DB: Backend,
188    [u8]: ToSql<sql_types::Binary, DB>,
189{
190    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
191        self.as_slice().to_sql(out)
192    }
193}
194
195#[cfg(feature = "std")]
196impl<DB> ToSql<sql_types::Binary, DB> for [u8]
197where
198    for<'a> DB: Backend<BindCollector<'a> = RawBytesBindCollector<DB>>,
199{
200    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
201        use alloc::boxed::Box;
202        use std::io::Write;
203
204        out.write_all(self)
205            .map(|_| crate::serialize::IsNull::No)
206            .map_err(|e| Box::new(e) as Box<dyn core::error::Error + Send + Sync>)
207    }
208}
209
210impl<'a, T: ?Sized, ST, DB> ToSql<ST, DB> for Cow<'a, T>
211where
212    T: 'a + ToOwned + ToSql<ST, DB>,
213    DB: Backend,
214    Self: fmt::Debug,
215{
216    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> serialize::Result {
217        ToSql::<ST, DB>::to_sql(&**self, out)
218    }
219}
220
221impl<'a, T: ?Sized, ST, DB> FromSql<ST, DB> for Cow<'a, T>
222where
223    T: 'a + ToOwned,
224    DB: Backend,
225    T::Owned: FromSql<ST, DB>,
226{
227    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
228        T::Owned::from_sql(bytes).map(Cow::Owned)
229    }
230}
231
232impl<'a, T: ?Sized, ST, DB> Queryable<ST, DB> for Cow<'a, T>
233where
234    T: 'a + ToOwned,
235    ST: SingleValue,
236    DB: Backend,
237    Self: FromSql<ST, DB>,
238{
239    type Row = Self;
240
241    fn build(row: Self::Row) -> deserialize::Result<Self> {
242        Ok(row)
243    }
244}
245
246use crate::expression::bound::Bound;
247use crate::expression::{AsExpression, Expression, TypedExpressionType};
248use sql_types::SqlType;
249
250impl<'a, T: ?Sized, ST> AsExpression<ST> for Cow<'a, T>
251where
252    T: 'a + ToOwned,
253    Bound<ST, Cow<'a, T>>: Expression<SqlType = ST>,
254    ST: SqlType + TypedExpressionType,
255{
256    type Expression = Bound<ST, Self>;
257
258    fn as_expression(self) -> Self::Expression {
259        Bound::new(self)
260    }
261}
262
263impl<'a, 'b, T: ?Sized, ST> AsExpression<ST> for &'b Cow<'a, T>
264where
265    T: 'a + ToOwned,
266    Bound<ST, &'b T>: Expression<SqlType = ST>,
267    ST: SqlType + TypedExpressionType,
268{
269    type Expression = Bound<ST, &'b T>;
270
271    fn as_expression(self) -> Self::Expression {
272        Bound::new(&**self)
273    }
274}