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, {bool ignoreIfExist = false})

Properties

asImmutable ImmutableInsertStatement
Read-only representation of this statement.
no setter
hashCode int
The hash code for this object.
no setterinherited
ignoreIfExist bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set<ValType>(Field<ValType> field, ValType value) Insert
Set the the value of given column (field).
override
setBool(String column, bool value) Insert
Convenience method to set the value of bool column.
override
setDateTime(String column, DateTime value) Insert
Convenience method to set the value of date time column.
override
setInt(String column, int value) Insert
Convenience method to set the value of int column.
override
setMany(Iterable<SetColumn> columns) Insert
Sets many columns with a single call.
override
setString(String column, String value) Insert
Convenience method to set the value of string column.
override
setValue<ValType>(String column, ValType value) Insert
Sets the value of the given column.
override
setValues(Map<String, dynamic> values) Insert
Convenience method to set the value of int column.
override
toString() String
A string representation of this object.
inherited

Operators

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