Field<TEntity, TValue> class

Represents a field in a Zorphy entity TEntity with value type TValue. Used for type-safe query construction and runtime evaluation.

Available extensions
Annotations

Constructors

Field(String name, [TValue getValue(TEntity)?])
Creates a field descriptor with optional value extractor.
const

Properties

getValue → TValue Function(TEntity)?
Function to extract the field value from an entity instance. Optional, but required for in-memory filtering/sorting.
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asc() Sort<TEntity>

Available on Field<TEntity, TValue>, provided by the FieldSortOps extension

Builds an ascending sort for this field.
contains(String value) Contains<TEntity, String?>

Available on Field<TEntity, String?>, provided by the NullableStringFieldOps extension

Builds a contains filter for nullable string fields.
contains(String value) Contains<TEntity, String>

Available on Field<TEntity, String>, provided by the StringFieldOps extension

Builds a contains filter for string fields.
desc() Sort<TEntity>

Available on Field<TEntity, TValue>, provided by the FieldSortOps extension

Builds a descending sort for this field.
eq(TValue value) Eq<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds an equality filter for this field.
filter(Filter filter) Nested<TEntity, List<TElement>>

Available on Field<TEntity, List<TElement>>, provided by the CollectionFieldOps extension

Builds a nested filter for a collection field.
filter(Filter filter) Nested<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds a nested filter for this field.
gt(TValue value) Gt<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds a greater-than filter for this field.
gte(TValue value) Gte<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds a greater-than-or-equal filter for this field.
has(TElement value) Has<TEntity, TElement>

Available on Field<TEntity, List<TElement>>, provided by the CollectionFieldOps extension

Builds a has filter that matches when the list contains value.
isIn(List<TValue> values) InList<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds an inclusion filter for this field.
lt(TValue value) Lt<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds a less-than filter for this field.
lte(TValue value) Lte<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds a less-than-or-equal filter for this field.
neq(TValue value) Neq<TEntity, TValue>

Available on Field<TEntity, TValue>, provided by the FieldOps extension

Builds an inequality filter for this field.
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