sqlQuery function

SqlDeclaration sqlQuery({
  1. required Record result,
  2. Record parameters = (),
  3. String? sqlite,
  4. String? postgres,
  5. String? mysql,
  6. String? mariadb,
})

A fixed SQL file with named result and parameter column declarations.

Use the same column helpers as a model, such as text() and custom(codec). Generation creates the result class and a typed query method. Source paths are relative to this library. Creating a declaration never reads or runs SQL. Run query generation, then validate the SQL against each target database.

Implementation

SqlDeclaration sqlQuery({
  required Record result,
  Record parameters = (),
  String? sqlite,
  String? postgres,
  String? mysql,
  String? mariadb,
}) => SqlDeclaration._(result, parameters, sqlite, postgres, mysql, mariadb);