Skip to main content

compile_ensured_identity_query

Function compile_ensured_identity_query 

Source
pub fn compile_ensured_identity_query(
    dialect: Dialect,
    schema: &AppSchema,
    name: &str,
    unique_key: &[String],
    values: &BTreeMap<String, WriteValue>,
    generated_ids: &[Option<i64>],
) -> Result<Statement, DatabaseError>
Expand description

Looks up the identity of an inserted or pre-existing unique record inside the same transaction. The caller must hold its transaction until this read.