availableResultSets property

List<AvailableMoorResultSet> availableResultSets
final

All result sets that are available for this Dart placeholder.

When queries are operating on multiple tables, especially if some of those tables have aliases, it may be hard to reflect the name of those tables at runtime. For instance, consider this query:

 myQuery: SELECT a.**, b.** FROM users a
   INNER JOIN friends f ON f.a_id = a.id
   INNER JOIN users b ON b.id = f.b_id
 WHERE $expression;

Here $expression is a Dart-defined expression evaluating to an sql boolean. Moor uses to add a Expression<bool> parameter to the generated query method. Unfortunately, this puts the burden of picking the right table name on the user. For instance, they may have to use alias('a', users).someColumn to avoid getting an runtime exception. With a new build option, moor instead generates a Expression<bool> Function(Users a, Users b, Friends f) function as a parameter. This allows users to access the right aliases right away, reducing potential for misuse.

Implementation

final List<AvailableMoorResultSet> availableResultSets;