I'd like to create a row in a table with an auto-incrementing primary key, retrieve the generated key, and read the value later. Some SQL variants allow specifying that an INSERT statement should return values, e.g. Postgres has the INSERT ... RETURNING clause, Sqlite has the last_insert_rowid() function, SQL Server has INSERT ... OUTPUT, etc. Would a #:returning keyword listing column names make sense for the insert syntax?
I'd like to create a row in a table with an auto-incrementing primary key, retrieve the generated key, and read the value later. Some SQL variants allow specifying that an
INSERTstatement should return values, e.g. Postgres has theINSERT ... RETURNINGclause, Sqlite has thelast_insert_rowid()function, SQL Server hasINSERT ... OUTPUT, etc. Would a#:returningkeyword listing column names make sense for theinsertsyntax?