ZorphyField<T, V> class final

A typed accessor and query handle for one value V inside an entity T.

Available extensions

Constructors

ZorphyField({required String name, required String jsonKey, required String pointer, required V get(T instance), required T set(T instance, V value)})
const

Properties

asObject → ZorphyField<T, Object?>
This field with its value type erased to Object, so it can sit in a heterogeneous <Entity>Fields.all registry and still be WRITTEN through.
no setter
get → V Function(T instance)
Reads the field value out of instance.
final
hashCode → int
The hash code for this object.
no setterinherited
jsonKey → String
The wire key the generated codec reads and writes — the v3 wire key IS the field name.
final
lens → ZorphyLens<T, V>
This field as a lens over the entity — the lens layer's accessor, unchanged.
no setter
name → String
The field name, exactly as declared on the entity.
final
pointer → String
The RFC 6901 JSON Pointer addressing the field on the wire (e.g. /price).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
set → T Function(T instance, V value)
Returns a copy of instance with only this field replaced by value.
final

Methods

asc() → ZorphySort<T>
An ascending order over this field.
contains(String substring, {bool caseSensitive = true}) → ZorphyFilter<T>

Available on ZorphyField<T, String>, provided by the ZorphyStringFieldX extension

Matches when the field contains substring.
desc() → ZorphySort<T>
A descending order over this field.
equals(V value) → ZorphyFilter<T>
Matches when the field equals value.
greaterThan(V value) → ZorphyFilter<T>

Available on ZorphyField<T, V>, provided by the ZorphyComparableFieldX extension

Matches when the field orders after value.
greaterThanOrEqual(V value) → ZorphyFilter<T>

Available on ZorphyField<T, V>, provided by the ZorphyComparableFieldX extension

Matches when the field orders after or at value.
isIn(Iterable<V> values) → ZorphyFilter<T>
Matches when the field is one of values.
isNotNull() → ZorphyFilter<T>
Matches when the field is present (non-null at runtime).
isNull() → ZorphyFilter<T>
Matches when the field is absent (null at runtime).
lessThan(V value) → ZorphyFilter<T>

Available on ZorphyField<T, V>, provided by the ZorphyComparableFieldX extension

Matches when the field orders before value.
lessThanOrEqual(V value) → ZorphyFilter<T>

Available on ZorphyField<T, V>, provided by the ZorphyComparableFieldX extension

Matches when the field orders before or at value.
list(ListQueryParams<TValue> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, TValue>, provided by the NestedFilterToQueryExtension extension

Filters TEntitys by a ListQueryParams over the nested TValue.
list(ListQueryParams<TElement> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, List<TElement>>, provided by the NestedIterableFilterToQueryExtension extension

list(ListQueryParams<TElement> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, List<TElement>?>, provided by the NestedNullableIterableFilterToQueryExtension extension

nested(ZorphyFilter inner) → ZorphyFilter<T>
Matches when this field's value — or any element of it, when the value is an Iterable — matches inner, a predicate over the nested value (issue #303).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(V value) → ZorphyFilter<T>
Matches when the field differs from value.
query(QueryParams<TValue> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, TValue>, provided by the NestedFilterToQueryExtension extension

Filters TEntitys by a QueryParams over the nested TValue.
query(QueryParams<TElement> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, List<TElement>>, provided by the NestedIterableFilterToQueryExtension extension

query(QueryParams<TElement> query) → ZorphyFilter<TEntity>

Available on ZorphyField<TEntity, List<TElement>?>, provided by the NestedNullableIterableFilterToQueryExtension extension

startsWith(String prefix) → ZorphyFilter<T>

Available on ZorphyField<T, String>, provided by the ZorphyStringFieldX extension

Matches when the field starts with prefix.
toString() → String
A string representation of this object.
override

Operators

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