get method

NSEntity? get(
  1. NSKey key
)

Read an entity within this transaction's snapshot.

Returns null if the key does not exist (including pending deletes).

Implementation

NSEntity? get(NSKey key) {
  _checkActive();
  final entity = ns_database_txn_get(_db, _txn, key.handle);
  if (entity == nullptr) {
    return null;
  }
  return NSEntity.owned(entity);
}