RecordRef<K, V> class

An immutable record reference

Constructors

RecordRef()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
key → K
Record key, null for new record.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
store StoreRef<K, V>
Store reference.
read-only

Methods

add(DatabaseClient client, V value) Future<K>
Create a record if it does not exist. [...]
cast<RK, RV>() RecordRef<RK, RV>
Cast if needed.
delete(DatabaseClient client) Future
Delete a record.
exists(DatabaseClient client) Future<bool>
Return true if the record exists.
get(DatabaseClient client) Future<V>
Get a record value from the database.
getSnapshot(DatabaseClient client) Future<RecordSnapshot<K, V>>
Get a record snapshot from the database.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onSnapshot(Database database) Stream<RecordSnapshot<K, V>>
Get a stream of a record snapshot from the database. [...]
put(DatabaseClient client, V value, {bool merge}) Future<V>
Save a record, create if needed. [...]
snapshot(V value) RecordSnapshot<K, V>
Create a snapshot of a record with a given value.
toString() String
A string representation of this object. [...]
inherited
update(DatabaseClient client, V value) Future<V>
Update a record. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited