exists method

bool exists(
  1. SqlId id
)

Implementation

bool exists(SqlId id) {
  checkActive();
  ResultSet result;
  if (id.hasRowId)
    result = _existsByRowId!.select([id.rowid]);
  else
    result = _existsByKeyId!.select(<Object>[id.keyid!]);
  checkState(result.length == 1);
  int count = result.first.columnAt(0) as int;
  checkState(count == 0 || count == 1);
  return count == 1;
}