Upsert class

Insert or update 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

Upsert(String name)

Properties

asImmutable ImmutableUpsertStatement
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) Upsert
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) Upsert
Set the the value of given column (field).
setBool(String column, bool value) Upsert
Convenience method to set the value of bool column.
setDateTime(String column, DateTime value) Upsert
Convenience method to set the value of date time column.
setInt(String column, int value) Upsert
Convenience method to set the value of int column.
setMany(Iterable<SetColumn> columns) Upsert
Sets many columns with a single call.
setString(String column, String value) Upsert
Convenience method to set the value of string column.
setValue<ValType>(String column, ValType value) Upsert
Sets the value of the given column.
setValues(Map<String, dynamic> values) Upsert
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