NSQuery class

A fluent query builder for a single table.

Implemented types

Properties

changes Stream<NSDatabaseChange>
Committed changes whose entities match this query.
no setter
hashCode int
The hash code for this object.
no setterinherited
isTransactional bool
Whether this query runs inside a transaction snapshot.
no setter
orBranches List<List<Filter>>
OR branches of AND filters used for changes matching.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String
final

Methods

addFilter(QueryFilter filter) NSQuery
Add a filter or filter group. Returns this query for chaining.
count() int
Return the number of matching entities without fetching them all.
dispose() → void
Release native memory eagerly instead of waiting for GC.
fetch({int? limit, int offset = 0}) NSQueryResults
Run the query and return matching entities.
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

create(NSDatabase database, String tableName, {Pointer<ns_transaction_t>? txn, List<String>? orderBy}) NSQuery