executeInsert method

Future<SQLResponseOf<void>> executeInsert({
  1. required String tableName,
  2. required JsonRow values,
  3. bool nullAsBlank = false,
})

Executes an SQL INSERT query and returns the result as a SQLResponseOf object.

The tableName parameter specifies the name of the table to insert into. The values parameter is a JsonRow object representing the values to insert. The nullAsBlank parameter specifies whether to treat null values as blank.

Implementation

Future<SQLResponseOf<void>> executeInsert({
  required String tableName,
  required JsonRow values,
  bool nullAsBlank = false,
}) {
  return executeSQL(
    dataSetType: "value",
    sql: values.asInsertCommand(
      tableName: tableName,
      nullAsBlank: nullAsBlank,
      quoteChar: quoteChar,
      dataBaseProvider: dataBaseProvider,
    ),
  );
}