1#[doc(hidden)]
4pub(in crate::pg) mod array;
5#[doc(hidden)]
6pub(in crate::pg) mod date_and_time;
7#[doc(hidden)]
8pub(in crate::pg) mod floats;
9mod integers;
10#[cfg(feature = "ipnet-address")]
11mod ipnet_address;
12#[cfg(feature = "serde_json")]
13mod json;
14mod json_function_enum;
15mod mac_addr;
16mod mac_addr_8;
17#[doc(hidden)]
18pub(in crate::pg) mod money;
19mod multirange;
20#[cfg(feature = "network-address")]
21mod network_address;
22mod numeric;
23pub(in crate::pg) mod pg_lsn;
24mod primitives;
25mod ranges;
26mod record;
27#[cfg(feature = "uuid")]
28mod uuid;
29
30pub mod sql_types {
34 use crate::query_builder::QueryId;
35 use crate::sql_types::SqlType;
36
37 #[cfg(feature = "postgres_backend")]
52 #[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)]
53 #[diesel(postgres_type(oid = 26, array_oid = 1028))]
54 pub struct Oid;
55
56 #[cfg_attr(
80 feature = "chrono",
81 doc = " [`chrono::NaiveDateTime`]: chrono::naive::NaiveDateTime"
82 )]
83 #[cfg_attr(
84 not(feature = "chrono"),
85 doc = " [`chrono::NaiveDateTime`]: https://docs.rs/chrono/0.4.19/chrono/naive/struct.NaiveDateTime.html"
86 )]
87 #[cfg_attr(feature = "chrono", doc = " [`chrono::DateTime`]: chrono::DateTime")]
88 #[cfg_attr(
89 not(feature = "chrono"),
90 doc = " [`chrono::DateTime`]: https://docs.rs/chrono/0.4.19/chrono/struct.DateTime.html"
91 )]
92 #[cfg_attr(
93 feature = "time",
94 doc = " [`time::PrimitiveDateTime`]: time::PrimitiveDateTime"
95 )]
96 #[cfg_attr(
97 not(feature = "time"),
98 doc = " [`time::PrimitiveDateTime`]: https://docs.rs/time/0.3.9/time/struct.PrimitiveDateTime.html"
99 )]
100 #[cfg_attr(
101 feature = "time",
102 doc = " [`time::OffsetDateTime`]: time::OffsetDateTime"
103 )]
104 #[cfg_attr(
105 not(feature = "time"),
106 doc = " [`time::OffsetDateTime`]: https://docs.rs/time/0.3.9/time/struct.OffsetDateTime.html"
107 )]
108 #[cfg(feature = "postgres_backend")]
109 #[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)]
110 #[diesel(postgres_type(oid = 1184, array_oid = 1185))]
111 pub struct Timestamptz;
112
113 #[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)]
133 #[cfg(feature = "postgres_backend")]
134 pub struct Array<ST: 'static>(ST);
135
136 #[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)]
163 #[cfg(feature = "postgres_backend")]
164 pub struct Range<ST: 'static>(ST);
165
166 #[doc(hidden)]
167 pub type Int4range = Range<crate::sql_types::Int4>;
168 #[doc(hidden)]
169 pub type Int8range = Range<crate::sql_types::Int8>;
170 #[doc(hidden)]
171 pub type Daterange = Range<crate::sql_types::Date>;
172 #[doc(hidden)]
173 pub type Numrange = Range<crate::sql_types::Numeric>;
174 #[doc(hidden)]
175 pub type Tsrange = Range<crate::sql_types::Timestamp>;
176 #[doc(hidden)]
177 pub type Tstzrange = Range<crate::sql_types::Timestamptz>;
178
179 #[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)]
198 #[cfg(feature = "postgres_backend")]
199 pub struct Multirange<ST: 'static>(ST);
200
201 #[doc(hidden)]
202 pub type Int4multirange = Multirange<crate::sql_types::Int4>;
203 #[doc(hidden)]
204 pub type Int8multirange = Multirange<crate::sql_types::Int8>;
205 #[doc(hidden)]
206 pub type Datemultirange = Multirange<crate::sql_types::Date>;
207 #[doc(hidden)]
208 pub type Nummultirange = Multirange<crate::sql_types::Numeric>;
209 #[doc(hidden)]
210 pub type Tsmultirange = Multirange<crate::sql_types::Timestamp>;
211 #[doc(hidden)]
212 pub type Tstzmultirange = Multirange<crate::sql_types::Timestamptz>;
213
214 #[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)]
218 #[cfg(feature = "postgres_backend")]
219 #[diesel(postgres_type(name = "text"))]
220 pub struct NullValueTreatmentEnum;
221
222 #[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)]
226 #[diesel(sql_type = NullValueTreatmentEnum)]
227 #[allow(clippy::enum_variant_names)]
228 pub enum NullValueTreatment {
229 RaiseException,
231 UseJsonNull,
233 DeleteKey,
235 ReturnTarget,
237 }
238
239 #[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)]
242 #[cfg(feature = "postgres_backend")]
243 #[diesel(postgres_type(name = "text"))]
244 pub struct RangeBoundEnum;
245
246 #[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)]
249 #[diesel(sql_type = RangeBoundEnum)]
250 #[allow(clippy::enum_variant_names)]
251 pub enum RangeBound {
252 LowerBoundInclusiveUpperBoundInclusive,
254 LowerBoundInclusiveUpperBoundExclusive,
256 LowerBoundExclusiveUpperBoundInclusive,
258 LowerBoundExclusiveUpperBoundExclusive,
260 }
261
262 #[cfg(feature = "postgres_backend")]
301 #[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)]
302 #[diesel(postgres_type(oid = 2249, array_oid = 2287))]
303 pub struct Record<ST: 'static>(ST);
304
305 #[cfg(feature = "postgres_backend")]
307 pub type SmallSerial = crate::sql_types::SmallInt;
308
309 #[cfg(feature = "postgres_backend")]
311 pub type Serial = crate::sql_types::Integer;
312
313 #[cfg(feature = "postgres_backend")]
315 pub type BigSerial = crate::sql_types::BigInt;
316
317 #[cfg(feature = "postgres_backend")]
332 #[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)]
333 #[diesel(postgres_type(oid = 2950, array_oid = 2951))]
334 pub struct Uuid;
335
336 pub type Bytea = crate::sql_types::Binary;
338
339 #[doc(hidden)]
340 pub type Bpchar = crate::sql_types::VarChar;
341
342 #[cfg(feature = "postgres_backend")]
387 #[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)]
388 #[diesel(postgres_type(oid = 790, array_oid = 791))]
389 pub struct Money;
390
391 #[cfg(feature = "postgres_backend")]
432 #[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)]
433 #[diesel(postgres_type(oid = 829, array_oid = 1040))]
434 pub struct MacAddr;
435
436 pub type Macaddr = MacAddr;
438
439 #[cfg(feature = "postgres_backend")]
483 #[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)]
484 #[diesel(postgres_type(oid = 774, array_oid = 775))]
485 pub struct MacAddr8;
486
487 pub type Macaddr8 = MacAddr8;
489
490 #[cfg_attr(
494 feature = "network-address",
495 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
496 )]
497 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
498 #[cfg_attr(
499 not(any(feature = "network-address", feature = "ipnet-address")),
500 doc = "N/A"
501 )]
502 #[cfg_attr(
505 feature = "network-address",
506 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
507 )]
508 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
509 #[cfg_attr(
510 not(any(feature = "network-address", feature = "ipnet-address")),
511 doc = "N/A"
512 )]
513 #[cfg_attr(
517 feature = "network-address",
518 doc = " [IpNetwork]: ipnetwork::IpNetwork"
519 )]
520 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
521 #[cfg(feature = "postgres_backend")]
558 #[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)]
559 #[diesel(postgres_type(oid = 869, array_oid = 1041))]
560 pub struct Inet;
561
562 #[cfg_attr(
566 feature = "network-address",
567 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
568 )]
569 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
570 #[cfg_attr(
571 not(any(feature = "network-address", feature = "ipnet-address")),
572 doc = "N/A"
573 )]
574 #[cfg_attr(
577 feature = "network-address",
578 doc = " - [`ipnetwork::IpNetwork`][IpNetwork]"
579 )]
580 #[cfg_attr(feature = "ipnet-address", doc = " - [`ipnet::IpNet`][IpNet]")]
581 #[cfg_attr(
582 not(any(feature = "network-address", feature = "ipnet-address")),
583 doc = "N/A"
584 )]
585 #[cfg_attr(
589 feature = "network-address",
590 doc = " [IpNetwork]: ipnetwork::IpNetwork"
591 )]
592 #[cfg_attr(feature = "ipnet-address", doc = " [IpNet]: ipnet::IpNet")]
593 #[cfg(feature = "postgres_backend")]
629 #[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)]
630 #[diesel(postgres_type(oid = 650, array_oid = 651))]
631 pub struct Cidr;
632
633 #[cfg(feature = "postgres_backend")]
650 #[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)]
651 #[diesel(postgres_type(oid = 18, array_oid = 1002))]
652 pub struct CChar;
653
654 #[cfg(feature = "postgres_backend")]
671 #[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)]
672 #[diesel(postgres_type(name = "citext"))]
673 pub struct Citext;
674
675 #[cfg(feature = "postgres_backend")]
690 #[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)]
691 #[diesel(postgres_type(oid = 3220, array_oid = 3221))]
692 pub struct PgLsn;
693
694 #[doc(inline)]
695 pub use crate::sql_types::Jsonb;
696}
697
698mod ops {
699 use super::sql_types::*;
700 use crate::sql_types::ops::*;
701 use crate::sql_types::{Bigint, Interval};
702
703 impl Add for Timestamptz {
704 type Rhs = Interval;
705 type Output = Timestamptz;
706 }
707
708 impl Sub for Timestamptz {
709 type Rhs = Interval;
710 type Output = Timestamptz;
711 }
712
713 impl Add for Cidr {
714 type Rhs = Bigint;
715 type Output = Inet;
716 }
717
718 impl Add for Inet {
719 type Rhs = Bigint;
720 type Output = Inet;
721 }
722
723 impl Sub for Cidr {
724 type Rhs = Bigint;
725 type Output = Inet;
726 }
727
728 impl Sub for Inet {
729 type Rhs = Bigint;
730 type Output = Inet;
731 }
732}