Constructors
- Model()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- modelName ↔ String
-
getter/setter pairinherited
- name ↔ String
-
getter/setter pairinherited
-
primaryKeys
↔ List<
String> -
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequelize ↔ Sequelize
-
getter/setter pairinherited
- sequelizeInstance ↔ dynamic
-
getter/setter pairinherited
- sequelizeModel ↔ dynamic
-
getter/setter pairinherited
Methods
-
belongsTo(
ModelInterface model, {String? foreignKey, String? as, String? targetKey}) → Future< Association> -
count(
{covariant dynamic where, Transaction? transaction}) → Future< int> -
Counts the number of instances matching the optional
whereclause. -
create(
covariant dynamic data, {Transaction? transaction}) → Future< T> - Creates a new instance in the database and returns the created model instance with all auto-generated fields populated.
-
destroy(
{covariant dynamic where, bool? force, int? limit, bool? individualHooks, Transaction? transaction}) → Future< int> -
Deletes multiple instances, or set their deletedAt timestamp to the current time if
paranoidis enabled. -
findAll(
{covariant dynamic where, covariant dynamic include, dynamic order, dynamic group, int? limit, int? offset, QueryAttributes? attributes, bool? paranoid, Transaction? transaction}) → Future< List< T> > - Searches for multiple instances that match the query options.
-
findOne(
{covariant dynamic where, covariant dynamic include, dynamic order, dynamic group, QueryAttributes? attributes, bool? paranoid, Transaction? transaction}) → Future< T?> - Searches for a single instance that matches the query options.
-
getOptionsJson(
) → Map< String, dynamic> - Get model options for Sequelize
-
getPrimaryKeys(
) → List< String> -
Get primary key attribute names
inherited
-
getQueryBuilder(
) → dynamic -
Get the query builder for this model
Returns a typed query builder (generated class)
inherited
-
hasMany(
ModelInterface model, {String? foreignKey, String? as, String? sourceKey}) → Future< Association> -
hasOne(
ModelInterface model, {String? foreignKey, String? as, String? sourceKey}) → Future< Association> -
max(
covariant dynamic columnFn, {covariant dynamic where, Transaction? transaction}) → Future< num?> - Find the maximum value of a column
-
min(
covariant dynamic columnFn, {covariant dynamic where, Transaction? transaction}) → Future< num?> - Find the minimum value of a column
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restore(
{covariant dynamic where, int? limit, bool? individualHooks, Transaction? transaction}) → Future< void> -
Restores multiple paranoid instances.
Only usable if
paranoidis enabled. -
sum(
covariant dynamic columnFn, {covariant dynamic where, Transaction? transaction}) → Future< num?> - Sum values of a column
-
toString(
) → String -
A string representation of this object.
inherited
-
truncate(
{bool? cascade, bool? restartIdentity, bool? force, Transaction? transaction}) → Future< void> - Truncates the table associated with the model.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited