Command class implements objectual mapping of a database query. More...
#include <DataCommand.h>
Public Types | |
| enum | COMMAND_TYPE { SP, INLINE, CURSOR } | 
| Database query type passed as a command type to be executed.  More... | |
| enum | QUERY_TYPE { QUERY, NONQUERY } | 
Public Member Functions | |
| DataCommand () | |
| DataCommand (const DataCommand::COMMAND_TYPE commandType, const DataCommand::QUERY_TYPE queryType, const string &statementString, const bool cacheable=false, const string &modStatementString="") | |
| Constructor.  More... | |
| DataCommand (const DataCommand &source) | |
| DataCommand & | operator= (const DataCommand &source) | 
| Assign operator.  More... | |
| ~DataCommand () | |
| DataCommand destructor.  More... | |
| DataCommand::COMMAND_TYPE | getCommandType () const | 
| the command type  More... | |
| void | setCommandType (const DataCommand::COMMAND_TYPE commandType) | 
| Set Command Type Method.  More... | |
| DataCommand::QUERY_TYPE | getQueryType () const | 
| the query type  More... | |
| bool | isQuery () const | 
| true if the DataCommand is a select query and false otherwise  More... | |
| void | setQueryType (const DataCommand::QUERY_TYPE queryType) | 
| *Set query type  More... | |
| string | getModifiedStatementString () const | 
| the modified statement string  More... | |
| void | setModifiedStatementString (const string &modStatementString) | 
| *Set the modified statement string  More... | |
| string | getStatementString () const | 
| bool | isCacheable () const | 
| the cacheable option  More... | |
| void | setCacheable (const bool cacheable) | 
| the cacheable option  More... | |
| const DataColumnBase & | getResultColumn (unsigned int index) const | 
| Get result set indexed column.  More... | |
| unsigned int | getResultColumnCount () const | 
| void | addResultColumn (const unsigned int index, const DataColumnBase *column) | 
| Add a result column to m_ResultColumns.  More... | |
Static Public Member Functions | |
| static string | ToString (COMMAND_TYPE type) | 
| Returns a friendly textual name of the COMMAND_TYPE values.  More... | |
Private Attributes | |
| DataCommand::COMMAND_TYPE | m_CommandType | 
| DataCommand::QUERY_TYPE | m_QueryType | 
| string | m_StatementString | 
| The SQL statement string of a Command.  More... | |
| string | m_ModifiedStatementString | 
| The modified SQL statement string of a Command m_Statement string ca be modified to reflect additional option sent along with the SQL statement to ExecuteQuery methods.  More... | |
| bool | m_Cacheable | 
| True if command is cacheable.  More... | |
| CacheManager< unsigned int,  DataColumnBase >  | m_ResultColumns | 
| Data member provided to store result set columns description.  More... | |
Command class implements objectual mapping of a database query.
Every database query is parsed and stored in data member of this class If Command is cachable it will be retained in a Database cache for subsequent use
Database query type passed as a command type to be executed.
| DataCommand::DataCommand | ( | ) | 
| DataCommand::DataCommand | ( | const DataCommand::COMMAND_TYPE | commandType, | 
| const DataCommand::QUERY_TYPE | queryType, | ||
| const string & | statementString, | ||
| const bool | cacheable = false,  | 
        ||
| const string & | modStatementString = ""  | 
        ||
| ) | 
Constructor.
| commandType | Type of the command. | 
| queryType | Type of the query. | 
| statementString | The statement string. | 
| cacheable | (optional) true to cache Command. | 
| modStatementString | (optional) the modifier statement string. | 
| DataCommand::DataCommand | ( | const DataCommand & | source | ) | 
| DataCommand::~DataCommand | ( | ) | 
DataCommand destructor.
      
  | 
  inline | 
Add a result column to m_ResultColumns.
| type | int index position of the resultcolumn | 
| type | DataColumnBase column to be added | 
      
  | 
  inline | 
the command type
      
  | 
  inline | 
the modified statement string
      
  | 
  inline | 
the query type
      
  | 
  inline | 
Get result set indexed column.
| int | index is the column position | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
the cacheable option
      
  | 
  inline | 
true if the DataCommand is a select query and false otherwise
| DataCommand & DataCommand::operator= | ( | const DataCommand & | source | ) | 
Assign operator.
| source | Source for the data command. | 
      
  | 
  inline | 
the cacheable option
      
  | 
  inline | 
Set Command Type Method.
      
  | 
  inline | 
*Set the modified statement string
      
  | 
  inline | 
*Set query type
      
  | 
  static | 
Returns a friendly textual name of the COMMAND_TYPE values.
| type | The type of the command as defined by COMMAND_TYPE type | 
      
  | 
  private | 
True if command is cacheable.
Default value set by .ctor is false
      
  | 
  private | 
      
  | 
  private | 
The modified SQL statement string of a Command m_Statement string ca be modified to reflect additional option sent along with the SQL statement to ExecuteQuery methods.
      
  | 
  private | 
      
  | 
  private | 
Data member provided to store result set columns description.
      
  | 
  private | 
The SQL statement string of a Command.