nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d65a790
)
lib/sqlite: Added last_rowid method to SQLite
author
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 30 Sep 2014 20:25:04 +0000
(16:25 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Mon, 6 Oct 2014 15:37:05 +0000
(11:37 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/sqlite3/sqlite3.nit
patch
|
blob
|
history
diff --git
a/lib/sqlite3/sqlite3.nit
b/lib/sqlite3/sqlite3.nit
index
d016a4c
..
05cbed0
100644
(file)
--- a/
lib/sqlite3/sqlite3.nit
+++ b/
lib/sqlite3/sqlite3.nit
@@
-105,6
+105,9
@@
class Sqlite3DB
if err.is_ok then return null
return err.to_s
end
+
+ # Returns the id for the last successful insert on the current connection.
+ fun last_insert_rowid: Int do return native_connection.last_insert_rowid
end
# A prepared Sqlite3 statement, created from `Sqlite3DB::prepare` or `Sqlite3DB::select`