uSQL for C++
uSQL::SQLNode Class Referenceabstract

#include <SQLNode.h>

Inheritance diagram for uSQL::SQLNode:
uSQL::SQLCollection uSQL::SQLCommand uSQL::SQLExpression uSQL::SQLIndex uSQL::SQLLimit uSQL::SQLOffset uSQL::SQLOrderBy uSQL::SQLStatement uSQL::SQLTransaction

Public Member Functions

 SQLNode ()
 
virtual ~SQLNode ()
 
void setType (int type)
 
int getType ()
 
bool isType (int type)
 
virtual const char * getTypeName ()=0
 
void setValue (const std::string &value)
 
const std::string & getValue ()
 
bool equals (const std::string &value)
 
void setParentNode (SQLNode *node)
 
SQLNodegetParentNode ()
 
SQLNodegetRootNode ()
 
void addChildNode (SQLNode *node)
 
void addChildNodes (SQLNodeList *nodeList)
 
bool hasChildNodes ()
 
int getChildCount ()
 
SQLNodeListgetChildNodes ()
 
SQLNodegetChildNode (size_t index)
 
SQLNodefindChildNodeByType (int type)
 
void clearChildNodes ()
 
bool isExpressionNode ()
 
bool isOperatorNode ()
 
bool isStatementNode ()
 
bool isDictionaryNode ()
 
bool isColumnsNode ()
 
bool isCollectionsNode ()
 
bool isValuesNode ()
 
bool isUnQLNode ()
 
virtual std::string & toString (std::string &buf)
 
const std::string & toString ()
 

Static Public Attributes

static const int COLLECTION = 12
 
static const int COLLECTIONS = 27
 
static const int CONDITION = 6
 
static const int COLUMNS = 4
 
static const int COMMAND = 1
 
static const int EXPRESSION = 13
 
static const int FUNCTION = 5
 
static const int GROUPBY = 19
 
static const int HAVING = 20
 
static const int INDEX = 21
 
static const int LIMIT = 10
 
static const int OFFSET = 11
 
static const int OPERATOR = 18
 
static const int OPTION = 17
 
static const int ORDER = 8
 
static const int ORDERBY = 9
 
static const int SET = 25
 
static const int SETS = 28
 
static const int STATEMENT = 26
 
static const int TRANSACTION = 22
 
static const int WHERE = 7
 
static const int VALUES = 15
 

Protected Member Functions

std::string & childNodesToString (std::string &buf, std::string delim=" ")
 

Private Member Functions

bool isStatementType (int type)
 

Private Attributes

int type
 
SQLNodeparent
 
SQLNodeList children
 
std::string value
 
std::string nodeString
 

Constructor & Destructor Documentation

◆ SQLNode()

uSQL::SQLNode::SQLNode ( )

◆ ~SQLNode()

uSQL::SQLNode::~SQLNode ( )
virtual

Member Function Documentation

◆ addChildNode()

void uSQL::SQLNode::addChildNode ( SQLNode node)
inline

◆ addChildNodes()

void uSQL::SQLNode::addChildNodes ( SQLNodeList nodeList)
inline

◆ childNodesToString()

std::string & uSQL::SQLNode::childNodesToString ( std::string &  buf,
std::string  delim = " " 
)
protected

◆ clearChildNodes()

void uSQL::SQLNode::clearChildNodes ( )
inline

◆ equals()

bool uSQL::SQLNode::equals ( const std::string &  value)
inline

◆ findChildNodeByType()

uSQL::SQLNode * uSQL::SQLNode::findChildNodeByType ( int  type)

◆ getChildCount()

int uSQL::SQLNode::getChildCount ( )
inline

◆ getChildNode()

uSQL::SQLNode * uSQL::SQLNode::getChildNode ( size_t  index)

◆ getChildNodes()

SQLNodeList* uSQL::SQLNode::getChildNodes ( )
inline

◆ getParentNode()

