#include <SQLImplementation.h>
Inheritance diagram for oasys::SQLImplementation:
Definition at line 29 of file SQLImplementation.h.
Public Member Functions | |
SQLImplementation (const char *binary_datatype, const char *boolean_datatype) | |
Constructor. | |
virtual int | connect (const char *dbname)=0 |
Open a connection to the database. | |
virtual int | close ()=0 |
Close the connection to the database. | |
virtual bool | has_table (const char *tablename)=0 |
Check if the database has the specified table. | |
virtual int | exec_query (const char *query)=0 |
Run the given sql query. | |
virtual int | num_tuples ()=0 |
Return the count of the tuples in the previous query. | |
const char * | binary_datatype () |
Accessor for binary datatype field. | |
const char * | boolean_datatype () |
Accessor for boolean datatype field. | |
virtual const char * | escape_string (const char *from)=0 |
Escape a string for use in a sql query. | |
virtual const u_char * | escape_binary (const u_char *from, int len)=0 |
Escape a binary buffer for use in a sql query. | |
virtual const u_char * | unescape_binary (const u_char *from)=0 |
Unescapes the retured value of a SQL query into a binary buffer. | |
virtual const char * | get_value (int tuple_no, int field_no)=0 |
Get the value at the given tuple / field for a previous query. | |
virtual | ~SQLImplementation () |
Protected Attributes | |
const char * | binary_datatype_ |
column type for binary data | |
const char * | boolean_datatype_ |
column type for boolean data | |
Private Member Functions | |
SQLImplementation () | |
default constructor isn't used |
oasys::SQLImplementation::SQLImplementation | ( | const char * | binary_datatype, | |
const char * | boolean_datatype | |||
) | [inline] |
virtual oasys::SQLImplementation::~SQLImplementation | ( | ) | [virtual] |
oasys::SQLImplementation::SQLImplementation | ( | ) | [private] |
default constructor isn't used
virtual int oasys::SQLImplementation::connect | ( | const char * | dbname | ) | [pure virtual] |
Open a connection to the database.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
virtual int oasys::SQLImplementation::close | ( | ) | [pure virtual] |
Close the connection to the database.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
virtual bool oasys::SQLImplementation::has_table | ( | const char * | tablename | ) | [pure virtual] |
Check if the database has the specified table.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
virtual int oasys::SQLImplementation::exec_query | ( | const char * | query | ) | [pure virtual] |
Run the given sql query.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
virtual int oasys::SQLImplementation::num_tuples | ( | ) | [pure virtual] |
Return the count of the tuples in the previous query.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
const char* oasys::SQLImplementation::binary_datatype | ( | ) | [inline] |
Accessor for binary datatype field.
Reimplemented in dtn::MysqlSQLImplementation.
Definition at line 68 of file SQLImplementation.h.
References binary_datatype_.
Referenced by oasys::SQLTableFormat::process().
const char* oasys::SQLImplementation::boolean_datatype | ( | ) | [inline] |
Accessor for boolean datatype field.
Definition at line 73 of file SQLImplementation.h.
References boolean_datatype_.
virtual const char* oasys::SQLImplementation::escape_string | ( | const char * | from | ) | [pure virtual] |
Escape a string for use in a sql query.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
Referenced by oasys::SQLUpdate::process(), and oasys::SQLInsert::process().
virtual const u_char* oasys::SQLImplementation::escape_binary | ( | const u_char * | from, | |
int | len | |||
) | [pure virtual] |
Escape a binary buffer for use in a sql query.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
Referenced by oasys::SQLUpdate::process(), and oasys::SQLInsert::process().
virtual const u_char* oasys::SQLImplementation::unescape_binary | ( | const u_char * | from | ) | [pure virtual] |
Unescapes the retured value of a SQL query into a binary buffer.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
Referenced by oasys::SQLExtract::process().
virtual const char* oasys::SQLImplementation::get_value | ( | int | tuple_no, | |
int | field_no | |||
) | [pure virtual] |
Get the value at the given tuple / field for a previous query.
Implemented in dtn::MysqlSQLImplementation, and dtn::PostgresSQLImplementation.
Referenced by oasys::SQLExtract::next_field().
const char* oasys::SQLImplementation::binary_datatype_ [protected] |
column type for binary data
Definition at line 99 of file SQLImplementation.h.
Referenced by binary_datatype().
const char* oasys::SQLImplementation::boolean_datatype_ [protected] |
column type for boolean data
Definition at line 100 of file SQLImplementation.h.
Referenced by boolean_datatype().