OneToOne mixin
- Superclass constraints
Properties
-
columns
→ List<
String> -
no setterinherited
- eloquent → Eloquent
-
no setterinherited
- finalForeignKey ↔ String?
-
getter/setter pairinherited
- finalParentKey ↔ String?
-
getter/setter pairinherited
- getPrimaryColumn → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- pivotTable ↔ String?
-
getter/setter pairinherited
- primaryValue → dynamic
-
no setterinherited
- query ↔ String?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableName → String
-
no setterinherited
-
toJson
→ Map<
String, Object?> -
Structure the object to be inserted when executing
save
method.no setterinherited
Methods
-
all(
) → Future< List< Map< >String, Object?> > -
Return all rows from table.
inherited
-
belongsTo(
String parentTable, {String? foreignKey, String? parentKey}) → Future< RelationshipModel> -
If
foreignKey
is not specified,foreignKey
will be issumed as the first column which containsparent
table name the in the child table. e.g for a car belonging to a user, foreignKey will be assumed asuser_id
which includes the name of parentTable. -
create(
Map< String, Object?> values) → Future<int> -
Create a new row.
inherited
-
createIfNotExists(
{required Map< String, Object?> check, required Map<String, Object?> create}) → Future<int?> -
inherited
-
delete(
) → Future< int> -
Delete rows from table and return number of changes.
inherited
-
distinct(
List< String> ? columnNames) → Generator -
Get unique column values.
inherited
-
find(
dynamic primaryKeyValue) → Future< Map< String, Object?> ?> -
inherited
-
first(
) → Future< Map< String, Object?> ?> -
inherited
-
generateQuery(
String prefix, {String? table}) → String -
inherited
-
get(
) → Future< List< Map< >String, Object?> > -
Get the rows.
inherited
-
getSelectedColumnAsArray(
) → List< String> ? -
inherited
-
getSelectedColumns(
{String? table}) → String? -
inherited
-
getWhereColumns(
) → List< _Where> -
inherited
-
groupBy(
String? columnName, {Sort? sort}) → Generator -
Group rows by column.
inherited
-
groupByDesc(
String? columnName) → Generator -
Group rows by column in descending order.
inherited
-
hasOne(
String childTable, {String? foreignKey, String? parentKey}) → Future< OneToOne> -
If
foreignKey
is not specified,foreignKey
will be issumed as the first column which containsparent
table name the in the child table. e.g for a user having a car, foreignKey will be assumed asuser_id
which includes the name of parentTable in child table. -
latest(
{String? columName}) → Generator -
Get latest row related to primary key. You can specify the column name.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(
String? columnName, {Sort? sort}) → Generator -
Sort rows in either descending or ascending order.
inherited
-
orderByDesc(
String? columnName) → Generator -
Sort rows in descending order.
inherited
-
resetAll(
) → dynamic -
inherited
-
resetDistinct(
) → dynamic -
inherited
-
resetGroupBy(
) → dynamic -
inherited
-
resetLimit(
) → dynamic -
inherited
-
resetOffset(
) → dynamic -
inherited
-
resetOrderBy(
) → dynamic -
inherited
-
resetSelectedColunns(
) → dynamic -
inherited
-
resetSort(
) → dynamic -
inherited
-
resetWheres(
) → dynamic -
inherited
-
save(
) → Future< int> -
Create record in related table if not exists depending on primary value
Otherwise update the values.
inherited
-
search(
String keyword, {List< String> ? searchableColumns}) → Future<List< Map< >String, Object?> > -
Search rows.
inherited
-
select(
List< String> selectedColumns) → Generator -
Specify columns to be only included in results.
inherited
-
setPrimaryValue(
dynamic value) → dynamic -
Update the primary value automatically when
save
method is executed.inherited -
skip(
int? offset) → Generator -
Skip a given number of results.
inherited
-
take(
int? count) → Generator -
Limit the number of rows in result
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Map< String, Object?> values) → Future<int> -
Update rows and return number of changes.
inherited
-
updateOrCreate(
{required Map< String, Object?> check, required Map<String, Object?> inserts}) → Future<int> -
Update data if exists and if not, create new row.
inherited
-
where(
String columnName, dynamic value, {Operator operator = Operator.equal, String? conjuncation}) → Generator -
Specify 'where' conditions in query.
inherited
-
whereIn(
String columnName, List values) → Generator -
Get all records of which
columnName
include any ofvalues
.inherited -
whereNotIn(
String columnName, List values) → Generator -
Get all records of which
columnName
does not include any ofvalues
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited