newQuery<T extends ManagedObject> method

  1. @override
Query<T> newQuery<T extends ManagedObject>(
  1. ManagedContext context,
  2. ManagedEntity entity, {
  3. T? values,

Creates a new database-specific Query.

Subclasses override this method to provide a concrete implementation of Query specific to this type. Objects returned from this method must implement Query. They should mixin QueryMixin to most of the behavior provided by a query.


Query<T> newQuery<T extends ManagedObject>(
    ManagedContext context, ManagedEntity entity,
    {T? values}) {
  final query = PostgresQuery<T>.withEntity(context, entity);
  if (values != null) {
    query.values = values;
  return query;