BsonTimestamp class
Represents a BSON Timestamp type in Firestore documents.
Only databases of the Enterprise edition store this type. It is not a
point in time with nanoseconds like Timestamp, but the BSON pair of a
second and an operation counter; use Timestamp for dates.
await firestore.doc('ops/1').set(<String, Object?>{
'at': BsonTimestamp(1700000000, 1),
});
final DocumentSnapshot<Map<String, Object?>> snapshot =
await firestore.doc('ops/1').get();
final BsonTimestamp? at = snapshot.getBsonTimestamp('at');
Constructors
- BsonTimestamp(int seconds, int increment)
- Creates a BSON timestamp.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- increment → int
-
The ordinal of the operation within seconds, an unsigned 32-bit
integer.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seconds → int
-
The seconds since the Unix epoch, an unsigned 32-bit integer.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override