WORM 0.2
A C++ DAL/ORM code generation framework
Namespaces | Classes | Enumerations | Functions

WSql Namespace Reference

Namespaces

namespace  WSqlDataType
 

WSqlDataType namespace - Utilities and definitions of supported data types.


Classes

class  WormClassGenerator
 The main class in the ORM generator. More...
class  WormCodeTemplate
class  WMysqlDriver
 A driver for MySQL databases. More...
class  WMysqlResult
 WMysqlResult is the type of result set used by the MySQL driver. More...
class  WSqliteDriver
class  WSqliteResult
 WSqliteResult is the type of result set used by the sqlite driver. More...
class  WSqlColumn
 The WSqlColumn class represents a column in SQL database tables. More...
class  WSqlDabataseManager
class  WSqlDatabase
 The WSqlDatabase class represents a single database. More...
class  WSqlDatum
 The WSqlDatum class represents an abstraction of a data element retrieved from a database. More...
class  WSqlDriver
 The WSqlDriver class is an abstract base class for database drivers. More...
class  WSqlDriverFactory
class  WSqlError
 The WSqlError class provides SQL database and driver error information. More...
class  WSqlField
 The WSqlField class represents a field in a record. More...
class  WSqlForeignKey
 WSqlForeignKey provides an abstraction of a foreign key in a database. More...
class  WSqlRecord
 The WSqlRecord class represents a database record. More...
class  WSqlReferencedKey
 WSqlReferencedKey provides an abstraction of a referenced column in a database. More...
class  WSqlResult
 The WSqlResult class provides a representation of the result set from a query. More...
class  WSqlTable
 WSqlTable is an abstraction for a single table, collection or view in a database. More...

Enumerations

enum  TableType { Tables = 0x01, InformationSchema = 0x02, Views = 0x04, AllTables = 0xff }
enum  DriverType {
  NONE, WMYSQL, WSQLITE, WPSQL,
  WMONGO, WBERKLEYDB
}

Functions

bool isForeignKeyDefinition (std::string sql)
bool isIndexDefinition (std::string sql)
WSqlForeignKey createForeignKey (std::string sqldef)
void splitIntoDefinitions (std::vector< std::string > &vecToFill, std::string sql)

