|
Otclient 1.0
14/8/2020
|
#include <database.h>

Public Member Functions | |
| DBInsert (const DatabasePtr &db) | |
| ~DBInsert () | |
| void | setQuery (const std::string &query) |
| bool | addRow (const std::string &row) |
| bool | addRow (std::stringstream &row) |
| bool | execute () |
Protected Attributes | |
| DatabasePtr | m_db |
| uint32 | m_rows |
| std::string | m_query |
| std::string | m_buf |
INSERT statement.
Gives possibility to optimize multiple INSERTs on databases that support multiline INSERTs.
Definition at line 222 of file database.h.
|
inline |
Associates with given database handler.
| DatabasePtr | database wrapper |
Definition at line 230 of file database.h.
|
inline |
Definition at line 231 of file database.h.
| bool DBInsert::addRow | ( | const std::string & | row | ) |
Adds new row to INSERT statement.
On databases that doesn't support multiline INSERTs it simply execute INSERT for each row.
| std::string& | row data |
Definition at line 43 of file database.cpp.


| bool DBInsert::addRow | ( | std::stringstream & | row | ) |
Allows to use addRow() with stringstream as parameter.
Definition at line 62 of file database.cpp.

| bool DBInsert::execute | ( | ) |
Executes current buffer.
Definition at line 69 of file database.cpp.


| void DBInsert::setQuery | ( | const std::string & | query | ) |
Sets query prototype.
| std::string& | INSERT query |
Definition at line 36 of file database.cpp.
|
protected |
Definition at line 264 of file database.h.
|
protected |
Definition at line 260 of file database.h.
|
protected |
Definition at line 263 of file database.h.
|
protected |
Definition at line 262 of file database.h.