SqlFilter class

A filter that contains an SQL query.

import 'package:database/filters.dart';

final filter = SqlFilter('price BETWEEN 0 AND ?', [maxPrice]);
final results = await database.collection('product').query(
  query: Query(
    filter: filter,
  ),
);
Inheritance

Constructors

SqlFilter(String source, List arguments)
const

Properties

arguments List
Arguments for source.
final
children Iterable<Filter>
Returns all children/.
read-only, inherited
descendants Iterable<Filter>
Returns all descendants.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
source String
SQL expression. Arguments should be replaced with '?'.
final

Methods

accept<T, C>(FilterVisitor<T, C> visitor, C context) → T
Calls the relevant visit method in visitor.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
simplify() Filter
Simplifies the AST tree. For example, nested AND nodes are transformed into a single AND node.
inherited
toString() String
Returns a string built with SearchQueryPrinter.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
override