from method Null safety

  1. @protected
SimpleSelectStatement<HasResultSet, dynamic> from(
  1. Table table
)

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
SimpleSelectStatement from(Table table) => _isGenerated();