compileInsertGetId method
Insert returning the generated id (RETURNING when supported).
Implementation
CompiledQuery compileInsertGetId(
String table,
Map<String, Object?> row,
String idColumn,
) {
final base = compileInsert(table, [row]);
if (!supportsReturning) {
return base;
}
return CompiledQuery(
'${base.sql} RETURNING ${wrap(idColumn)}',
base.bindings,
);
}