pub async fn insert_returning(
    executor: impl Executor<'_>,
    model: &str,
    columns: &[&str],
    values: &[Value<'_>],
    returning: &[&str]
) -> Result<Row, Error>
Expand description

This method is used to insert into a table.

Parameter:

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