sea_query/extension/postgres/
mod.rs

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