QueryBuilder<T> class
EntityFramework-style LINQ query builder
Constructors
-
QueryBuilder(Repository<
T> repository)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
repository
→ Repository<
T> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
any(
) → Future< bool> - Check if any records match
-
avg(
String column) → Future< num?> - Get average of a column
-
countSql(
) → Future< int> - Count matching records
-
distinct(
) → QueryBuilder< T> - DISTINCT
-
first(
) → Future< T> - Execute and get first result (throws if not found)
-
firstOrDefault(
) → Future< T?> - Execute and get first result
-
include(
String relationshipName) → QueryBuilder< T> - INNER JOIN with related entity (Include pattern)
-
innerJoin(
String table, String condition) → QueryBuilder< T> - INNER JOIN
-
leftJoin(
String table, String condition) → QueryBuilder< T> - LEFT JOIN
-
max(
String column) → Future< num?> - Get maximum value of a column
-
min(
String column) → Future< num?> - Get minimum value of a column
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(
String column) → QueryBuilder< T> - ORDER BY ascending
-
orderByDescending(
String column) → QueryBuilder< T> - ORDER BY descending
-
rightJoin(
String table, String condition) → QueryBuilder< T> - RIGHT JOIN
-
select(
dynamic builder(SelectBuilder)) → QueryBuilder< T> - SELECT specific columns
-
skip(
int count) → QueryBuilder< T> - SKIP (OFFSET)
-
sum(
String column) → Future< num?> - Get sum of a column
-
take(
int count) → QueryBuilder< T> - TAKE (LIMIT)
-
toList(
) → Future< List< T> > - Execute and get all results
-
toSql(
) → String - Get SQL string (for debugging)
-
toString(
) → String -
A string representation of this object.
inherited
-
where(
String condition, [Map< String, dynamic> ? parameters]) → QueryBuilder<T> - WHERE clause with condition
-
whereBetween(
String column, dynamic from, dynamic to) → QueryBuilder< T> - BETWEEN clause
-
whereILike(
String column, String pattern) → QueryBuilder< T> - ILIKE clause (PostgreSQL case-insensitive)
-
whereIn(
String column, List values) → QueryBuilder< T> - WHERE IN clause
-
whereLike(
String column, String pattern) → QueryBuilder< T> - LIKE clause
-
whereNotIn(
String column, List values) → QueryBuilder< T> - WHERE NOT IN clause
-
whereNotNull(
String column) → QueryBuilder< T> - IS NOT NULL clause
-
whereNull(
String column) → QueryBuilder< T> - IS NULL clause
-
whereSimple(
String column, dynamic value) → QueryBuilder< T> - WHERE with lambda-like expression
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited