Builder class

Create a query url with different params

Constructors

Builder(Schema model)
Create a instance of builder with a model has parameter

Properties

appends List<String>
List of names of the attributes we want to append.
getter/setter pair
fields Map<String, List<String>>
Object with a fields we want to select.
final
filters Map<String, dynamic>
Object with a filters we want apply.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
includes List<String>
List of names of the relationships we want to include.
getter/setter pair
limitValue int?
Limit
getter/setter pair
model Schema
Current Schema to usage
getter/setter pair
pageValue int?
Page
getter/setter pair
payload Map<String, dynamic>?
Object with a parameters to include in query
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sorts List<String>
List names of the properties we want to sort
getter/setter pair

Methods

append(List<String> attributes) → void
We can also append attributes to our queries using the append method. The arguments are the names of the attributes we want to append. We can pass as many arguments as we want.
include(List<String> relationships) → void
Sometimes, we will want to eager load a relationship, and to do so, we can use the include method or its alias with. The arguments are the names of the relationships we want to include. We can pass as many arguments as we want.
limit(int value) → void
Set the limit of records per page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderBy(List<String> fields) → void
The method orderBy. The arguments are the names of the properties we want to sort. We can pass as many arguments as we want.
page(int value) → void
Set the current page.
params(Map<String, dynamic> payload) → void
We may also need to use parameters that are not provided by dart_api_query, and that's when the params method comes in to help.
query() String
Query string parsed
select(List<String> fields) → void
The arguments are the names of the fields we want to select of the model
selectFromRelations(Map<String, List<String>> fieldsFromRelationships) → void
The argument is an object, which the name of the first key is the resource defined in the model class, the name of the other keys are the included relationships, and the values are arrays of fields.
toString() String
A string representation of this object.
inherited
when(dynamic value, void callback(Builder, dynamic)) → void
We may need to add a clause based on a condition, and we can do so by using the when method. The first argument is the flag, and the second argument is the callback with the clause we want.
where(String key, dynamic value) → void
The where method can be used to filter the query by evaluating a value against the column. The first argument is the name of the column, and the second argument is the value to evaluate.
whereIn(String key, List<String> searchArray) → void
The whereIn method is similar to where, but it accepts multiple values instead of a single one. The first argument is the name of the column, and the second argument is an array of values to evaluate.
whereInNested(Map<String, dynamic> nestedFilters) → void
The whereInNested method is similar to whereIn, but is used to filter the query using a nested filter. You can use whereNested or this alias.
whereNested(Map<String, dynamic> nestedFilters) → void
The whereNested method can be used to filter the query by evaluating a nested filter.

Operators

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