InsertStatement<T extends Table, D> class Null safety

Represents an insert statement

Constructors

InsertStatement(DatabaseConnectionUser database, TableInfo<T, D> table)
Constructs an insert statement from the database and the table. Used internally by drift.

Properties

database DatabaseConnectionUser
The database to use then executing this statement
@protected, final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
table TableInfo<T, D>
The table we're inserting into
@protected, final

Methods

createContext(Insertable<D> entry, InsertMode mode, {UpsertClause<T, D>? onConflict, bool returning = false}) GenerationContext
Creates a GenerationContext which contains the sql necessary to run an insert statement fro the entry with the mode. [...]
insert(Insertable<D> entity, {InsertMode? mode, UpsertClause<T, D>? onConflict}) Future<int>
Inserts a row constructed from the fields in entity. [...]
insertOnConflictUpdate(Insertable<D> entity) Future<int>
Attempts to insert entity into the database. If the insert would violate a primary key or uniqueness constraint, updates the columns that are present on entity. [...]
insertReturning(Insertable<D> entity, {InsertMode? mode, UpsertClause<T, D>? onConflict}) Future<D>
Inserts a row into the table, and returns a generated instance. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
writeInsertable(GenerationContext ctx, Map<String, Expression> map) → void
Writes column names and values from the map.

Operators

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