#include <subsql.h>

Public Member Functions | |
| void | run (int firstParam, int argc, char *argv[]) |
| void | selectionPage (WWWconnection &con) |
| void | queryPage (WWWconnection &con) |
| void | defaultPage (WWWconnection &con) |
| dbSubSql (dbAccessType accessType) | |
| virtual | ~dbSubSql () |
Private Member Functions | |
| void | deleteColumns (dbFieldDescriptor *columns) |
| void | httpServerLoop () |
| void | startHttpServer (char const *address) |
| void | stopHttpServer (char const *address) |
| void | handleError (dbErrorClass error, char const *msg=NULL, int arg=0) |
| Error handler. | |
| void | error (char const *msg) |
| void | warning (char const *msg) |
| void | profile () |
| int | get () |
| void | unget (int ch) |
| int | scan () |
| bool | parse () |
| bool | expect (char *expected, int token) |
| void | recovery () |
| Perform database recovery after fault. | |
| void | exportDatabase (FILE *out) |
| bool | importDatabase (FILE *in) |
| void | exportScheme (FILE *out) |
| void | exportClass (FILE *out, char *name, dbFieldDescriptor *fieldList) |
| oid_t | mapId (long id) |
| bool | importField (char *terminator, dbFieldDescriptor *fd, byte *rec, dbXmlScanner &scanner) |
| bool | importRecord (char *terminator, dbFieldDescriptor *fieldList, byte *rec, dbXmlScanner &scanner) |
| void | insertRecord (dbTableDescriptor *desc, oid_t oid, void const *record) |
| bool | isValidOid (oid_t oid) |
| Check if OID corresponds to the valid object. | |
| void | dumpRecord (byte *record, dbFieldDescriptor *first) |
| int | initializeRecordFields (dbList *node, byte *dst, int offs, dbFieldDescriptor *first) |
| bool | insertRecord (dbList *list, dbTableDescriptor *desc) |
| bool | readCondition () |
| int | readExpression () |
| int | readValues (dbList **chain) |
| bool | updateFields (dbAnyCursor *cursor, dbUpdateElement *elems) |
| bool | updateTable (bool create) |
| int | parseType (char *&refTableName, char *&inverseRefName) |
| int | updateRecords (dbTableDescriptor *desc, dbList *fields, dbList *values, dbAnyCursor &cursor, byte *buf) |
| dbFieldDescriptor * | readFieldName () |
Static Private Member Functions | |
| static void thread_proc | httpServerThreadProc (void *arg) |
| static int | calculateRecordSize (dbList *list, int offs, dbFieldDescriptor *first) |
Private Attributes | |
| int | pos |
| int | line |
| int | tknPos |
| char * | buf |
| int | buflen |
| FILE * | in |
| bool | opened |
| db_int8 | ival |
| real8 | fval |
| char * | name |
| oid_t * | oidMap |
| oid_t | oidMapSize |
| dbTmpAllocator | tmpAlloc |
| dbTableDescriptor * | droppedTables |
| dbTableDescriptor * | existedTables |
| dbQuery | query |
| dbCompiler | compiler |
| int | ungetToken |
| bool | autocommit |
| bool | dotIsPartOfIdentifier |
| char * | dateFormat |
| dbThread | httpServerThread |
| HTTPapi * | httpServer |
| bool | httpServerRunning |
| char * | queryHistory [MAX_HISTORY_SIZE] |
| unsigned | historyUsed |
| unsigned | historyCurr |
Static Private Attributes | |
| static char * | prompt = ">> " |
| dbSubSql | ( | dbAccessType | accessType | ) |
| ~dbSubSql | ( | ) |
| void thread_proc httpServerThreadProc | ( | void * | arg | ) | [static, private] |
| void deleteColumns | ( | dbFieldDescriptor * | columns | ) | [private] |
| void httpServerLoop | ( | ) | [private] |
| void startHttpServer | ( | char const * | address | ) | [private] |
| void stopHttpServer | ( | char const * | address | ) | [private] |
| void handleError | ( | dbErrorClass | error, | |
| char const * | msg = NULL, |
|||
| int | arg = 0 | |||
| ) | [private, virtual] |
Error handler.
It can be redifined by application to implement application specific error handling.
| error | class of the error | |
| msg | error message | |
| arg | optional argument |
Reimplemented from dbDatabase.
| void error | ( | char const * | msg | ) | [private] |
| void warning | ( | char const * | msg | ) | [private] |
| void profile | ( | ) | [private] |
| int get | ( | ) | [private] |
| void unget | ( | int | ch | ) | [private] |
| int scan | ( | ) | [private] |
| bool parse | ( | ) | [private] |
| bool expect | ( | char * | expected, | |
| int | token | |||
| ) | [private] |
| void recovery | ( | ) | [private] |
| void exportDatabase | ( | FILE * | out | ) | [private] |
| bool importDatabase | ( | FILE * | in | ) | [private] |
| void exportScheme | ( | FILE * | out | ) | [private] |
| void exportClass | ( | FILE * | out, | |
| char * | name, | |||
| dbFieldDescriptor * | fieldList | |||
| ) | [private] |
| oid_t mapId | ( | long | id | ) | [private] |
| bool importField | ( | char * | terminator, | |
| dbFieldDescriptor * | fd, | |||
| byte * | rec, | |||
| dbXmlScanner & | scanner | |||
| ) | [private] |
| bool importRecord | ( | char * | terminator, | |
| dbFieldDescriptor * | fieldList, | |||
| byte * | rec, | |||
| dbXmlScanner & | scanner | |||
| ) | [private] |
| void insertRecord | ( | dbTableDescriptor * | desc, | |
| oid_t | oid, | |||
| void const * | record | |||
| ) | [private] |
| bool isValidOid | ( | oid_t | oid | ) | [private] |
Check if OID corresponds to the valid object.
| oid | inspected OID |
Reimplemented from dbDatabase.
| void dumpRecord | ( | byte * | record, | |
| dbFieldDescriptor * | first | |||
| ) | [private] |
| int calculateRecordSize | ( | dbList * | list, | |
| int | offs, | |||
| dbFieldDescriptor * | first | |||
| ) | [static, private] |
| int initializeRecordFields | ( | dbList * | node, | |
| byte * | dst, | |||
| int | offs, | |||
| dbFieldDescriptor * | first | |||
| ) | [private] |
| bool insertRecord | ( | dbList * | list, | |
| dbTableDescriptor * | desc | |||
| ) | [private] |
| bool readCondition | ( | ) | [private] |
| int readExpression | ( | ) | [private] |
| int readValues | ( | dbList ** | chain | ) | [private] |
| bool updateFields | ( | dbAnyCursor * | cursor, | |
| dbUpdateElement * | elems | |||
| ) | [private] |
| bool updateTable | ( | bool | create | ) | [private] |
| int parseType | ( | char *& | refTableName, | |
| char *& | inverseRefName | |||
| ) | [private] |
| int updateRecords | ( | dbTableDescriptor * | desc, | |
| dbList * | fields, | |||
| dbList * | values, | |||
| dbAnyCursor & | cursor, | |||
| byte * | buf | |||
| ) | [private] |
| dbFieldDescriptor * readFieldName | ( | ) | [private] |
| void run | ( | int | firstParam, | |
| int | argc, | |||
| char * | argv[] | |||
| ) |
| void selectionPage | ( | WWWconnection & | con | ) |
| void queryPage | ( | WWWconnection & | con | ) |
| void defaultPage | ( | WWWconnection & | con | ) |
int pos [private] |
int line [private] |
int tknPos [private] |
char* buf [private] |
int buflen [private] |
FILE* in [private] |
bool opened [private] |
Reimplemented from dbDatabase.
char* name [private] |
oid_t oidMapSize [private] |
dbTmpAllocator tmpAlloc [private] |
char * prompt = ">> " [static, private] |
dbTableDescriptor* droppedTables [private] |
dbTableDescriptor* existedTables [private] |
dbCompiler compiler [private] |
int ungetToken [private] |
bool autocommit [private] |
bool dotIsPartOfIdentifier [private] |
char* dateFormat [private] |
dbThread httpServerThread [private] |
HTTPapi* httpServer [private] |
bool httpServerRunning [private] |
char* queryHistory[MAX_HISTORY_SIZE] [private] |
unsigned historyUsed [private] |
unsigned historyCurr [private] |