accessCommandFactory.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #pragma once
00010 
00011 #include "databaseCommandFactory.h"
00012 #include "databaseColumn.h"
00013 
00014 #include <map>
00015 
00016 class DtString;
00017 class DT_DLL_VLDB DtAccessCommandFactory : public DtDatabaseCommandFactory
00018 {
00019 public:
00020    DtAccessCommandFactory();
00021    virtual ~DtAccessCommandFactory();
00022 
00023    // Request the creation of a database (currently, you must be connected to
00024    // a master database to perform this operation)
00025    virtual DtString createDatabase( const DtString& databaseName );
00026 
00027    // Request the creation of a database, if it exists (currently, you must be 
00028    // connected to a master database to perform this operation)
00029    virtual DtString deleteDatabase( const DtString& dbName );
00030 
00032    virtual DtString createTable( const DtDatabaseTable& table);
00033 
00035    virtual DtString deleteTable( const DtDatabaseTable& table);
00036 
00038    virtual void insertTable( std::vector<DtString>& commands,const DtDatabaseTable& table);
00039 
00040    virtual DtString updateTable( const DtDatabaseTable& table,
00041       const std::vector<DtString>& columnsToSet,
00042       const DtString& whereCondition);
00043 
00045    virtual DtString createConditionString( const DtDatabaseColumn& column,
00046       const DtString& columnValue,ConditionOperator anOperator);
00047 
00049    virtual DtString combineConditionStrings( const DtString& conditionOne, 
00050       const DtString& conditionTwo, MergeOperator anOperator );
00051 
00052 protected:
00053 
00054    static unsigned int theMaximumColumnSize;
00055    static unsigned int theMaximumNotesSize;
00056 
00058    virtual const DtString& translateName(const DtString&);
00059 
00061    virtual int validDisplaySize(int size);
00062 
00063    virtual DtString createArgList(const DtDatabaseTable& table);
00064    virtual DtString createColumnList(const DtDatabaseTable& table);
00065    virtual DtString createColumnRep(const DtDatabaseColumn& column);
00066    virtual DtString dataTypeToSqlString( const DtDatabaseColumn& column);   
00067    typedef std::map<DtString,DtString> TranslationMap;
00068    TranslationMap myTranslationMap;
00069 };

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)