#include <Statement.h>
Inheritance diagram for CreateIdxStatement:
Public Member Functions | |
DbRetVal | execute (int &rowsAffected) |
DbRetVal | resolve () |
CreateIdxStatement () | |
~CreateIdxStatement () | |
DbRetVal | execute (int &rowsAffected) |
DbRetVal | resolve () |
CreateIdxStatement () | |
~CreateIdxStatement () |
Definition at line 254 of file Statement.h.
CreateIdxStatement::CreateIdxStatement | ( | ) |
Definition at line 96 of file DdlStatement.cxx.
References Statement::dbMgr, and Statement::parsedData.
00097 { 00098 parsedData = NULL; 00099 dbMgr = NULL; 00100 }
CreateIdxStatement::~CreateIdxStatement | ( | ) |
CreateIdxStatement::CreateIdxStatement | ( | ) |
CreateIdxStatement::~CreateIdxStatement | ( | ) |
DbRetVal CreateIdxStatement::execute | ( | int & | rowsAffected | ) | [virtual] |
Implements DdlStatement.
DbRetVal CreateIdxStatement::execute | ( | int & | rowsAffected | ) | [virtual] |
Implements DdlStatement.
Definition at line 107 of file DdlStatement.cxx.
References DatabaseManager::createIndex(), Statement::dbMgr, FieldName::fldName, ParsedData::getFieldNameList(), ParsedData::getIndexName(), ParsedData::getIndexType(), List::getIterator(), ParsedData::getPrimary(), ParsedData::getTableName(), ParsedData::getUnique(), OK, Statement::parsedData, and List::size().
00108 { 00109 DbRetVal rv = OK; 00110 if (parsedData->getFieldNameList().size() > 0) 00111 { 00112 HashIndexInitInfo *idxInfo = new HashIndexInitInfo(); 00113 strcpy(idxInfo->tableName, parsedData->getTableName()); 00114 ListIterator iter = parsedData->getFieldNameList().getIterator(); 00115 FieldName *name = NULL; 00116 while (iter.hasElement()) 00117 { 00118 name = (FieldName*)iter.nextElement(); 00119 idxInfo->list.append(name->fldName); 00120 } 00121 idxInfo->indType = parsedData->getIndexType(); 00122 idxInfo->isPrimary = parsedData->getPrimary(); 00123 idxInfo->isUnique = parsedData->getUnique(); 00124 rv = dbMgr->createIndex(parsedData->getIndexName(), idxInfo); 00125 delete idxInfo; 00126 } 00127 return rv; 00128 }
Here is the call graph for this function:
DbRetVal CreateIdxStatement::resolve | ( | ) | [inline, virtual] |
Implements DdlStatement.
Definition at line 265 of file Statement.h.
References OK.
00265 {return OK; }
DbRetVal CreateIdxStatement::resolve | ( | ) | [inline, virtual] |
Implements DdlStatement.
Definition at line 258 of file Statement.h.
References OK.
00258 {return OK; }