first method

Future<List?> first()

Implementation

Future<List?> first() async {
  if (!currentQuery.isQuery()) {
    throw Exception('Dblayer@first Is nessesary query');
  }
  final rows = await executor.query(currentQuery.toSql(isFirst: true),
      currentQuery.buildSubstitutionValues());

  if (rows.isNotEmpty) {
    return rows[0];
  } else {
    return null;
  }
}