#include <SQLSerialize.h>
Definition at line 66 of file SQLSerialize.h.
Public Member Functions | |
SQLInsert (const char *table_name, SQLImplementation *impl) | |
Constructor. | |
virtual void | begin_action () |
Initialize the query buffer. | |
virtual void | end_action () |
Clean the query in the end, trimming the trailing ',' and adding a closing parenthesis. | |
int | action (const SerializableObject *const_object) |
Since insert doesn't modify the object, define a variant of action() that operates on a const SerializableObject. | |
void | process (const char *name, u_int32_t *i) |
Process function for a 4 byte integer. | |
void | process (const char *name, u_int16_t *i) |
Process function for a 2 byte integer. | |
void | process (const char *name, u_int8_t *i) |
Process function for a byte. | |
void | process (const char *name, int32_t *i) |
Adaptor functions for signed/unsigned compatibility. | |
void | process (const char *name, int16_t *i) |
Adaptor functions for signed/unsigned compatibility. | |
void | process (const char *name, int8_t *i) |
Adaptor functions for signed/unsigned compatibility. | |
void | process (const char *name, bool *b) |
Process function for a boolean. | |
void | process (const char *name, u_char *bp, size_t len) |
void | process (const char *name, u_char **bp, size_t *lenp, int flags) |
void | process (const char *name, std::string *s) |
Process function for a c++ string. |
oasys::SQLInsert::SQLInsert | ( | const char * | table_name, | |
SQLImplementation * | impl | |||
) |
void oasys::SQLInsert::begin_action | ( | ) | [virtual] |
Initialize the query buffer.
Reimplemented from oasys::SerializeAction.
Definition at line 66 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), oasys::SQLQuery::query_, and oasys::SQLQuery::table_name_.
void oasys::SQLInsert::end_action | ( | ) | [virtual] |
Clean the query in the end, trimming the trailing ',' and adding a closing parenthesis.
Reimplemented from oasys::SerializeAction.
Definition at line 76 of file SQLSerialize.cc.
References oasys::StringBuffer::data(), oasys::StringBuffer::length(), and oasys::SQLQuery::query_.
int oasys::SQLInsert::action | ( | const SerializableObject * | const_object | ) | [inline] |
Since insert doesn't modify the object, define a variant of action() that operates on a const SerializableObject.
Definition at line 80 of file SQLSerialize.h.
References oasys::SerializeAction::action().
void oasys::SQLInsert::process | ( | const char * | name, | |
u_int32_t * | i | |||
) | [virtual] |
Process function for a 4 byte integer.
Implements oasys::SerializeAction.
Definition at line 85 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
u_int16_t * | i | |||
) | [virtual] |
Process function for a 2 byte integer.
Implements oasys::SerializeAction.
Definition at line 92 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
u_int8_t * | i | |||
) | [virtual] |
Process function for a byte.
Implements oasys::SerializeAction.
Definition at line 99 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
int32_t * | i | |||
) | [virtual] |
Adaptor functions for signed/unsigned compatibility.
Reimplemented from oasys::SerializeAction.
Definition at line 106 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
int16_t * | i | |||
) | [virtual] |
Adaptor functions for signed/unsigned compatibility.
Reimplemented from oasys::SerializeAction.
Definition at line 117 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
int8_t * | i | |||
) | [virtual] |
Adaptor functions for signed/unsigned compatibility.
Reimplemented from oasys::SerializeAction.
Definition at line 124 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
bool * | b | |||
) | [virtual] |
Process function for a boolean.
Implements oasys::SerializeAction.
Definition at line 131 of file SQLSerialize.cc.
References oasys::StringBuffer::append(), and oasys::SQLQuery::query_.
void oasys::SQLInsert::process | ( | const char * | name, | |
u_char * | bp, | |||
size_t | len | |||
) |
Definition at line 150 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), oasys::SQLImplementation::escape_binary(), oasys::SQLQuery::query_, and oasys::SQLQuery::sql_impl_.
void oasys::SQLInsert::process | ( | const char * | name, | |
u_char ** | bp, | |||
size_t * | lenp, | |||
int | flags | |||
) |
void oasys::SQLInsert::process | ( | const char * | name, | |
std::string * | s | |||
) | [virtual] |
Process function for a c++ string.
Implements oasys::SerializeAction.
Definition at line 143 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), oasys::SQLImplementation::escape_string(), oasys::SQLQuery::query_, and oasys::SQLQuery::sql_impl_.