1#[doc(hidden)]
4pub(in crate::pg) mod array;
5#[doc(hidden)]
6pub(in crate::pg) mod date_and_time;
7mod enum_;
8#[doc(hidden)]
9pub(in crate::pg) mod floats;
10mod integers;
11#[cfg(feature = "ipnet-address")]
12mod ipnet_address;
13#[cfg(feature = "serde_json")]
14mod json;
15mod json_function_enum;
16mod mac_addr;
17mod mac_addr_8;
18#[doc(hidden)]
19pub(in crate::pg) mod money;
20mod multirange;
21#[cfg(feature = "network-address")]
22mod network_address;
23mod numeric;
24pub(in crate::pg) mod pg_lsn;
25mod primitives;
26mod ranges;
27mod record;
28#[cfg(feature = "uuid")]
29mod uuid;
30
31pub mod sql_types {
35 use crate::query_builder::QueryId;
36 use crate::sql_types::SqlType;
37
38 #[cfg(feature = "postgres_backend")]
53 #[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 {}
impl diesel::sql_types::HasSqlType<Oid> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(26, 1028)
}
}
};SqlType)]
54 #[diesel(postgres_type(oid = 26, array_oid = 1028))]
55 pub struct Oid;
56
57 #[cfg_attr(
81 feature = "chrono",
82 doc = " [`chrono::NaiveDateTime`]: chrono::naive::NaiveDateTime"
83 )]
84 #[cfg_attr(
85 not(feature = "chrono"),
86 doc = " [`chrono::NaiveDateTime`]: https://docs.rs/chrono/0.4.19/chrono/naive/struct.NaiveDateTime.html"
87 )]
88 #[cfg_attr(feature = "chrono", doc = " [`chrono::DateTime`]: chrono::DateTime")]
89 #[cfg_attr(
90 not(feature = "chrono"),
91 doc = " [`chrono::DateTime`]: https://docs.rs/chrono/0.4.19/chrono/struct.DateTime.html"
92 )]
93 #[cfg_attr(
94 feature = "time",
95 doc = " [`time::PrimitiveDateTime`]: time::PrimitiveDateTime"
96 )]
97 #[cfg_attr(
98 not(feature = "time"),
99 doc = " [`time::PrimitiveDateTime`]: https://docs.rs/time/0.3.9/time/struct.PrimitiveDateTime.html"
100 )]
101 #[cfg_attr(
102 feature = "time",
103 doc = " [`time::OffsetDateTime`]: time::OffsetDateTime"
104 )]
105 #[cfg_attr(
106 not(feature = "time"),
107 doc = " [`time::OffsetDateTime`]: https://docs.rs/time/0.3.9/time/struct.OffsetDateTime.html"
108 )]
109 #[cfg(feature = "postgres_backend")]
110 #[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 {}
impl diesel::sql_types::HasSqlType<Timestamptz> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(1184, 1185)
}
}
};SqlType)]
111 #[diesel(postgres_type(oid = 1184, array_oid = 1185))]
112 pub struct Timestamptz;
113
114 #[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)]
134 #[cfg(feature = "postgres_backend")]
135 pub struct Array<ST: 'static>(ST);
136
137 #[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)]
164 #[cfg(feature = "postgres_backend")]
165 pub struct Range<ST: 'static>(ST);
166
167 #[doc(hidden)]
168 pub type Int4range = Range<crate::sql_types::Int4>;
169 #[doc(hidden)]
170 pub type Int8range = Range<crate::sql_types::Int8>;
171 #[doc(hidden)]
172 pub type Daterange = Range<crate::sql_types::Date>;
173 #[doc(hidden)]
174 pub type Numrange = Range<crate::sql_types::Numeric>;
175 #[doc(hidden)]
176 pub type Tsrange = Range<crate::sql_types::Timestamp>;
177 #[doc(hidden)]
178 pub type Tstzrange = Range<crate::sql_types::Timestamptz>;
179
180 #[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)]
199 #[cfg(feature = "postgres_backend")]
200 pub struct Multirange<ST: 'static>(ST);
201
202 #[doc(hidden)]
203 pub type Int4multirange = Multirange<crate::sql_types::Int4>;
204 #[doc(hidden)]
205 pub type Int8multirange = Multirange<crate::sql_types::Int8>;
206 #[doc(hidden)]
207 pub type Datemultirange = Multirange<crate::sql_types::Date>;
208 #[doc(hidden)]
209 pub type Nummultirange = Multirange<crate::sql_types::Numeric>;
210 #[doc(hidden)]
211 pub type Tsmultirange = Multirange<crate::sql_types::Timestamp>;
212 #[doc(hidden)]
213 pub type Tstzmultirange = Multirange<crate::sql_types::Timestamptz>;
214
215 #[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 {}
impl diesel::sql_types::HasSqlType<NullValueTreatmentEnum> for
diesel::pg::Pg {
fn metadata(lookup: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
use diesel::pg::PgMetadataLookup;
lookup.lookup_type("text", None)
}
}
};SqlType)]
219 #[cfg(feature = "postgres_backend")]
220 #[diesel(postgres_type(name = "text"))]
221 pub struct NullValueTreatmentEnum;
222
223 #[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)
}
}
#[diagnostic::do_not_recommend]
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)
}
}
#[diagnostic::do_not_recommend]
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)
}
}
#[diagnostic::do_not_recommend]
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)]
227 #[diesel(sql_type = NullValueTreatmentEnum)]
228 #[allow(clippy::enum_variant_names)]
229 pub enum NullValueTreatment {
230 RaiseException,
232 UseJsonNull,
234 DeleteKey,
236 ReturnTarget,
238 }
239
240 #[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 {}
impl diesel::sql_types::HasSqlType<RangeBoundEnum> for diesel::pg::Pg
{
fn metadata(lookup: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
use diesel::pg::PgMetadataLookup;
lookup.lookup_type("text", None)
}
}
};SqlType)]
243 #[cfg(feature = "postgres_backend")]
244 #[diesel(postgres_type(name = "text"))]
245 pub struct RangeBoundEnum;
246
247 #[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)
}
}
#[diagnostic::do_not_recommend]
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)
}
}
#[diagnostic::do_not_recommend]
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)
}
}
#[diagnostic::do_not_recommend]
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)]
250 #[diesel(sql_type = RangeBoundEnum)]
251 #[allow(clippy::enum_variant_names)]
252 pub enum RangeBound {
253 LowerBoundInclusiveUpperBoundInclusive,
255 LowerBoundInclusiveUpperBoundExclusive,
257 LowerBoundExclusiveUpperBoundInclusive,
259 LowerBoundExclusiveUpperBoundExclusive,
261 }
262
263 #[cfg(feature = "postgres_backend")]
302 #[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> {}
impl<ST: 'static> diesel::sql_types::HasSqlType<Record<ST>> for
diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(2249, 2287)
}
}
};SqlType)]
303 #[diesel(postgres_type(oid = 2249, array_oid = 2287))]
304 pub struct Record<ST: 'static>(ST);
305
306 #[cfg(feature = "postgres_backend")]
308 pub type SmallSerial = crate::sql_types::SmallInt;
309
310 #[cfg(feature = "postgres_backend")]
312 pub type Serial = crate::sql_types::Integer;
313
314 #[cfg(feature = "postgres_backend")]
316 pub type BigSerial = crate::sql_types::BigInt;
317
318 #[cfg(feature = "postgres_backend")]
333 #[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 {}
impl diesel::sql_types::HasSqlType<Uuid> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(2950, 2951)
}
}
};SqlType)]
334 #[diesel(postgres_type(oid = 2950, array_oid = 2951))]
335 pub struct Uuid;
336
337 pub type Bytea = crate::sql_types::Binary;
339
340 #[doc(hidden)]
341 #[cfg(feature = "postgres_backend")]
342 #[derive(#[automatically_derived]
impl ::core::fmt::Debug for Bpchar {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Bpchar")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Bpchar {
#[inline]
fn clone(&self) -> Bpchar { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Bpchar { }Copy, #[automatically_derived]
impl ::core::default::Default for Bpchar {
#[inline]
fn default() -> Bpchar { Bpchar {} }
}Default, const _: () =
{
use diesel;
#[allow(non_camel_case_types)]
impl diesel::query_builder::QueryId for Bpchar {
type QueryId = Bpchar<>;
const HAS_STATIC_QUERY_ID: bool = true;
const IS_WINDOW_FUNCTION: bool = false;
}
};QueryId, const _: () =
{
use diesel;
impl diesel::sql_types::SqlType for Bpchar {
type IsNull = diesel::sql_types::is_nullable::NotNull;
const IS_ARRAY: bool = false;
}
impl diesel::sql_types::SingleValue for Bpchar {}
impl diesel::sql_types::HasSqlType<Bpchar> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(1042, 1014)
}
}
};SqlType)]
343 #[diesel(postgres_type(oid = 1042, array_oid = 1014))]
344 pub struct Bpchar;
345
346 #[cfg(feature = "postgres_backend")]
391 #[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 {}
impl diesel::sql_types::HasSqlType<Money> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(790, 791)
}
}
};SqlType)]
392 #[diesel(postgres_type(oid = 790, array_oid = 791))]
393 pub struct Money;
394
395 #[cfg(feature = "postgres_backend")]
436 #[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 {}
impl diesel::sql_types::HasSqlType<MacAddr> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(829, 1040)
}
}
};SqlType)]
437 #[diesel(postgres_type(oid = 829, array_oid = 1040))]
438 pub struct MacAddr;
439
440 pub type Macaddr = MacAddr;
442
443 #[cfg(feature = "postgres_backend")]
487 #[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 {}
impl diesel::sql_types::HasSqlType<MacAddr8> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(774, 775)
}
}
};SqlType)]
488 #[diesel(postgres_type(oid = 774, array_oid = 775))]
489 pub struct MacAddr8;
490
491 pub type Macaddr8 = MacAddr8;
493
494 #[cfg_attr(
498 feature = "network-address",
499 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
500 )]
501 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
502 #[cfg_attr(
503 not(any(feature = "network-address", feature = "ipnet-address")),
504 doc = "N/A"
505 )]
506 #[cfg_attr(
509 feature = "network-address",
510 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
511 )]
512 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
513 #[cfg_attr(
514 not(any(feature = "network-address", feature = "ipnet-address")),
515 doc = "N/A"
516 )]
517 #[cfg_attr(
521 feature = "network-address",
522 doc = " [IpNetwork]: ipnetwork::IpNetwork"
523 )]
524 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
525 #[cfg(feature = "postgres_backend")]
562 #[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 {}
impl diesel::sql_types::HasSqlType<Inet> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(869, 1041)
}
}
};SqlType)]
563 #[diesel(postgres_type(oid = 869, array_oid = 1041))]
564 pub struct Inet;
565
566 #[cfg_attr(
570 feature = "network-address",
571 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
572 )]
573 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
574 #[cfg_attr(
575 not(any(feature = "network-address", feature = "ipnet-address")),
576 doc = "N/A"
577 )]
578 #[cfg_attr(
581 feature = "network-address",
582 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
583 )]
584 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
585 #[cfg_attr(
586 not(any(feature = "network-address", feature = "ipnet-address")),
587 doc = "N/A"
588 )]
589 #[cfg_attr(
593 feature = "network-address",
594 doc = " [IpNetwork]: ipnetwork::IpNetwork"
595 )]
596 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
597 #[cfg(feature = "postgres_backend")]
633 #[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 {}
impl diesel::sql_types::HasSqlType<Cidr> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(650, 651)
}
}
};SqlType)]
634 #[diesel(postgres_type(oid = 650, array_oid = 651))]
635 pub struct Cidr;
636
637 #[cfg(feature = "postgres_backend")]
654 #[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 {}
impl diesel::sql_types::HasSqlType<CChar> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(18, 1002)
}
}
};SqlType)]
655 #[diesel(postgres_type(oid = 18, array_oid = 1002))]
656 pub struct CChar;
657
658 #[cfg(feature = "postgres_backend")]
675 #[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 {}
impl diesel::sql_types::HasSqlType<Citext> for diesel::pg::Pg {
fn metadata(lookup: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
use diesel::pg::PgMetadataLookup;
lookup.lookup_type("citext", None)
}
}
};SqlType)]
676 #[diesel(postgres_type(name = "citext"))]
677 pub struct Citext;
678
679 #[cfg(feature = "postgres_backend")]
694 #[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 {}
impl diesel::sql_types::HasSqlType<PgLsn> for diesel::pg::Pg {
fn metadata(_: &mut Self::MetadataLookup)
-> diesel::pg::PgTypeMetadata {
diesel::pg::PgTypeMetadata::new(3220, 3221)
}
}
};SqlType)]
695 #[diesel(postgres_type(oid = 3220, array_oid = 3221))]
696 pub struct PgLsn;
697
698 #[doc(inline)]
699 pub use crate::sql_types::Jsonb;
700}
701
702mod ops {
703 use super::sql_types::*;
704 use crate::sql_types::ops::*;
705 use crate::sql_types::{Bigint, Interval};
706
707 impl Add for Timestamptz {
708 type Rhs = Interval;
709 type Output = Timestamptz;
710 }
711
712 impl Sub for Timestamptz {
713 type Rhs = Interval;
714 type Output = Timestamptz;
715 }
716
717 impl Add for Cidr {
718 type Rhs = Bigint;
719 type Output = Inet;
720 }
721
722 impl Add for Inet {
723 type Rhs = Bigint;
724 type Output = Inet;
725 }
726
727 impl Sub for Cidr {
728 type Rhs = Bigint;
729 type Output = Inet;
730 }
731
732 impl Sub for Inet {
733 type Rhs = Bigint;
734 type Output = Inet;
735 }
736}