Skip to main content

BinOp

Enum BinOp 

Source
pub enum BinOp {
Show 29 variants Or, And, Eq, NotEq, IsDistinctFrom, IsNotDistinctFrom, Lt, LtEq, Gt, GtEq, Add, Sub, Mul, Div, L2Distance, InnerProduct, CosineDistance, Concat, JsonGet, JsonGetText, JsonGetPath, JsonGetPathText, JsonContains, TsMatch, InetContainedBy, InetContainedByEq, InetContains, InetContainsEq, InetOverlap,
}

Variants§

§

Or

§

And

§

Eq

§

NotEq

§

IsDistinctFrom

v7.9.27b — PG a IS DISTINCT FROM b / a IS NOT DISTINCT FROM b. NULL-safe equality: NULL IS NOT DISTINCT FROM NULL → true, NULL IS DISTINCT FROM NULL → false. The non-NULL behaviour matches <> / = exactly. Common in PG-style JOIN ON predicates and pg_dump output.

§

IsNotDistinctFrom

§

Lt

§

LtEq

§

Gt

§

GtEq

§

Add

§

Sub

§

Mul

§

Div

§

L2Distance

pgvector L2 (Euclidean) distance <->. Defined for two vector operands of equal dimension; engine returns Value::Float(d).

§

InnerProduct

pgvector inner-product <#> — returns -Σ aᵢ bᵢ so “smaller = more similar” remains true (matches pgvector’s published convention).

§

CosineDistance

pgvector cosine distance <=>1 - (a·b)/(|a| |b|).

§

Concat

SQL string concatenation ||. NULL propagates.

§

JsonGet

v4.14 json -> key — element access by string key (object) or integer index (array). Returns a JSON value.

§

JsonGetText

v4.14 json ->> key — same access, returns the result as TEXT (unwraps a top-level JSON string; renders other scalars as their canonical text).

§

JsonGetPath

v6.4.5 json #> path_text — walk the path encoded as a PG text array literal like '{a,0,b}'. Returns JSON.

§

JsonGetPathText

v6.4.5 json #>> path_text — same walk, returns TEXT.

§

JsonContains

v6.4.5 json @> sub_json — containment. Returns BOOL; true when every key/value in sub_json is structurally present in the left side. Matches PG semantics (top-level + recursive).

§

TsMatch

v7.12.2 tsvector @@ tsquery — FTS match. Returns BOOL; 3VL on NULL. Symmetric: PG also accepts tsquery @@ tsvector and engine eval normalises either ordering.

§

InetContainedBy

v7.17.0 Phase 3.P0-47 — PG INET / CIDR strict contained-in <<. LHS network is strictly inside RHS network (no equality).

§

InetContainedByEq

v7.17.0 Phase 3.P0-47 — PG INET / CIDR contained-in-or-equal <<=. LHS network ⊆ RHS network.

§

InetContains

v7.17.0 Phase 3.P0-47 — PG INET / CIDR strict contains >>. LHS network strictly contains RHS network.

§

InetContainsEq

v7.17.0 Phase 3.P0-47 — PG INET / CIDR contains-or-equal >>=. LHS network ⊇ RHS network.

§

InetOverlap

v7.17.0 Phase 3.P0-47 — PG INET / CIDR network overlap &&. True iff either network contains any address of the other.

Trait Implementations§

Source§

impl Clone for BinOp

Source§

fn clone(&self) -> BinOp

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BinOp

Source§

impl Debug for BinOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BinOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BinOp

Source§

impl PartialEq for BinOp

Source§

fn eq(&self, other: &BinOp) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BinOp

Auto Trait Implementations§

§

impl Freeze for BinOp

§

impl RefUnwindSafe for BinOp

§

impl Send for BinOp

§

impl Sync for BinOp

§

impl Unpin for BinOp

§

impl UnsafeUnpin for BinOp

§

impl UnwindSafe for BinOp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.