exists method

  1. @override
Future<bool> exists(
  1. String table,
  2. String primaryColumn,
  3. int id
)

Check if given id exists in the table.

Implementation

@override
Future<bool> exists(String table, String primaryColumn, int id) async {
  final response =
      await _from(table).select().eq(primaryColumn, id).limit(1).execute();
  return response.count == 1;
}