Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] add wrapper for C.sqlite3_last_insert_rowid #7

Open
GoogleCodeExporter opened this issue Oct 26, 2015 · 2 comments
Open

[PATCH] add wrapper for C.sqlite3_last_insert_rowid #7

GoogleCodeExporter opened this issue Oct 26, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

gosqlite is missing a function to retrieve the id of the last inserted row, as 
documented on <http://www.sqlite.org/c3ref/last_insert_rowid.html>. 
Fortunately, adding it is trivial:

func (c *Conn) LastInsertRowID() (int64) {
    return int64(C.sqlite3_last_insert_rowid(c.db))
}

Original issue reported on code.google.com by shellr...@gmail.com on 16 Jan 2011 at 3:35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant