Bean<ModelType> class abstract

Interface for bean class for a model

Constructors

Bean(Adapter adapter)

Properties

adapter Adapter
The adapter for a particular database
final
fields Map<String, Field>
Map of fields in the table
no setter
finder Find
Creates a 'find' query
no setter
hashCode int
The hash code for this object.
no setterinherited
inserter Insert
Creates a 'insert' query
no setter
inserters InsertMany
Creates a 'insertMany' query
no setter
remover Remove
Creates a 'delete' query
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String
The name of the table in database
no setter
updater Update
Creates a 'update' query
no setter
updaters UpdateMany
Creates a 'updateMany' query
no setter
upserter Upsert
Creates a 'upsert' query
no setter
upserters UpsertMany
Creates a 'upsertMany' query
no setter

Methods

drop() Future<void>
Drops the table if it already exists
findMany(Find statement) Future<List<ModelType>>
Returns a list of rows found by executing statement
findOne(Find statement) Future<ModelType?>
Returns one row found by executing statement
findOneWhere(dynamic exp) Future<ModelType?>
findWhere(dynamic where) Future<List<ModelType>>
fromMap(Map map) → ModelType
Creates a model from the map
getAll() Future<List<ModelType>>
Fetches all rows in the table/document
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAll() Future<int>
Removes all rows in table/document
removeWhere(dynamic where) Future<int>
toSetColumns(ModelType model, {bool update = false, Set<String> only}) List<SetColumn>
Creates list of 'set' column from model to be used in update or insert query
toString() String
A string representation of this object.
inherited
updateFields(dynamic where, Map<String, dynamic> values) Future<int>

Operators

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