active-group / sqlosure

SQL & DB access with Clojure
7 stars 0 forks source link

Return row / id of newly inserted row. #1

Open kaaninho opened 4 years ago

kaaninho commented 4 years ago

Current insert! behaviour (code here): After an insert happens, an integer ("the row count for SQL Data Manipulation Language (DML) statements" see here https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String) ) is returned.

What would be nice to be returned: The inserted row itself.

Maybe use instead of executeUpdate executeQuery? In function run-query, the result-set is used as proposed.