db: added insert_id()
Database::insert_id() retrieves the auto-generated ID from the last INSERT or UPDATE on a table containing an AUTO_INCREMENT column. Change-Id: I6ec94d1820bb7e77bd37df33145caa93016fd328
This commit is contained in:
@ -73,6 +73,10 @@ my_ulonglong Database::affected_rows()
|
|||||||
return mysql_affected_rows(handle);
|
return mysql_affected_rows(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my_ulonglong Database::insert_id()
|
||||||
|
{
|
||||||
|
return mysql_insert_id(handle);
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Database::Variant> Database::get_variants(const std::string &variant, const std::string &benchmark) {
|
std::vector<Database::Variant> Database::get_variants(const std::string &variant, const std::string &benchmark) {
|
||||||
std::vector<Variant> result;
|
std::vector<Variant> result;
|
||||||
|
|||||||
@ -85,6 +85,11 @@ namespace fail {
|
|||||||
*/
|
*/
|
||||||
my_ulonglong affected_rows();
|
my_ulonglong affected_rows();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AUTO_INCREMENT id from the last INSERT or UPDATE statement.
|
||||||
|
*/
|
||||||
|
my_ulonglong insert_id();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface to the util/CommandLine.hpp interface. In you
|
* Interface to the util/CommandLine.hpp interface. In you
|
||||||
* application you first call cmdline_setup(), which adds
|
* application you first call cmdline_setup(), which adds
|
||||||
|
|||||||
Reference in New Issue
Block a user