static const
::ctemplate::StaticTemplateString 
kcd_INCLUDES = STS_INIT_WITH_HASH(kcd_INCLUDES, "INCLUDES", 7699670683738647257LLU)
static const
::ctemplate::StaticTemplateString 
kcd_INCLUDE = STS_INIT_WITH_HASH(kcd_INCLUDE, "INCLUDE", 434435386609578605LLU)
static const
::ctemplate::StaticTemplateString 
kcd_FORWARD_DECLARATIONS = STS_INIT_WITH_HASH(kcd_FORWARD_DECLARATIONS, "FORWARD_DECLARATIONS", 15273852411010322531LLU)
static const
::ctemplate::StaticTemplateString 
kcd_REFERENCED_CLASSNAME = STS_INIT_WITH_HASH(kcd_REFERENCED_CLASSNAME, "REFERENCED_CLASSNAME", 5376938313052943395LLU)
static const
::ctemplate::StaticTemplateString 
kcd_CLASS_NAME = STS_INIT_WITH_HASH(kcd_CLASS_NAME, "CLASS_NAME", 13981977283673860485LLU)
static const
::ctemplate::StaticTemplateString 
kcd_BELONGS_TO = STS_INIT_WITH_HASH(kcd_BELONGS_TO, "BELONGS_TO", 15166195752158467517LLU)
static const
::ctemplate::StaticTemplateString 
kcd_HAS_MANY = STS_INIT_WITH_HASH(kcd_HAS_MANY, "HAS_MANY", 12417993436827992317LLU)
static const
::ctemplate::StaticTemplateString 
kcd_FOREIGNKEY_CLASSNAME = STS_INIT_WITH_HASH(kcd_FOREIGNKEY_CLASSNAME, "FOREIGNKEY_CLASSNAME", 14113744978891695861LLU)
static const
::ctemplate::StaticTemplateString 
kcd_FOREIGNKEY_CLASS_PLURAL = STS_INIT_WITH_HASH(kcd_FOREIGNKEY_CLASS_PLURAL, "FOREIGNKEY_CLASS_PLURAL", 13464148753922874173LLU)
static const
::ctemplate::StaticTemplateString 
kcd_COLUMNS = STS_INIT_WITH_HASH(kcd_COLUMNS, "COLUMNS", 15302874640052016969LLU)
static const
::ctemplate::StaticTemplateString 
kcd_UNSUPPORTED = STS_INIT_WITH_HASH(kcd_UNSUPPORTED, "UNSUPPORTED", 8112833089436120679LLU)
static const
::ctemplate::StaticTemplateString 
kcd_UNSIGNED = STS_INIT_WITH_HASH(kcd_UNSIGNED, "UNSIGNED", 10867561526856517727LLU)
static const
::ctemplate::StaticTemplateString 
kcd_DATATYPE = STS_INIT_WITH_HASH(kcd_DATATYPE, "DATATYPE", 6518949878326190781LLU)
static const
::ctemplate::StaticTemplateString 
kcd_VARIABLE_GETTOR = STS_INIT_WITH_HASH(kcd_VARIABLE_GETTOR, "VARIABLE_GETTOR", 4376112485907229951LLU)
static const
::ctemplate::StaticTemplateString 
kcd_VARIABLE_NAME = STS_INIT_WITH_HASH(kcd_VARIABLE_NAME, "VARIABLE_NAME", 5051229879184672055LLU)
static const
::ctemplate::StaticTemplateString 
kcd_VARIABLE_SETTOR = STS_INIT_WITH_HASH(kcd_VARIABLE_SETTOR, "VARIABLE_SETTOR", 18309610407346123363LLU)
static const
::ctemplate::StaticTemplateString 
kcd_COLUMN_NAME = STS_INIT_WITH_HASH(kcd_COLUMN_NAME, "COLUMN_NAME", 16524890828269290931LLU)
static const
::ctemplate::StaticTemplateString 
kcd_REFERENCED_TABLENAME = STS_INIT_WITH_HASH(kcd_REFERENCED_TABLENAME, "REFERENCED_TABLENAME", 14486319327059551333LLU)
static const
::ctemplate::StaticTemplateString 
kcd_TABLE_NAME = STS_INIT_WITH_HASH(kcd_TABLE_NAME, "TABLE_NAME", 3760310134096538793LLU)

Detailed Description

WSql namespace contains both DAL and ORM classes as well as type flags and convenience functions.

Todo:
FINISH ME .. comments
Todo:
CHECKME ..test

Enumeration Type Documentation

Enumerator:
NONE 
WMYSQL 
WSQLITE 
WPSQL 
WMONGO 
WBERKLEYDB 

Definition at line 18 of file wsql.h.

Enumerator:
Tables 
InformationSchema 
Views 
AllTables 

Definition at line 10 of file wsql.h.


Function Documentation

WSqlForeignKey WSql::createForeignKey ( std::string  sqldef)

Definition at line 88 of file wsqlitedriver.cpp.

bool WSql::isForeignKeyDefinition ( std::string  sql)

Definition at line 66 of file wsqlitedriver.cpp.

bool WSql::isIndexDefinition ( std::string  sql)

Definition at line 72 of file wsqlitedriver.cpp.

void WSql::splitIntoDefinitions ( std::vector< std::string > &  vecToFill,
std::string  sql 
)

Definition at line 145 of file wsqlitedriver.cpp.


Variable Documentation

const ::ctemplate::StaticTemplateString WSql::kcd_BELONGS_TO = STS_INIT_WITH_HASH(kcd_BELONGS_TO, "BELONGS_TO", 15166195752158467517LLU) [static]

