MySQL++
3.2.5
|
An insert policy object that triggers a new INSERT statement if the object to be added would cause the statement to exceed a maximum size. More...
#include <query.h>
Public Types | |
typedef AccessController | access_controller |
Alias for our access controller type. | |
Public Member Functions | |
MaxPacketInsertPolicy (Connection *con, int size) | |
Constructor. More... | |
MaxPacketInsertPolicy (int size) | |
Constructor. More... | |
~MaxPacketInsertPolicy () | |
Destructor. | |
template<class RowT > | |
bool | can_add (int size, const RowT &object) const |
Can we add another object to the query? More... | |
An insert policy object that triggers a new INSERT statement if the object to be added would cause the statement to exceed a maximum size.
This differs from the SizeThresholdInsertPolicy in that it builds the VALUES expression and checks whether it would cause the length of the INSERT statement to exceed the maximum size.
|
inline |
Constructor.
con | connection object used for escaping text |
size | the maximum allowed size for an INSERT statement |
|
inline |
Constructor.
This version does not use a Connection* so it will not be able to take the character set into account when escaping the text.
size | the maximum allowed size for an INSERT statement |
|
inline |
Can we add another object to the query?
size | current length of the INSERT statement |
object | the SSQLS object to be added |
true | if the object is allowed to be added to the INSERT statement |