NSQuery class

A query builder for a single table.

Create OR alternatives with createBranch. Filters within a branch are AND-ed. A query with no branches returns every entity in the 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

count() → int
Return the number of matching entities without fetching them all.
createBranch() → NSQueryBranch
Create a new OR branch. Filters added to the branch are AND-ed.
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, {NSTransaction? transaction, List<String>? orderBy}) → NSQuery