- Main Page
- Namespaces
- Classes
- Files

# MySqlOvStorageEngineType.h

Go to the documentation of this file.

    00001 #ifndef MYSQLOVSTORAGEENGINETYPE_H
    00002 #define MYSQLOVSTORAGEENGINETYPE_H
    00003
    00004 //
    00005 //
    00006 // Copyright (C) 2004-2006  Autodesk, Inc.
    00007 //
    00008 // This library is free software; you can redistribute it and/or
    00009 // modify it under the terms of version 2.1 of the GNU Lesser
    00010 // General Public License as published by the Free Software Foundation.
    00011 //
    00012 // This library is distributed in the hope that it will be useful,
    00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015 // Lesser General Public License for more details.
    00016 //
    00017 // You should have received a copy of the GNU Lesser General Public
    00018 // License along with this library; if not, write to the Free Software
    00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00020 //
    00021 #include <Rdbms/Override/MySQL/MySqlOv.h>
    00022
    00023 /// \brief
    00024 /// Enumerated type representing the possible storage engine types for MySQL tables
    00025 /// <param name="MySQLOvStorageEngineType_MyISAM">
    00026 /// The binary portable storage engine that is the improved replacement for ISAM
    00027 /// </param>
    00028 /// <param name="MySQLOvStorageEngineType_ISAM">
    00029 /// The original MySQL storage engine
    00030 /// </param>
    00031 /// <param name="MySQLOvStorageEngineType_InnoDB">
    00032 /// Transaction-safe tables with row locking and foreign keys
    00033 /// </param>
    00034 /// <param name="MySQLOvStorageEngineType_BDB">
    00035 /// BerkeleyDB; Transaction-safe tables with page locking
    00036 /// </param>
    00037 /// <param name="MySQLOvStorageEngineType_Merge">
    00038 /// A collection of MyISAM tables used as one table
    00039 /// </param>
    00040 /// <param name="MySQLOvStorageEngineType_Memory">
    00041 /// The data for this table is stored only in memory.  Also known as the Heap storage engine
    00042 /// </param>
    00043 /// <param name="MySQLOvStorageEngineType_Federated">
    00044 /// Storage engine that accesses remote tables
    00045 /// </param>
    00046 /// <param name="MySQLOvStorageEngineType_Archive">
    00047 /// The archiving storage engine
    00048 /// </param>
    00049 /// <param name="MySQLOvStorageEngineType_CSV">
    00050 /// Tables that store rows in comma-separated values format
    00051 /// </param>
    00052 /// <param name="MySQLOvStorageEngineType_Example">
    00053 /// An example engine
    00054 /// </param>
    00055 /// <param name="MySQLOvStorageEngineType_NDBClustered">
    00056 /// Clustered, fault-tolerant, memory-based tables
    00057 /// </param>
    00058 /// <param name="MySQLOvStorageEngineType_Unknown">
    00059 /// The storage engine is unknown
    00060 /// </param>
    00061 /// <param name="MySQLOvStorageEngineType_Default">
    00062 /// The storage engine override is inherited from somewhere else.
    00063 /// </param>
    00064 enum MySQLOvStorageEngineType
    00065 {
    00066     MySQLOvStorageEngineType_MyISAM,
    00067     MySQLOvStorageEngineType_ISAM,
    00068     MySQLOvStorageEngineType_InnoDB,
    00069     MySQLOvStorageEngineType_BDB,
    00070     MySQLOvStorageEngineType_Merge,
    00071     MySQLOvStorageEngineType_Memory,
    00072     MySQLOvStorageEngineType_Federated,
    00073     MySQLOvStorageEngineType_Archive,
    00074     MySQLOvStorageEngineType_CSV,
    00075     MySQLOvStorageEngineType_Example,
    00076     MySQLOvStorageEngineType_NDBClustered,
    00077     MySQLOvStorageEngineType_Unknown,
    00078     MySQLOvStorageEngineType_Default
    00079 };
    00080
    00081 /// \brief
    00082 /// XML string constants corresponding to the enumerated type MySQLOvStorageEngineType.
    00083 namespace FdoMySQLOverrides
    00084 {
    00085     static const FdoString* StorageEngineType_MyISAM       = L"MyISAM";
    00086     static const FdoString* StorageEngineType_ISAM         = L"ISAM";
    00087     static const FdoString* StorageEngineType_InnoDB       = L"InnoDB";
    00088     static const FdoString* StorageEngineType_BDB          = L"BDB";
    00089     static const FdoString* StorageEngineType_Merge        = L"Merge";
    00090     static const FdoString* StorageEngineType_Memory       = L"Memory";
    00091     static const FdoString* StorageEngineType_Federated    = L"Federated";
    00092     static const FdoString* StorageEngineType_Archive      = L"Archive";
    00093     static const FdoString* StorageEngineType_CSV          = L"CSV";
    00094     static const FdoString* StorageEngineType_Example      = L"Example";
    00095     static const FdoString* StorageEngineType_NDBClustered = L"NDBClustered";
    00096     static const FdoString* StorageEngineType_Unknown      = L"Unknown";
    00097     static const FdoString* StorageEngineType_Default      = L"Default";
    00098 }
    00099
    00100 static MySQLOvStorageEngineType StorageEngine_StringToEnum(FdoString* storageEngineTypeString, FdoXmlSaxContext* pContext = NULL)
    00101 {
    00102     MySQLOvStorageEngineType ret;
    00103
    00104     if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_MyISAM))
    00105         ret = MySQLOvStorageEngineType_MyISAM;
    00106     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_ISAM))
    00107         ret = MySQLOvStorageEngineType_ISAM;
    00108     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_InnoDB))
    00109         ret = MySQLOvStorageEngineType_InnoDB;
    00110     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_BDB))
    00111         ret = MySQLOvStorageEngineType_BDB;
    00112     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Merge))
    00113         ret = MySQLOvStorageEngineType_Merge;
    00114     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Memory))
    00115         ret = MySQLOvStorageEngineType_Memory;
    00116     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Federated))
    00117         ret = MySQLOvStorageEngineType_Federated;
    00118     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Archive))
    00119         ret = MySQLOvStorageEngineType_Archive;
    00120     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_CSV))
    00121         ret = MySQLOvStorageEngineType_CSV;
    00122     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Example))
    00123         ret = MySQLOvStorageEngineType_Example;
    00124     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_NDBClustered))
    00125         ret = MySQLOvStorageEngineType_NDBClustered;
    00126     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Unknown))
    00127         ret = MySQLOvStorageEngineType_Unknown;
    00128     else if (0==wcscmp(storageEngineTypeString, FdoMySQLOverrides::StorageEngineType_Default))
    00129         ret = MySQLOvStorageEngineType_Default;
    00130     else
    00131     {
    00132         ret = MySQLOvStorageEngineType_Default;
    00133         if (pContext != NULL)
    00134         {
    00135             FdoPtr<FdoException> e = FdoException::Create(L"TODO");
    00136             pContext->AddError(e);
    00137         }
    00138     }
    00139
    00140     return ret;
    00141 }
    00142
    00143 static FdoString* StorageEngine_EnumToString(MySQLOvStorageEngineType storageEngineTypeEnum)
    00144 {
    00145     if (storageEngineTypeEnum == MySQLOvStorageEngineType_MyISAM)
    00146         return FdoMySQLOverrides::StorageEngineType_MyISAM;
    00147     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_ISAM)
    00148         return FdoMySQLOverrides::StorageEngineType_ISAM;
    00149     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_InnoDB)
    00150         return FdoMySQLOverrides::StorageEngineType_InnoDB;
    00151     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_BDB)
    00152         return FdoMySQLOverrides::StorageEngineType_BDB;
    00153     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Merge)
    00154         return FdoMySQLOverrides::StorageEngineType_Merge;
    00155     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Memory)
    00156         return FdoMySQLOverrides::StorageEngineType_Memory;
    00157     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Federated)
    00158         return FdoMySQLOverrides::StorageEngineType_Federated;
    00159     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Archive)
    00160         return FdoMySQLOverrides::StorageEngineType_Archive;
    00161     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_CSV)
    00162         return FdoMySQLOverrides::StorageEngineType_CSV;
    00163     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Example)
    00164         return FdoMySQLOverrides::StorageEngineType_Example;
    00165     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_NDBClustered)
    00166         return FdoMySQLOverrides::StorageEngineType_NDBClustered;
    00167     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Unknown)
    00168         return FdoMySQLOverrides::StorageEngineType_Unknown;
    00169     else if (storageEngineTypeEnum == MySQLOvStorageEngineType_Default)
    00170         return FdoMySQLOverrides::StorageEngineType_Default;
    00171     else
    00172         throw FdoException::Create(L"TODO");
    00173 }
    00174
    00175
    00176 #endif  // MYSQLOVSTORAGEENGINETYPE_H
    00177
    00178

Please send us your comment about this page