Query constructor
Query(
- SQLite sqlite,
- List<
SqlX> columns, - SqlX? search,
- SqlX? where,
- List<
QueryOrdering> order, - QueryDistinction distinction,
- int limit,
Implementation
Query(
this.sqlite,
this.columns,
this.search,
this.where,
this.order,
this.distinction,
this.limit,
) {
String strAllColumns = [
columnRowId,
columnKeyId,
for (var ordering in order) ////
ordering.expression.str,
for (var column in columns) ////
column.str,
].join(", ");
String strFrom = search == null ? tableMapping : search!.str;
String strWhere = where == null ? "" : "${where!.str} AND ";
_msgSelect = MessageFormat(
"SELECT $strAllColumns FROM $strFrom "
"WHERE $strWhere{0} ORDER BY {1} LIMIT $limit",
);
initialize();
}