sqlCommandFactory.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef sqlCommandFactory_H_
00010 #define sqlCommandFactory_H_
00011 
00012 #include "databaseCommandFactory.h"
00013 #include "databaseColumn.h"
00014 
00015 class DtString;
00016 class DT_DLL_VLDB DtSqlCommandFactory : public DtDatabaseCommandFactory
00017 {
00018 public:
00019    DtSqlCommandFactory();
00020    virtual ~DtSqlCommandFactory();
00021 
00022    // Request the creation of a database (currently, you must be connected to
00023    // a master database to perform this operation)
00024    virtual DtString createDatabase( const DtString& databaseName );
00025 
00026    // Request the creation of a database, if it exists (currently, you must be 
00027    // connected to a master database to perform this operation)
00028    virtual DtString deleteDatabase( const DtString& dbName );
00029 
00031    virtual DtString createTable( const DtDatabaseTable& table);
00032 
00034    virtual DtString deleteTable( const DtDatabaseTable& table);
00035 
00037    virtual void insertTable( std::vector<DtString>& commands,const DtDatabaseTable& table);
00038 
00039    virtual DtString updateTable( const DtDatabaseTable& table,
00040       const std::vector<DtString>& columnsToSet,
00041       const DtString& whereCondition);
00042 
00044    virtual DtString createConditionString( const DtDatabaseColumn& column,
00045       const DtString& columnValue,ConditionOperator anOperator);
00046 
00048    virtual DtString combineConditionStrings( const DtString& conditionOne, 
00049       const DtString& conditionTwo, MergeOperator anOperator );
00050 
00051 protected:
00052    virtual DtString createArgList(const DtDatabaseTable& table);
00053    virtual DtString createColumnList(const DtDatabaseTable& table);
00054    virtual DtString createColumnRep(const DtDatabaseColumn& column);
00055    virtual DtString dataTypeToSqlString( DtDatabaseColumn::DataType storageType);
00056 
00057 };
00058 
00059 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)