from method
This method should be called on select to define the main table of this view:
abstract class CategoryTodoCount extends View {
TodosTable get todos;
Categories get categories;
Expression<int> get itemCount => todos.id.count();
@override
Query as() => select([categories.description, itemCount])
.from(categories)
.join([innerJoin(todos, todos.category.equalsExp(categories.id))]);
}
Implementation
@protected
JoinedSelectStatement from(Table table) => _isGenerated();