ZorphyField<T, V> class
final
A typed accessor and query handle for one value V inside an entity T.
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.allregistry 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
instancewith only this field replaced byvalue.final
Methods
-
asc(
) → ZorphySort< T> - An ascending order over this field.
-
contains(
String substring, {bool caseSensitive = true}) → ZorphyFilter< T> -
Available on ZorphyField<
Matches when the field containsT, String> , provided by the ZorphyStringFieldX extensionsubstring. -
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<
Matches when the field orders afterT, V> , provided by the ZorphyComparableFieldX extensionvalue. -
greaterThanOrEqual(
V value) → ZorphyFilter< T> -
Available on ZorphyField<
Matches when the field orders after or atT, V> , provided by the ZorphyComparableFieldX extensionvalue. -
isIn(
Iterable< V> values) → ZorphyFilter<T> -
Matches when the field is one of
values. -
isNotNull(
) → ZorphyFilter< T> -
Matches when the field is present (non-
nullat runtime). -
isNull(
) → ZorphyFilter< T> -
Matches when the field is absent (
nullat runtime). -
lessThan(
V value) → ZorphyFilter< T> -
Available on ZorphyField<
Matches when the field orders beforeT, V> , provided by the ZorphyComparableFieldX extensionvalue. -
lessThanOrEqual(
V value) → ZorphyFilter< T> -
Available on ZorphyField<
Matches when the field orders before or atT, V> , provided by the ZorphyComparableFieldX extensionvalue. -
list(
ListQueryParams< TValue> query) → ZorphyFilter<TEntity> -
Available on ZorphyField<
FiltersTEntity, TValue> , provided by the NestedFilterToQueryExtension extensionTEntitys by a ListQueryParams over the nestedTValue. -
list(
ListQueryParams< TElement> query) → ZorphyFilter<TEntity> -
Available on ZorphyField<
TEntity, List< , provided by the NestedIterableFilterToQueryExtension extensionTElement> > -
list(
ListQueryParams< TElement> query) → ZorphyFilter<TEntity> -
Available on ZorphyField<
TEntity, List< , provided by the NestedNullableIterableFilterToQueryExtension extensionTElement> ?> -
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<
FiltersTEntity, TValue> , provided by the NestedFilterToQueryExtension extensionTEntitys by a QueryParams over the nestedTValue. -
query(
QueryParams< TElement> query) → ZorphyFilter<TEntity> -
Available on ZorphyField<
TEntity, List< , provided by the NestedIterableFilterToQueryExtension extensionTElement> > -
query(
QueryParams< TElement> query) → ZorphyFilter<TEntity> -
Available on ZorphyField<
TEntity, List< , provided by the NestedNullableIterableFilterToQueryExtension extensionTElement> ?> -
startsWith(
String prefix) → ZorphyFilter< T> -
Available on ZorphyField<
Matches when the field starts withT, String> , provided by the ZorphyStringFieldX extensionprefix. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited