Cond class

A condition: what Cond.or, Cond.and, Cond.not, Cond.raw and Cond.cmp make. A Map is one too, the JS builder's object condition: each field's value is equality, null is is null, and a map is its operators -- {'year': {'gte': 2024}} -- in the map's order, which is the text's.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

and(List<Object> conds) → Cond
Joins conditions with and: where already ands, so this is only needed inside or.
cmp(String field, String op, Object? value) → Cond
One comparison, where's three arguments as a condition.
not(Object cond) → Cond
Negates a condition.
or(List<Object> conds) → Cond
Joins conditions with or; a map is an object condition.
raw(String sql, [List<Object?> params = const []]) → Cond
What the builder cannot express (a function call): each ? is bound to the next parameter -- a literal ? goes in as one too. Cond.raw('cosine(embed, ?) > ?', [vector, 0.5])