Query<T extends RelationalModel<T>> class

Constructors

Query(T model)

Properties

base → BaseQuery
final
hashCode → int
The hash code for this object.
no setterinherited
model → T
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

distinct() → Query<T>
first() → Future<T?>
---------- FIRST ----------
firstOrFail() → Future<T>
---------- FIRST OR FAIL ----------
forceDelete() → Future<int>
---------- FORCE DELETE ----------
get() → Future<List<T>>
---------- GET ----------
groupBy(dynamic columns) → Query<T>
---------- GROUP ----------
include(dynamic relations) → Query<T>
---------- RELATIONS ----------
join(String table, {required String localKey, required String foreignKey}) → Query<T>
joinRelation(String path) → Query<T>
---------- JOIN BY RELATION ----------
limit(int limit) → Query<T>
---------- LIMIT ----------
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(int offset) → Query<T>
---------- OFFSET ----------
onlyDeleted() → Query<T>
---------- ONLY DELETED SCOPE ----------
orderBy(String? column, {bool? descending}) → Query<T>
---------- ORDER ----------
orWhere(String column, dynamic value) → Query<T>
---------- OR WHERE ----------
orWhereGroup(void callback(Query<T> q)) → Query<T>
---------- OR WHERE GROUP ----------
orWhereHas(String relationPath, [void callback(Query q)?]) → Query<T>
orWhereRelation(String relationPath, void callback(Query q)) → Query<T>
---------- OR WHERE RELATION (JUST CALLBACK) ----------
orWhereRelationEquals(String relationPath, String column, dynamic value) → Query<T>
---------- OR WHERE RELATION EQUALS ----------
orWhereRelationIn(String relationPath, String column, Iterable values) → Query<T>
---------- OR WHERE RELATION IN ----------
orWhereRelationOp(String relationPath, String column, String operator, dynamic value) → Query<T>
---------- OR WHERE RELATION OP ----------
page(int page, {int perPage = 20}) → Query<T>
---------- PAGE ----------
page1(int page, {int perPage = 20}) → Query<T>
---------- PAGE (STARTS FROM 1) ----------
select(dynamic columns) → Query<T>
---------- SELECT FIELDS ----------
selectTable(String table) → Query<T>
---------- SELECT TABLE ----------
toSql() → String
---------- SQL ----------
toString() → String
A string representation of this object.
inherited
where(String column, dynamic value) → Query<T>
---------- WHERE ----------
whereGroup(void callback(Query<T> q)) → Query<T>
---------- WHERE GROUP ----------
whereHas(String relationPath, [void callback(Query q)?]) → Query<T>
whereIn(String column, List values) → Query<T>
---------- WHERE IN ----------
whereNotNull(String column) → Query<T>
---------- WHERE NOT NULL ----------
whereNull(String column) → Query<T>
---------- WHERE NULL ----------
whereNullable(String column, dynamic value) → Query<T>
---------- WHERE NULLABLE ----------
whereRaw(String sql, [List? params]) → void
---------- WHERE RAW ----------
whereRelation(String relationPath, void callback(Query q)) → Query<T>
---------- WHERE RELATION (JUST CALLBACK) ----------
whereRelationEquals(String relationPath, String column, dynamic value) → Query<T>
---------- WHERE RELATION EQUALS ----------
whereRelationIn(String relationPath, String column, Iterable values) → Query<T>
---------- WHERE RELATION IN ----------
whereRelationOp(String relationPath, String column, String operator, dynamic value) → Query<T>
---------- WHERE RELATION OP ----------
withDeleted() → Query<T>
---------- SOFT DELETES ----------
withoutDeleted() → Query<T>
---------- WITHOUT DELETED SCOPE ----------

Operators

operator ==(Object other) → bool
The equality operator.
inherited