InsertCommand<P> class

A specialized Command for dynamic inserts.

It dynamically generates an INSERT statement using only the non-null values provided in the params record, allowing the database to apply default values for omitted columns.

Inheritance

Constructors

InsertCommand({required String table, required dynamic params})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
params → dynamic
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table String
final

Methods

apply(P? p) → (String, Map<String, Object?>)
Returns the SQL string and the mapped parameters for this command.
override
getSql(P? p) String
Returns the SQL string for this command. Subclasses can override this to generate SQL based on the parameters p.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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