sea_query/extension/postgres/
mod.rs

1pub use expr::*;
2pub use extension::*;
3pub use func::*;
4pub use ltree::*;
5pub use types::*;
6
7use crate::types::BinOper;
8
9pub(crate) mod expr;
10pub(crate) mod extension;
11pub(crate) mod func;
12pub(crate) mod interval;
13pub(crate) mod ltree;
14pub(crate) mod types;
15
16/// Binary operator
17#[derive(Debug, Clone, Copy, PartialEq, Eq)]
18pub enum PgBinOper {
19    ILike,
20    NotILike,
21    Matches,
22    Contains,
23    Contained,
24    Concatenate,
25    Overlap,
26    Similarity,
27    WordSimilarity,
28    StrictWordSimilarity,
29    SimilarityDistance,
30    WordSimilarityDistance,
31    StrictWordSimilarityDistance,
32    /// `->`. Retrieves JSON field as JSON value.
33    GetJsonField,
34    /// `->>`. Retrieves JSON field and casts it to an appropriate SQL type.
35    CastJsonField,
36    /// `~` Regex operator.
37    Regex,
38    /// `~*`. Regex operator with case insensitive matching.
39    RegexCaseInsensitive,
40    #[cfg(feature = "postgres-vector")]
41    EuclideanDistance,
42    #[cfg(feature = "postgres-vector")]
43    NegativeInnerProduct,
44    #[cfg(feature = "postgres-vector")]
45    CosineDistance,
46}
47
48impl From<PgBinOper> for BinOper {
49    fn from(o: PgBinOper) -> Self {
50        Self::PgOperator(o)
51    }
52}