mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
update MySQLMessage api
This commit is contained in:
@@ -358,9 +358,15 @@ unsigned long long MySQLResponse::get_affected_rows() const
|
||||
// return array api
|
||||
unsigned long long MySQLResponse::get_last_insert_id() const
|
||||
{
|
||||
unsigned long long insert_id = 0;
|
||||
MySQLResultCursor cursor(this);
|
||||
|
||||
return cursor.get_insert_id();
|
||||
do {
|
||||
if (cursor.get_insert_id())
|
||||
insert_id = cursor.get_insert_id();
|
||||
} while (cursor.next_result_set());
|
||||
|
||||
return insert_id;
|
||||
}
|
||||
|
||||
int MySQLResponse::get_warnings() const
|
||||
@@ -375,14 +381,6 @@ int MySQLResponse::get_warnings() const
|
||||
return warning_count;
|
||||
}
|
||||
|
||||
// return array api
|
||||
int MySQLResponse::get_status_flags() const
|
||||
{
|
||||
MySQLResultCursor cursor(this);
|
||||
|
||||
return cursor.get_server_status();
|
||||
}
|
||||
|
||||
std::string MySQLResponse::get_info() const
|
||||
{
|
||||
std::string info;
|
||||
|
||||
@@ -96,7 +96,6 @@ public:
|
||||
unsigned long long get_affected_rows() const;
|
||||
unsigned long long get_last_insert_id() const;
|
||||
int get_warnings() const;
|
||||
int get_status_flags() const;
|
||||
int get_error_code() const;
|
||||
std::string get_error_msg() const;
|
||||
std::string get_sql_state() const;
|
||||
|
||||
Reference in New Issue
Block a user