1mod array;
4#[doc(hidden)]
5pub(in crate::pg) mod date_and_time;
6#[doc(hidden)]
7pub(in crate::pg) mod floats;
8mod integers;
9#[cfg(feature = "ipnet-address")]
10mod ipnet_address;
11#[cfg(feature = "serde_json")]
12mod json;
13mod json_function_enum;
14mod mac_addr;
15mod mac_addr_8;
16#[doc(hidden)]
17pub(in crate::pg) mod money;
18mod multirange;
19#[cfg(feature = "network-address")]
20mod network_address;
21mod numeric;
22pub(in crate::pg) mod pg_lsn;
23mod primitives;
24mod ranges;
25mod record;
26#[cfg(feature = "uuid")]
27mod uuid;
28
29pub mod sql_types {
33 use crate::query_builder::QueryId;
34 use crate::sql_types::SqlType;
35
36 #[cfg(feature = "postgres_backend")]
51 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Oid {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Oid")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Oid {
#[inline]
fn clone(&self) -> Oid { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Oid { }Copy, #[automatically_derived]
impl ::core::default::Default for Oid {
#[inline]
fn default() -> Oid { Oid {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Oid {
type QueryId = Oid<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Oid {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Oid {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Oid> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(26, 1028)
}
}
};SqlType)]
52 #[diesel(postgres_type(oid = 26, array_oid = 1028))]
53 pub struct Oid;
54
55 #[cfg_attr(
79 feature = "chrono",
80 doc = " [`chrono::NaiveDateTime`]: chrono::naive::NaiveDateTime"
81 )]
82 #[cfg_attr(
83 not(feature = "chrono"),
84 doc = " [`chrono::NaiveDateTime`]: https://docs.rs/chrono/0.4.19/chrono/naive/struct.NaiveDateTime.html"
85 )]
86 #[cfg_attr(feature = "chrono", doc = " [`chrono::DateTime`]: chrono::DateTime")]
87 #[cfg_attr(
88 not(feature = "chrono"),
89 doc = " [`chrono::DateTime`]: https://docs.rs/chrono/0.4.19/chrono/struct.DateTime.html"
90 )]
91 #[cfg_attr(
92 feature = "time",
93 doc = " [`time::PrimitiveDateTime`]: time::PrimitiveDateTime"
94 )]
95 #[cfg_attr(
96 not(feature = "time"),
97 doc = " [`time::PrimitiveDateTime`]: https://docs.rs/time/0.3.9/time/struct.PrimitiveDateTime.html"
98 )]
99 #[cfg_attr(
100 feature = "time",
101 doc = " [`time::OffsetDateTime`]: time::OffsetDateTime"
102 )]
103 #[cfg_attr(
104 not(feature = "time"),
105 doc = " [`time::OffsetDateTime`]: https://docs.rs/time/0.3.9/time/struct.OffsetDateTime.html"
106 )]
107 #[cfg(feature = "postgres_backend")]
108 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Timestamptz {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Timestamptz")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Timestamptz {
#[inline]
fn clone(&self) -> Timestamptz { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Timestamptz { }Copy, #[automatically_derived]
impl ::core::default::Default for Timestamptz {
#[inline]
fn default() -> Timestamptz { Timestamptz {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Timestamptz {
type QueryId = Timestamptz<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Timestamptz {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Timestamptz {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Timestamptz> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(1184, 1185)
}
}
};SqlType)]
109 #[diesel(postgres_type(oid = 1184, array_oid = 1185))]
110 pub struct Timestamptz;
111
112 #[derive(#[automatically_derived]
impl<ST: ::core::fmt::Debug + 'static> ::core::fmt::Debug for Array<ST> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Array",
&&self.0)
}
}Debug, #[automatically_derived]
impl<ST: ::core::clone::Clone + 'static> ::core::clone::Clone for Array<ST> {
#[inline]
fn clone(&self) -> Array<ST> {
Array(::core::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
impl<ST: ::core::marker::Copy + 'static> ::core::marker::Copy for Array<ST> {
}Copy, #[automatically_derived]
impl<ST: ::core::default::Default + 'static> ::core::default::Default for
Array<ST> {
#[inline]
fn default() -> Array<ST> { Array(::core::default::Default::default()) }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl<ST: 'static + diesel::query_builder::QueryId>
diesel::query_builder::QueryId for Array<ST> {
type QueryId =
Array<<ST as diesel::query_builder::QueryId>::QueryId>;
const HAS_STATIC_QUERY_ID: bool =
<ST as diesel::query_builder::QueryId>::HAS_STATIC_QUERY_ID &&
true;
const IS_WINDOW_FUNCTION: bool =
<ST as diesel::query_builder::QueryId>::IS_WINDOW_FUNCTION ||
false;
}
};QueryId, const _: () =
{
use diesel;
impl<ST: 'static> diesel::sql_types::SqlType for Array<ST> {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = true;
}
impl<ST: 'static> diesel::sql_types::SingleValue for Array<ST> {}
};SqlType)]
132 #[cfg(feature = "postgres_backend")]
133 pub struct Array<ST: 'static>(ST);
134
135 #[derive(#[automatically_derived]
impl<ST: ::core::fmt::Debug + 'static> ::core::fmt::Debug for Range<ST> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Range",
&&self.0)
}
}Debug, #[automatically_derived]
impl<ST: ::core::clone::Clone + 'static> ::core::clone::Clone for Range<ST> {
#[inline]
fn clone(&self) -> Range<ST> {
Range(::core::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
impl<ST: ::core::marker::Copy + 'static> ::core::marker::Copy for Range<ST> {
}Copy, #[automatically_derived]
impl<ST: ::core::default::Default + 'static> ::core::default::Default for
Range<ST> {
#[inline]
fn default() -> Range<ST> { Range(::core::default::Default::default()) }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl<ST: 'static + diesel::query_builder::QueryId>
diesel::query_builder::QueryId for Range<ST> {
type QueryId =
Range<<ST as diesel::query_builder::QueryId>::QueryId>;
const HAS_STATIC_QUERY_ID: bool =
<ST as diesel::query_builder::QueryId>::HAS_STATIC_QUERY_ID &&
true;
const IS_WINDOW_FUNCTION: bool =
<ST as diesel::query_builder::QueryId>::IS_WINDOW_FUNCTION ||
false;
}
};QueryId, const _: () =
{
use diesel;
impl<ST: 'static> diesel::sql_types::SqlType for Range<ST> {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl<ST: 'static> diesel::sql_types::SingleValue for Range<ST> {}
};SqlType)]
162 #[cfg(feature = "postgres_backend")]
163 pub struct Range<ST: 'static>(ST);
164
165 #[doc(hidden)]
166 pub type Int4range = Range<crate::sql_types::Int4>;
167 #[doc(hidden)]
168 pub type Int8range = Range<crate::sql_types::Int8>;
169 #[doc(hidden)]
170 pub type Daterange = Range<crate::sql_types::Date>;
171 #[doc(hidden)]
172 pub type Numrange = Range<crate::sql_types::Numeric>;
173 #[doc(hidden)]
174 pub type Tsrange = Range<crate::sql_types::Timestamp>;
175 #[doc(hidden)]
176 pub type Tstzrange = Range<crate::sql_types::Timestamptz>;
177
178 #[derive(#[automatically_derived]
impl<ST: ::core::fmt::Debug + 'static> ::core::fmt::Debug for Multirange<ST> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Multirange",
&&self.0)
}
}Debug, #[automatically_derived]
impl<ST: ::core::clone::Clone + 'static> ::core::clone::Clone for
Multirange<ST> {
#[inline]
fn clone(&self) -> Multirange<ST> {
Multirange(::core::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
impl<ST: ::core::marker::Copy + 'static> ::core::marker::Copy for
Multirange<ST> {
}Copy, #[automatically_derived]
impl<ST: ::core::default::Default + 'static> ::core::default::Default for
Multirange<ST> {
#[inline]
fn default() -> Multirange<ST> {
Multirange(::core::default::Default::default())
}
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl<ST: 'static + diesel::query_builder::QueryId>
diesel::query_builder::QueryId for Multirange<ST> {
type QueryId =
Multirange<<ST as diesel::query_builder::QueryId>::QueryId>;
const HAS_STATIC_QUERY_ID: bool =
<ST as diesel::query_builder::QueryId>::HAS_STATIC_QUERY_ID &&
true;
const IS_WINDOW_FUNCTION: bool =
<ST as diesel::query_builder::QueryId>::IS_WINDOW_FUNCTION ||
false;
}
};QueryId, const _: () =
{
use diesel;
impl<ST: 'static> diesel::sql_types::SqlType for Multirange<ST> {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl<ST: 'static> diesel::sql_types::SingleValue for Multirange<ST> {}
};SqlType)]
197 #[cfg(feature = "postgres_backend")]
198 pub struct Multirange<ST: 'static>(ST);
199
200 #[doc(hidden)]
201 pub type Int4multirange = Multirange<crate::sql_types::Int4>;
202 #[doc(hidden)]
203 pub type Int8multirange = Multirange<crate::sql_types::Int8>;
204 #[doc(hidden)]
205 pub type Datemultirange = Multirange<crate::sql_types::Date>;
206 #[doc(hidden)]
207 pub type Nummultirange = Multirange<crate::sql_types::Numeric>;
208 #[doc(hidden)]
209 pub type Tsmultirange = Multirange<crate::sql_types::Timestamp>;
210 #[doc(hidden)]
211 pub type Tstzmultirange = Multirange<crate::sql_types::Timestamptz>;
212
213 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for NullValueTreatmentEnum {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "NullValueTreatmentEnum")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for NullValueTreatmentEnum {
#[inline]
fn clone(&self) -> NullValueTreatmentEnum { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for NullValueTreatmentEnum { }Copy, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for NullValueTreatmentEnum {
type QueryId = NullValueTreatmentEnum<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for NullValueTreatmentEnum {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for NullValueTreatmentEnum {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<NullValueTreatmentEnum> for
diesel::pg::Pg {
fn metadata(lookup: &mut Self::MetadataLookup) -> PgTypeMetadata {
lookup.lookup_type("text", None)
}
}
};SqlType)]
217 #[cfg(feature = "postgres_backend")]
218 #[diesel(postgres_type(name = "text"))]
219 pub struct NullValueTreatmentEnum;
220
221 #[derive(#[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::fmt::Debug for NullValueTreatment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
NullValueTreatment::RaiseException => "RaiseException",
NullValueTreatment::UseJsonNull => "UseJsonNull",
NullValueTreatment::DeleteKey => "DeleteKey",
NullValueTreatment::ReturnTarget => "ReturnTarget",
})
}
}Debug, #[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::clone::Clone for NullValueTreatment {
#[inline]
fn clone(&self) -> NullValueTreatment { *self }
}Clone, #[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::marker::Copy for NullValueTreatment { }Copy, const _: () =
{
use diesel;
impl<'__expr> diesel::expression::AsExpression<NullValueTreatmentEnum>
for &'__expr NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<NullValueTreatmentEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<NullValueTreatmentEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr>
diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>
for &'__expr NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<NullValueTreatmentEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr, '__expr2>
diesel::expression::AsExpression<NullValueTreatmentEnum> for
&'__expr2 &'__expr NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<NullValueTreatmentEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<NullValueTreatmentEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr, '__expr2>
diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>
for &'__expr2 &'__expr NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<NullValueTreatmentEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<__DB>
diesel::serialize::ToSql<diesel::sql_types::Nullable<NullValueTreatmentEnum>,
__DB> for NullValueTreatment where __DB: diesel::backend::Backend,
Self: diesel::serialize::ToSql<NullValueTreatmentEnum, __DB> {
fn to_sql<'__b>(&'__b self,
out: &mut diesel::serialize::Output<'__b, '_, __DB>)
-> diesel::serialize::Result {
diesel::serialize::ToSql::<NullValueTreatmentEnum,
__DB>::to_sql(self, out)
}
}
impl diesel::expression::AsExpression<NullValueTreatmentEnum> for
NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<NullValueTreatmentEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<NullValueTreatmentEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>
for NullValueTreatment {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<NullValueTreatmentEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<NullValueTreatmentEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
};diesel_derives::AsExpression)]
225 #[diesel(sql_type = NullValueTreatmentEnum)]
226 #[allow(clippy::enum_variant_names)]
227 pub enum NullValueTreatment {
228 RaiseException,
230 UseJsonNull,
232 DeleteKey,
234 ReturnTarget,
236 }
237
238 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for RangeBoundEnum {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "RangeBoundEnum")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RangeBoundEnum {
#[inline]
fn clone(&self) -> RangeBoundEnum { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for RangeBoundEnum { }Copy, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for RangeBoundEnum {
type QueryId = RangeBoundEnum<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for RangeBoundEnum {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for RangeBoundEnum {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<RangeBoundEnum> for diesel::pg::Pg
{
fn metadata(lookup: &mut Self::MetadataLookup) -> PgTypeMetadata {
lookup.lookup_type("text", None)
}
}
};SqlType)]
241 #[cfg(feature = "postgres_backend")]
242 #[diesel(postgres_type(name = "text"))]
243 pub struct RangeBoundEnum;
244
245 #[derive(#[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::fmt::Debug for RangeBound {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
RangeBound::LowerBoundInclusiveUpperBoundInclusive =>
"LowerBoundInclusiveUpperBoundInclusive",
RangeBound::LowerBoundInclusiveUpperBoundExclusive =>
"LowerBoundInclusiveUpperBoundExclusive",
RangeBound::LowerBoundExclusiveUpperBoundInclusive =>
"LowerBoundExclusiveUpperBoundInclusive",
RangeBound::LowerBoundExclusiveUpperBoundExclusive =>
"LowerBoundExclusiveUpperBoundExclusive",
})
}
}Debug, #[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::clone::Clone for RangeBound {
#[inline]
fn clone(&self) -> RangeBound { *self }
}Clone, #[automatically_derived]
#[allow(clippy::enum_variant_names)]
impl ::core::marker::Copy for RangeBound { }Copy, const _: () =
{
use diesel;
impl<'__expr> diesel::expression::AsExpression<RangeBoundEnum> for
&'__expr RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<RangeBoundEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<RangeBoundEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr>
diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>
for &'__expr RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<RangeBoundEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr, '__expr2>
diesel::expression::AsExpression<RangeBoundEnum> for
&'__expr2 &'__expr RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<RangeBoundEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<RangeBoundEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<'__expr, '__expr2>
diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>
for &'__expr2 &'__expr RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<RangeBoundEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl<__DB>
diesel::serialize::ToSql<diesel::sql_types::Nullable<RangeBoundEnum>,
__DB> for RangeBound where __DB: diesel::backend::Backend,
Self: diesel::serialize::ToSql<RangeBoundEnum, __DB> {
fn to_sql<'__b>(&'__b self,
out: &mut diesel::serialize::Output<'__b, '_, __DB>)
-> diesel::serialize::Result {
diesel::serialize::ToSql::<RangeBoundEnum,
__DB>::to_sql(self, out)
}
}
impl diesel::expression::AsExpression<RangeBoundEnum> for RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<RangeBoundEnum,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<RangeBoundEnum>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
impl diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>
for RangeBound {
type Expression =
diesel::internal::derives::as_expression::Bound<diesel::sql_types::Nullable<RangeBoundEnum>,
Self>;
fn as_expression(self)
->
<Self as
diesel::expression::AsExpression<diesel::sql_types::Nullable<RangeBoundEnum>>>::Expression {
diesel::internal::derives::as_expression::Bound::new(self)
}
}
};diesel_derives::AsExpression)]
248 #[diesel(sql_type = RangeBoundEnum)]
249 #[allow(clippy::enum_variant_names)]
250 pub enum RangeBound {
251 LowerBoundInclusiveUpperBoundInclusive,
253 LowerBoundInclusiveUpperBoundExclusive,
255 LowerBoundExclusiveUpperBoundInclusive,
257 LowerBoundExclusiveUpperBoundExclusive,
259 }
260
261 #[cfg(feature = "postgres_backend")]
300 #[derive(#[automatically_derived]
impl<ST: ::core::fmt::Debug + 'static> ::core::fmt::Debug for Record<ST> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Record",
&&self.0)
}
}Debug, #[automatically_derived]
impl<ST: ::core::clone::Clone + 'static> ::core::clone::Clone for Record<ST> {
#[inline]
fn clone(&self) -> Record<ST> {
Record(::core::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
impl<ST: ::core::marker::Copy + 'static> ::core::marker::Copy for Record<ST> {
}Copy, #[automatically_derived]
impl<ST: ::core::default::Default + 'static> ::core::default::Default for
Record<ST> {
#[inline]
fn default() -> Record<ST> { Record(::core::default::Default::default()) }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl<ST: 'static + diesel::query_builder::QueryId>
diesel::query_builder::QueryId for Record<ST> {
type QueryId =
Record<<ST as diesel::query_builder::QueryId>::QueryId>;
const HAS_STATIC_QUERY_ID: bool =
<ST as diesel::query_builder::QueryId>::HAS_STATIC_QUERY_ID &&
true;
const IS_WINDOW_FUNCTION: bool =
<ST as diesel::query_builder::QueryId>::IS_WINDOW_FUNCTION ||
false;
}
};QueryId, const _: () =
{
use diesel;
impl<ST: 'static> diesel::sql_types::SqlType for Record<ST> {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl<ST: 'static> diesel::sql_types::SingleValue for Record<ST> {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl<ST: 'static> diesel::sql_types::HasSqlType<Record<ST>> for
diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(2249, 2287)
}
}
};SqlType)]
301 #[diesel(postgres_type(oid = 2249, array_oid = 2287))]
302 pub struct Record<ST: 'static>(ST);
303
304 #[cfg(feature = "postgres_backend")]
306 pub type SmallSerial = crate::sql_types::SmallInt;
307
308 #[cfg(feature = "postgres_backend")]
310 pub type Serial = crate::sql_types::Integer;
311
312 #[cfg(feature = "postgres_backend")]
314 pub type BigSerial = crate::sql_types::BigInt;
315
316 #[cfg(feature = "postgres_backend")]
331 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Uuid {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Uuid")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Uuid {
#[inline]
fn clone(&self) -> Uuid { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Uuid { }Copy, #[automatically_derived]
impl ::core::default::Default for Uuid {
#[inline]
fn default() -> Uuid { Uuid {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Uuid {
type QueryId = Uuid<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Uuid {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Uuid {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Uuid> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(2950, 2951)
}
}
};SqlType)]
332 #[diesel(postgres_type(oid = 2950, array_oid = 2951))]
333 pub struct Uuid;
334
335 pub type Bytea = crate::sql_types::Binary;
337
338 #[doc(hidden)]
339 pub type Bpchar = crate::sql_types::VarChar;
340
341 #[cfg(feature = "postgres_backend")]
386 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Money {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Money")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Money {
#[inline]
fn clone(&self) -> Money { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Money { }Copy, #[automatically_derived]
impl ::core::default::Default for Money {
#[inline]
fn default() -> Money { Money {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Money {
type QueryId = Money<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Money {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Money {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Money> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(790, 791)
}
}
};SqlType)]
387 #[diesel(postgres_type(oid = 790, array_oid = 791))]
388 pub struct Money;
389
390 #[cfg(feature = "postgres_backend")]
431 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for MacAddr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MacAddr")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MacAddr {
#[inline]
fn clone(&self) -> MacAddr { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MacAddr { }Copy, #[automatically_derived]
impl ::core::default::Default for MacAddr {
#[inline]
fn default() -> MacAddr { MacAddr {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for MacAddr {
type QueryId = MacAddr<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for MacAddr {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for MacAddr {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<MacAddr> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(829, 1040)
}
}
};SqlType)]
432 #[diesel(postgres_type(oid = 829, array_oid = 1040))]
433 pub struct MacAddr;
434
435 pub type Macaddr = MacAddr;
437
438 #[cfg(feature = "postgres_backend")]
482 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for MacAddr8 {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MacAddr8")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MacAddr8 {
#[inline]
fn clone(&self) -> MacAddr8 { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MacAddr8 { }Copy, #[automatically_derived]
impl ::core::default::Default for MacAddr8 {
#[inline]
fn default() -> MacAddr8 { MacAddr8 {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for MacAddr8 {
type QueryId = MacAddr8<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for MacAddr8 {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for MacAddr8 {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<MacAddr8> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(774, 775)
}
}
};SqlType)]
483 #[diesel(postgres_type(oid = 774, array_oid = 775))]
484 pub struct MacAddr8;
485
486 pub type Macaddr8 = MacAddr8;
488
489 #[cfg_attr(
493 feature = "network-address",
494 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
495 )]
496 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
497 #[cfg_attr(
498 not(any(feature = "network-address", feature = "ipnet-address")),
499 doc = "N/A"
500 )]
501 #[cfg_attr(
504 feature = "network-address",
505 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
506 )]
507 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
508 #[cfg_attr(
509 not(any(feature = "network-address", feature = "ipnet-address")),
510 doc = "N/A"
511 )]
512 #[cfg_attr(
516 feature = "network-address",
517 doc = " [IpNetwork]: ipnetwork::IpNetwork"
518 )]
519 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
520 #[cfg(feature = "postgres_backend")]
557 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Inet {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Inet")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Inet {
#[inline]
fn clone(&self) -> Inet { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Inet { }Copy, #[automatically_derived]
impl ::core::default::Default for Inet {
#[inline]
fn default() -> Inet { Inet {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Inet {
type QueryId = Inet<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Inet {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Inet {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Inet> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(869, 1041)
}
}
};SqlType)]
558 #[diesel(postgres_type(oid = 869, array_oid = 1041))]
559 pub struct Inet;
560
561 #[cfg_attr(
565 feature = "network-address",
566 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
567 )]
568 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
569 #[cfg_attr(
570 not(any(feature = "network-address", feature = "ipnet-address")),
571 doc = "N/A"
572 )]
573 #[cfg_attr(
576 feature = "network-address",
577 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
578 )]
579 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
580 #[cfg_attr(
581 not(any(feature = "network-address", feature = "ipnet-address")),
582 doc = "N/A"
583 )]
584 #[cfg_attr(
588 feature = "network-address",
589 doc = " [IpNetwork]: ipnetwork::IpNetwork"
590 )]
591 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
592 #[cfg(feature = "postgres_backend")]
628 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Cidr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Cidr")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Cidr {
#[inline]
fn clone(&self) -> Cidr { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Cidr { }Copy, #[automatically_derived]
impl ::core::default::Default for Cidr {
#[inline]
fn default() -> Cidr { Cidr {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Cidr {
type QueryId = Cidr<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Cidr {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Cidr {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Cidr> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(650, 651)
}
}
};SqlType)]
629 #[diesel(postgres_type(oid = 650, array_oid = 651))]
630 pub struct Cidr;
631
632 #[cfg(feature = "postgres_backend")]
649 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for CChar {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "CChar")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CChar {
#[inline]
fn clone(&self) -> CChar { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for CChar { }Copy, #[automatically_derived]
impl ::core::default::Default for CChar {
#[inline]
fn default() -> CChar { CChar {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for CChar {
type QueryId = CChar<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for CChar {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for CChar {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<CChar> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(18, 1002)
}
}
};SqlType)]
650 #[diesel(postgres_type(oid = 18, array_oid = 1002))]
651 pub struct CChar;
652
653 #[cfg(feature = "postgres_backend")]
670 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Citext {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Citext")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Citext {
#[inline]
fn clone(&self) -> Citext { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Citext { }Copy, #[automatically_derived]
impl ::core::default::Default for Citext {
#[inline]
fn default() -> Citext { Citext {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Citext {
type QueryId = Citext<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Citext {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Citext {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<Citext> for diesel::pg::Pg {
fn metadata(lookup: &mut Self::MetadataLookup) -> PgTypeMetadata {
lookup.lookup_type("citext", None)
}
}
};SqlType)]
671 #[diesel(postgres_type(name = "citext"))]
672 pub struct Citext;
673
674 #[cfg(feature = "postgres_backend")]
689 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for PgLsn {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "PgLsn")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for PgLsn {
#[inline]
fn clone(&self) -> PgLsn { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for PgLsn { }Copy, #[automatically_derived]
impl ::core::default::Default for PgLsn {
#[inline]
fn default() -> PgLsn { PgLsn {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for PgLsn {
type QueryId = PgLsn<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for PgLsn {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for PgLsn {}
use diesel::pg::{PgMetadataLookup, PgTypeMetadata};
impl diesel::sql_types::HasSqlType<PgLsn> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata {
PgTypeMetadata::new(3220, 3221)
}
}
};SqlType)]
690 #[diesel(postgres_type(oid = 3220, array_oid = 3221))]
691 pub struct PgLsn;
692
693 #[doc(inline)]
694 pub use crate::sql_types::Jsonb;
695}
696
697mod ops {
698 use super::sql_types::*;
699 use crate::sql_types::ops::*;
700 use crate::sql_types::{Bigint, Interval};
701
702 impl Add for Timestamptz {
703 type Rhs = Interval;
704 type Output = Timestamptz;
705 }
706
707 impl Sub for Timestamptz {
708 type Rhs = Interval;
709 type Output = Timestamptz;
710 }
711
712 impl Add for Cidr {
713 type Rhs = Bigint;
714 type Output = Inet;
715 }
716
717 impl Add for Inet {
718 type Rhs = Bigint;
719 type Output = Inet;
720 }
721
722 impl Sub for Cidr {
723 type Rhs = Bigint;
724 type Output = Inet;
725 }
726
727 impl Sub for Inet {
728 type Rhs = Bigint;
729 type Output = Inet;
730 }
731}