FullId.fromRow constructor

FullId.fromRow(
  1. Object? rowid,
  2. Object? keyid
)

Creates a FullId instance initialized with the given rowid and keyid.

This constructor has the same constraints on arguments as FullId.new; however, an Exception is thrown if they are violated.

Implementation

factory FullId.fromRow(Object? rowid, Object? keyid) {
  if ((rowid, keyid) case (int r, Object k) when r > 0 && isSqlValue(k))
    return FullId(r, k);
  throw JsonSqliteException("FullId.fromRow: rowid $rowid, keyid `$keyid`");
}