Function rorm_db::database::insert_bulk

source ·
pub async fn insert_bulk(
    executor: impl Executor<'_>,
    model: &str,
    columns: &[&str],
    rows: &[&[Value<'_>]]
) -> Result<(), Error>
Expand description

This method is used to bulk insert rows.

If one insert statement fails, the complete operation will be rolled back.

Parameter:

  • model: Table to insert to
  • columns: Columns to set rows for.
  • rows: List of values to bind to the corresponding columns.
  • transaction: Optional transaction to execute the query on.