SQLNode* uSQL::SQLNode::getParentNode ( )
inline

◆ getRootNode()

SQLNode* uSQL::SQLNode::getRootNode ( )
inline

◆ getType()

int uSQL::SQLNode::getType ( )
inline

◆ getTypeName()

◆ getValue()

const std::string& uSQL::SQLNode::getValue ( )
inline

◆ hasChildNodes()

bool uSQL::SQLNode::hasChildNodes ( )
inline

◆ isCollectionsNode()

bool uSQL::SQLNode::isCollectionsNode ( )

◆ isColumnsNode()

bool uSQL::SQLNode::isColumnsNode ( )

◆ isDictionaryNode()

bool uSQL::SQLNode::isDictionaryNode ( )

◆ isExpressionNode()

bool uSQL::SQLNode::isExpressionNode ( )

◆ isOperatorNode()

bool uSQL::SQLNode::isOperatorNode ( )

◆ isStatementNode()

bool uSQL::SQLNode::isStatementNode ( )

◆ isStatementType()

bool uSQL::SQLNode::isStatementType ( int  type)
private

◆ isType()

bool uSQL::SQLNode::isType ( int  type)
inline

◆ isUnQLNode()

bool uSQL::SQLNode::isUnQLNode ( )

◆ isValuesNode()

bool uSQL::SQLNode::isValuesNode ( )

◆ setParentNode()

void uSQL::SQLNode::setParentNode ( SQLNode node)
inline

◆ setType()

void uSQL::SQLNode::setType ( int  type)
inline

◆ setValue()

void uSQL::SQLNode::setValue ( const std::string &  value)
inline

◆ toString() [1/2]

◆ toString() [2/2]

const std::string& uSQL::SQLNode::toString ( )
inline

Field Documentation

◆ children

SQLNodeList uSQL::SQLNode::children
private

◆ COLLECTION

const int uSQL::SQLNode::COLLECTION = 12
static

◆ COLLECTIONS

const int uSQL::SQLNode::COLLECTIONS = 27
static

◆ COLUMNS

const int uSQL::SQLNode::COLUMNS = 4
static

◆ COMMAND

const int uSQL::SQLNode::COMMAND = 1
static

◆ CONDITION

const int uSQL::SQLNode::CONDITION = 6
static

◆ EXPRESSION

const int uSQL::SQLNode::EXPRESSION = 13
static

◆ FUNCTION

const int uSQL::SQLNode::FUNCTION = 5
static

◆ GROUPBY

const int uSQL::SQLNode::GROUPBY = 19
static

◆ HAVING

const int uSQL::SQLNode::HAVING = 20
static

◆ INDEX

const int uSQL::SQLNode::INDEX = 21
static

◆ LIMIT

const int uSQL::SQLNode::LIMIT = 10
static

◆ nodeString

std::string uSQL::SQLNode::nodeString
private

◆ OFFSET

const int uSQL::SQLNode::OFFSET = 11
static

◆ OPERATOR

const int uSQL::SQLNode::OPERATOR = 18
static

◆ OPTION

const int uSQL::SQLNode::OPTION = 17
static

◆ ORDER

const int uSQL::SQLNode::ORDER = 8
static

◆ ORDERBY

const int uSQL::SQLNode::ORDERBY = 9
static

◆ parent

SQLNode* uSQL::SQLNode::parent
private

◆ SET

const int uSQL::SQLNode::SET = 25
static

◆ SETS

const int uSQL::SQLNode::SETS = 28
static

◆ STATEMENT

const int uSQL::SQLNode::STATEMENT = 26
static

◆ TRANSACTION

const int uSQL::SQLNode::TRANSACTION = 22
static

◆ type

int uSQL::SQLNode::type
private

◆ value

std::string uSQL::SQLNode::value
private

◆ VALUES

const int uSQL::SQLNode::VALUES = 15
static

◆ WHERE

const int uSQL::SQLNode::WHERE = 7
static

The documentation for this class was generated from the following files: