ozzo-dbx
ozzo-dbx copied to clipboard
How I can get LAST_INSERT_ID after insert?
#64
Revisiting this question in the issue above, How can I return the ID of a new record after being created using data manipulation queries as explained here
I am using postgres. Insert into table using the data manipulation query. Tried using:
insertedID, err := result.LastInsertId()
fmt.Println("Created User Result: ", result)
fmt.Println("Created User Insert ID: ", insertedID)
fmt.Println("Created User Error: ", err)
But, it came back with this Created User Error: no LastInsertId available