handleQuery method

Future handleQuery({
  1. required String sql,
  2. List? sqlArguments,
})

Query handling.

Implementation

Future handleQuery({required String sql, List? sqlArguments}) async {
  var preparedStatement = _ffiDb.prepare(sql);

  try {
    logSql(sql: sql, sqlArguments: sqlArguments);

    var result = preparedStatement.select(_ffiArguments(sqlArguments));
    logResult(result: 'Found ${result.length} rows');
    return packResult(result);
  } finally {
    preparedStatement.dispose();
  }
}