Definition at line 40 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_CLASS_NAME = STS_INIT_WITH_HASH(kcd_CLASS_NAME, "CLASS_NAME", 13981977283673860485LLU) [static]

Definition at line 39 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_COLUMN_NAME = STS_INIT_WITH_HASH(kcd_COLUMN_NAME, "COLUMN_NAME", 16524890828269290931LLU) [static]

Definition at line 51 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_COLUMNS = STS_INIT_WITH_HASH(kcd_COLUMNS, "COLUMNS", 15302874640052016969LLU) [static]

Definition at line 44 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_DATATYPE = STS_INIT_WITH_HASH(kcd_DATATYPE, "DATATYPE", 6518949878326190781LLU) [static]

Definition at line 47 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_FOREIGNKEY_CLASS_PLURAL = STS_INIT_WITH_HASH(kcd_FOREIGNKEY_CLASS_PLURAL, "FOREIGNKEY_CLASS_PLURAL", 13464148753922874173LLU) [static]

Definition at line 43 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_FOREIGNKEY_CLASSNAME = STS_INIT_WITH_HASH(kcd_FOREIGNKEY_CLASSNAME, "FOREIGNKEY_CLASSNAME", 14113744978891695861LLU) [static]

Definition at line 42 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_FORWARD_DECLARATIONS = STS_INIT_WITH_HASH(kcd_FORWARD_DECLARATIONS, "FORWARD_DECLARATIONS", 15273852411010322531LLU) [static]

Definition at line 37 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_HAS_MANY = STS_INIT_WITH_HASH(kcd_HAS_MANY, "HAS_MANY", 12417993436827992317LLU) [static]

Definition at line 41 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_INCLUDE = STS_INIT_WITH_HASH(kcd_INCLUDE, "INCLUDE", 434435386609578605LLU) [static]

Definition at line 36 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_INCLUDES = STS_INIT_WITH_HASH(kcd_INCLUDES, "INCLUDES", 7699670683738647257LLU) [static]

These are hashed string constants for refering to the marker tags used in the templates

Definition at line 35 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_REFERENCED_CLASSNAME = STS_INIT_WITH_HASH(kcd_REFERENCED_CLASSNAME, "REFERENCED_CLASSNAME", 5376938313052943395LLU) [static]

Definition at line 38 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_REFERENCED_TABLENAME = STS_INIT_WITH_HASH(kcd_REFERENCED_TABLENAME, "REFERENCED_TABLENAME", 14486319327059551333LLU) [static]

Definition at line 52 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_TABLE_NAME = STS_INIT_WITH_HASH(kcd_TABLE_NAME, "TABLE_NAME", 3760310134096538793LLU) [static]

Definition at line 53 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_UNSIGNED = STS_INIT_WITH_HASH(kcd_UNSIGNED, "UNSIGNED", 10867561526856517727LLU) [static]

Definition at line 46 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_UNSUPPORTED = STS_INIT_WITH_HASH(kcd_UNSUPPORTED, "UNSUPPORTED", 8112833089436120679LLU) [static]

Definition at line 45 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_VARIABLE_GETTOR = STS_INIT_WITH_HASH(kcd_VARIABLE_GETTOR, "VARIABLE_GETTOR", 4376112485907229951LLU) [static]

Definition at line 48 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_VARIABLE_NAME = STS_INIT_WITH_HASH(kcd_VARIABLE_NAME, "VARIABLE_NAME", 5051229879184672055LLU) [static]

Definition at line 49 of file wormclassgenerator.cpp.

const ::ctemplate::StaticTemplateString WSql::kcd_VARIABLE_SETTOR = STS_INIT_WITH_HASH(kcd_VARIABLE_SETTOR, "VARIABLE_SETTOR", 18309610407346123363LLU) [static]

Definition at line 50 of file wormclassgenerator.cpp.

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines