Insert class

Insert SQL statement builder.

Use into method to set the table to insert into. Use set, setMany, setValue, setInt, setString, setBool, setDateTime and setValues to set column values.

Use exec statement or Adapter to execute the statement against a database.

Implemented types

Constructors

Insert(String name)

Properties

asImmutable ImmutableInsertStatement
Read-only representation of this statement.
read-only
name → String
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

Methods

exec<T>(Adapter adapter) → Future<T>
Executes the statement with the given adapter.
id(String id) Insert
Id is the auto-generated primary key that is set by the database. Adapter will request the database to return this column on inserts.
set<ValType>(Field<ValType> field, ValType value) Insert
Set the the value of given column (field).
setBool(String column, bool value) Insert
Convenience method to set the value of bool column.
setDateTime(String column, DateTime value) Insert
Convenience method to set the value of date time column.
setInt(String column, int value) Insert
Convenience method to set the value of int column.
setMany(Iterable<SetColumn> columns) Insert
Sets many columns with a single call.
setString(String column, String value) Insert
Convenience method to set the value of string column.
setValue<ValType>(String column, ValType value) Insert
Sets the value of the given column.
setValues(Map<String, dynamic> values) Insert
Convenience method to set the value of int column.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited