Dml Command
data class DmlCommand(action: DmlAction, targetUniqueId: String, rows: Iterable<ExprValue>) : QueryResult
Content copied to clipboard
The result of a INSERT or DELETE statement. (UPDATE is out of scope for now.)
Each instance of a DML command denotes an operation to be performed by the embedding PartiQL application to effect the writes specified by a DML operation.
The primary benefit of this class is that it ensures that the rows property is evaluated lazily. It also provides a cleaner API that is easier to work with for PartiQL embedders. Without this, the user would have to consume the ExprValue directly and convert it to Ion. Neither option is particularly developer friendly, efficient or maintainable.
This is currently only factored to support INSERT INTO
and DELETE FROM
as UPDATE
and FROM ... UPDATE
is out of scope for the current effort.
Constructors
Link copied to clipboard
fun DmlCommand(action: DmlAction, targetUniqueId: String, rows: Iterable<ExprValue>)
Content copied to clipboard