![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSQLCmd.h>
Public Member Functions | |
cSQLCmd (cStringA sTableName="", cStringA sCommand="") | |
virtual | ~cSQLCmd () |
virtual SQLCMD_TYPE | get_CmdType () const =0 |
virtual bool | isResultsExpected () const |
cStringA | get_Table () const |
void | put_Table (cStringA sTable) |
bool | isCommandMade () const |
cStringA | get_Command () const |
void | put_Command (cStringA sCommand) |
void | ResetCommand0 () |
virtual void | ResetCommand () |
virtual void | MakeCommand (const cSQLConfigCmd &cfg)=0 |
build the string from our args. More... | |
Static Public Member Functions | |
static bool GRAYCALL | IsValueTime (const char *pszVal) |
static cStringA GRAYCALL | MakeValueTime (const cSQLConfigCmd &cfg, const cTimeDouble &date) |
static cStringA GRAYCALL | MakeValueStr (const cSQLConfigCmd &cfg, const cVariant &vVal) |
Static Public Attributes | |
static const char * | k_pszNULL = "NULL" |
Protected Attributes | |
cStringA | m_sTable |
The table ( 'From' if select ), delete, create. More... | |
cStringA | m_sCommand |
The resultant full SQL command. use MakeCommand() to build this up. More... | |
base class for building up a SQL command line of any SQLCMD_TYPE. Select, insert, delete, update, create, drop, exec procedure. base for cSQLCmdWhere and cSQLCmdInsert, (and cSQLCmdDelete indirectly)
|
virtual |
|
pure virtual |
|
inline |
ASSUME MakeCommand() was called.
|
inline |
Get the left table.
|
inline |
|
inlinevirtual |
Was this a query?
Reimplemented in GrayLib::cSQLCmdSelect.
|
static |
Check if it's an ODBC date string and process it as is. Add the remaining data to the right side of the comparison.
|
pure virtual |
build the string from our args.
Implemented in GrayLib::cSQLCmdUpdate, GrayLib::cSQLCmdInsert, GrayLib::cSQLCmdDelete, GrayLib::cSQLCmdSelect, GrayLib::cSQLCmdDrop, and GrayLib::cSQLCmdCreate.
|
static |
Get a SQL text value from the cVariant. Add quotes or encoding as needed. NULL // null a field. {d'1972-01-15'} // for dates {ts'yyyy-mm-dd hh:mm:ss'} now() // time date
|
static |
Build time as a string that ODBC or other driver would like.
|
inline |
just set the string arbitrarily.
|
inline |
Set the left table.
|
virtual |
Clear just the command and NOT the table
Reimplemented in GrayLib::cSQLCmdUpdate, GrayLib::cSQLCmdInsertBase, GrayLib::cSQLCmdDelete, GrayLib::cSQLCmdSelect, and GrayLib::cSQLCmdCreate.
|
inline |
|
static |
|
protected |
The resultant full SQL command. use MakeCommand() to build this up.
|
protected |
The table ( 'From' if select ), delete, create.