NamedQuery<T> class
Defines a named query, allowing the ODM to generate utilities to interact with the query in a type-safe way.
By doing:
@NamedQuery<Person>('my-query-name')
@Collection<Person>(...)
class Anything {}
The ODM will generate a myQueryNameGet
utility, which can be used as followed:
void main() async {
Future<PersonSnapshot> snapshot = myQueryNameGet();
}
Note: Named queries must be associated with a Collection that has a matching generic argument.
This is necessary to ensure that FirestoreDocumentSnapshot.reference
is
properly set.
Constructors
- NamedQuery(String queryName)
-
Defines a named query, allowing the ODM to generate utilities to interact
with the query in a type-safe way.
const
Properties
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