countTable method

int countTable(
  1. String table
)

Implementation

int countTable(String table) {
  String sql = "SELECT count(*) FROM ${table.escapeSQL}";
  ResultSet rs = rawQuery(sql);
  return rs.firstOrNull?.columnAt(0) ?? 0;
}