Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
c79a34b2
Commit
c79a34b2
authored
Mar 12, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added database::last_insert_rowid()
parent
12907906
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
sqlite.h
dlib/sqlite/sqlite.h
+6
-0
sqlite_abstract.h
dlib/sqlite/sqlite_abstract.h
+14
-0
No files found.
dlib/sqlite/sqlite.h
View file @
c79a34b2
...
...
@@ -92,6 +92,12 @@ namespace dlib
const
std
::
string
&
sql_statement
);
int64
last_insert_rowid
(
)
const
{
return
sqlite3_last_insert_rowid
(
db
.
get
());
}
private
:
friend
class
statement
;
...
...
dlib/sqlite/sqlite_abstract.h
View file @
c79a34b2
...
...
@@ -117,6 +117,20 @@ namespace dlib
- executes the supplied SQL statement against this database
!*/
int64
last_insert_rowid
(
)
const
;
/*!
requires
- is_open() == true
ensures
- Each element in a database table has a rowid which uniquely identifies
it. Therefore, this routine returns the rowid of the most recent
successful INSERT into the database via this database instance.
- If an INSERT has not been performed on the current database instance then
the return value is 0. This is true even if the database is not empty.
- See the sqlite documention for the full details on how this function
behaves: http://www.sqlite.org/c3ref/last_insert_rowid.html
!*/
};
// ----------------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment