ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isap...@apache.org
Subject [3/6] ignite git commit: IGNITE-3581: Moved enums to separate structs for C++
Date Thu, 13 Apr 2017 16:06:54 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h b/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
index 32f3520..2439696 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
@@ -37,23 +37,26 @@ namespace ignite
                     /**
                      * Children windows ids.
                      */
-                    enum ChildId
+                    struct ChildId
                     {
-                        ID_CONNECTION_SETTINGS_GROUP_BOX,
-                        ID_NAME_EDIT,
-                        ID_NAME_LABEL,
-                        ID_ADDRESS_EDIT,
-                        ID_ADDRESS_LABEL,
-                        ID_CACHE_EDIT,
-                        ID_CACHE_LABEL,
-                        ID_PAGE_SIZE_EDIT,
-                        ID_PAGE_SIZE_LABEL,
-                        ID_DISTRIBUTED_JOINS_CHECK_BOX,
-                        ID_ENFORCE_JOIN_ORDER_CHECK_BOX,
-                        ID_PROTOCOL_VERSION_LABEL,
-                        ID_PROTOCOL_VERSION_COMBO_BOX,
-                        ID_OK_BUTTON,
-                        ID_CANCEL_BUTTON
+                        enum Type
+                        {
+                            CONNECTION_SETTINGS_GROUP_BOX,
+                            NAME_EDIT,
+                            NAME_LABEL,
+                            ADDRESS_EDIT,
+                            ADDRESS_LABEL,
+                            CACHE_EDIT,
+                            CACHE_LABEL,
+                            PAGE_SIZE_EDIT,
+                            PAGE_SIZE_LABEL,
+                            DISTRIBUTED_JOINS_CHECK_BOX,
+                            ENFORCE_JOIN_ORDER_CHECK_BOX,
+                            PROTOCOL_VERSION_LABEL,
+                            PROTOCOL_VERSION_COMBO_BOX,
+                            OK_BUTTON,
+                            CANCEL_BUTTON
+                        };
                     };
 
                 public:

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/include/ignite/odbc/type_traits.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/type_traits.h b/modules/platforms/cpp/odbc/include/ignite/odbc/type_traits.h
index d456d59..81b2845 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/type_traits.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/type_traits.h
@@ -43,70 +43,73 @@ namespace ignite
              * We use these so we will not be needed to include system-specific
              * headers in our header files.
              */
-            enum IgniteSqlType
+            struct OdbcNativeType
             {
-                /** Alias for the SQL_C_CHAR type. */
-                IGNITE_ODBC_C_TYPE_CHAR,
+                enum Type
+                {
+                    /** Alias for the SQL_C_CHAR type. */
+                    AI_CHAR,
 
-                /** Alias for the SQL_C_WCHAR type. */
-                IGNITE_ODBC_C_TYPE_WCHAR,
+                    /** Alias for the SQL_C_WCHAR type. */
+                    AI_WCHAR,
 
-                /** Alias for the SQL_C_SSHORT type. */
-                IGNITE_ODBC_C_TYPE_SIGNED_SHORT,
+                    /** Alias for the SQL_C_SSHORT type. */
+                    AI_SIGNED_SHORT,
 
-                /** Alias for the SQL_C_USHORT type. */
-                IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT,
+                    /** Alias for the SQL_C_USHORT type. */
+                    AI_UNSIGNED_SHORT,
 
-                /** Alias for the SQL_C_SLONG type. */
-                IGNITE_ODBC_C_TYPE_SIGNED_LONG,
+                    /** Alias for the SQL_C_SLONG type. */
+                    AI_SIGNED_LONG,
 
-                /** Alias for the SQL_C_ULONG type. */
-                IGNITE_ODBC_C_TYPE_UNSIGNED_LONG,
+                    /** Alias for the SQL_C_ULONG type. */
+                    AI_UNSIGNED_LONG,
 
-                /** Alias for the SQL_C_FLOAT type. */
-                IGNITE_ODBC_C_TYPE_FLOAT,
+                    /** Alias for the SQL_C_FLOAT type. */
+                    AI_FLOAT,
 
-                /** Alias for the SQL_C_DOUBLE type. */
-                IGNITE_ODBC_C_TYPE_DOUBLE,
+                    /** Alias for the SQL_C_DOUBLE type. */
+                    AI_DOUBLE,
 
-                /** Alias for the SQL_C_BIT type. */
-                IGNITE_ODBC_C_TYPE_BIT,
+                    /** Alias for the SQL_C_BIT type. */
+                    AI_BIT,
 
-                /** Alias for the SQL_C_STINYINT type. */
-                IGNITE_ODBC_C_TYPE_SIGNED_TINYINT,
+                    /** Alias for the SQL_C_STINYINT type. */
+                    AI_SIGNED_TINYINT,
 
-                /** Alias for the SQL_C_UTINYINT type. */
-                IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT,
+                    /** Alias for the SQL_C_UTINYINT type. */
+                    AI_UNSIGNED_TINYINT,
 
-                /** Alias for the SQL_C_SBIGINT type. */
-                IGNITE_ODBC_C_TYPE_SIGNED_BIGINT,
+                    /** Alias for the SQL_C_SBIGINT type. */
+                    AI_SIGNED_BIGINT,
 
-                /** Alias for the SQL_C_UBIGINT type. */
-                IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT,
+                    /** Alias for the SQL_C_UBIGINT type. */
+                    AI_UNSIGNED_BIGINT,
 
-                /** Alias for the SQL_C_BINARY type. */
-                IGNITE_ODBC_C_TYPE_BINARY,
+                    /** Alias for the SQL_C_BINARY type. */
+                    AI_BINARY,
 
-                /** Alias for the SQL_C_TDATE type. */
-                IGNITE_ODBC_C_TYPE_TDATE,
+                    /** Alias for the SQL_C_TDATE type. */
+                    AI_TDATE,
 
-                /** Alias for the SQL_C_TTIME type. */
-                IGNITE_ODBC_C_TYPE_TTIME,
+                    /** Alias for the SQL_C_TTIME type. */
+                    AI_TTIME,
 
-                /** Alias for the SQL_C_TTIMESTAMP type. */
-                IGNITE_ODBC_C_TYPE_TTIMESTAMP,
+                    /** Alias for the SQL_C_TTIMESTAMP type. */
+                    AI_TTIMESTAMP,
 
-                /** Alias for the SQL_C_NUMERIC type. */
-                IGNITE_ODBC_C_TYPE_NUMERIC,
+                    /** Alias for the SQL_C_NUMERIC type. */
+                    AI_NUMERIC,
 
-                /** Alias for the SQL_C_GUID type. */
-                IGNITE_ODBC_C_TYPE_GUID,
+                    /** Alias for the SQL_C_GUID type. */
+                    AI_GUID,
 
-                /** Alias for the SQL_DEFAULT. */
-                IGNITE_ODBC_C_TYPE_DEFAULT,
+                    /** Alias for the SQL_DEFAULT. */
+                    AI_DEFAULT,
 
-                /** Alias for all unsupported types. */
-                IGNITE_ODBC_C_TYPE_UNSUPPORTED
+                    /** Alias for all unsupported types. */
+                    AI_UNSUPPORTED
+                };
             };
 
             /**
@@ -196,7 +199,7 @@ namespace ignite
              * @param type ODBC type;
              * @return Internal driver type.
              */
-            IgniteSqlType ToDriverType(int16_t type);
+            OdbcNativeType::Type ToDriverType(int16_t type);
 
             /**
              * Convert binary data type to SQL data type.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/os/win/include/ignite/odbc/system/ui/custom_window.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/os/win/include/ignite/odbc/system/ui/custom_window.h b/modules/platforms/cpp/odbc/os/win/include/ignite/odbc/system/ui/custom_window.h
index 1502c07..0232da3 100644
--- a/modules/platforms/cpp/odbc/os/win/include/ignite/odbc/system/ui/custom_window.h
+++ b/modules/platforms/cpp/odbc/os/win/include/ignite/odbc/system/ui/custom_window.h
@@ -31,10 +31,13 @@ namespace ignite
                 /**
                  * Application execution result.
                  */
-                enum Result
+                struct Result
                 {
-                    RESULT_OK,
-                    RESULT_CANCEL
+                    enum Type
+                    {
+                        OK,
+                        CANCEL
+                    };
                 };
 
                 /**
@@ -44,7 +47,7 @@ namespace ignite
                  * @param window Main window.
                  * @return Application execution result.
                  */
-                Result ProcessMessages(Window& window);
+                Result::Type ProcessMessages(Window& window);
 
                 /**
                  * Window class.
@@ -58,7 +61,6 @@ namespace ignite
                      * @param parent Parent window.
                      * @param className Window class name.
                      * @param title Window title.
-                     * @param callback Event processing function.
                      */
                     CustomWindow(Window* parent, const char* className, const char* title);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/os/win/src/system/ui/custom_window.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/os/win/src/system/ui/custom_window.cpp b/modules/platforms/cpp/odbc/os/win/src/system/ui/custom_window.cpp
index 1e855a1..57690a3 100644
--- a/modules/platforms/cpp/odbc/os/win/src/system/ui/custom_window.cpp
+++ b/modules/platforms/cpp/odbc/os/win/src/system/ui/custom_window.cpp
@@ -27,7 +27,7 @@ namespace ignite
         {
             namespace ui
             {
-                Result ProcessMessages(Window& window)
+                Result::Type ProcessMessages(Window& window)
                 {
                     MSG msg;
 
@@ -41,7 +41,7 @@ namespace ignite
                         }
                     }
 
-                    return static_cast<Result>(msg.wParam);
+                    return static_cast<Result::Type>(msg.wParam);
                 }
 
                 LRESULT CALLBACK CustomWindow::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
index 864ca85..c839999 100644
--- a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
+++ b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
@@ -104,37 +104,37 @@ namespace ignite
                     int sectionBegin = margin;
 
                     const char* val = config.GetDsn().c_str();
-                    nameLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "DSN name:", ID_NAME_LABEL);
-                    nameEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ID_NAME_EDIT);
+                    nameLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "DSN name:", ChildId::NAME_LABEL);
+                    nameEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ChildId::NAME_EDIT);
 
                     rowPos += interval + rowSize;
 
                     val = config.GetAddress().c_str();
-                    addressLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "Address:", ID_ADDRESS_LABEL);
-                    addressEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ID_ADDRESS_EDIT);
+                    addressLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "Address:", ChildId::ADDRESS_LABEL);
+                    addressEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ChildId::ADDRESS_EDIT);
 
                     rowPos += interval + rowSize;
 
                     val = config.GetCache().c_str();
-                    cacheLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "Cache name:", ID_CACHE_LABEL);
-                    cacheEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ID_CACHE_EDIT);
+                    cacheLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize, "Cache name:", ChildId::CACHE_LABEL);
+                    cacheEdit = CreateEdit(editPosX, rowPos, editSizeX, rowSize, val, ChildId::CACHE_EDIT);
 
                     rowPos += interval + rowSize;
 
                     std::string tmp = common::LexicalCast<std::string>(config.GetPageSize());
                     val = tmp.c_str();
                     pageSizeLabel = CreateLabel(labelPosX, rowPos, labelSizeX,
-                        rowSize, "Page size:", ID_PAGE_SIZE_LABEL);
+                        rowSize, "Page size:", ChildId::PAGE_SIZE_LABEL);
 
                     pageSizeEdit = CreateEdit(editPosX, rowPos, editSizeX, 
-                        rowSize, val, ID_PAGE_SIZE_EDIT, ES_NUMBER);
+                        rowSize, val, ChildId::PAGE_SIZE_EDIT, ES_NUMBER);
 
                     rowPos += interval + rowSize;
 
                     protocolVersionLabel = CreateLabel(labelPosX, rowPos, labelSizeX, rowSize,
-                        "Protocol version:", ID_PROTOCOL_VERSION_LABEL);
+                        "Protocol version:", ChildId::PROTOCOL_VERSION_LABEL);
                     protocolVersionComboBox = CreateComboBox(editPosX, rowPos, editSizeX, rowSize,
-                        "Protocol version", ID_PROTOCOL_VERSION_COMBO_BOX);
+                        "Protocol version", ChildId::PROTOCOL_VERSION_COMBO_BOX);
 
                     int id = 0;
 
@@ -154,10 +154,10 @@ namespace ignite
                     rowPos += interval + rowSize;
 
                     distributedJoinsCheckBox = CreateCheckBox(editPosX, rowPos, checkBoxSize, rowSize,
-                        "Distributed Joins", ID_DISTRIBUTED_JOINS_CHECK_BOX, config.IsDistributedJoins());
+                        "Distributed Joins", ChildId::DISTRIBUTED_JOINS_CHECK_BOX, config.IsDistributedJoins());
 
                     enforceJoinOrderCheckBox = CreateCheckBox(editPosX + checkBoxSize + interval, rowPos, checkBoxSize,
-                        rowSize, "Enforce Join Order", ID_ENFORCE_JOIN_ORDER_CHECK_BOX, config.IsEnforceJoinOrder());
+                        rowSize, "Enforce Join Order", ChildId::ENFORCE_JOIN_ORDER_CHECK_BOX, config.IsEnforceJoinOrder());
 
                     if (!config.GetProtocolVersion().IsDistributedJoinsSupported())
                     {
@@ -168,7 +168,7 @@ namespace ignite
                     rowPos += interval * 2 + rowSize;
 
                     connectionSettingsGroupBox = CreateGroupBox(margin, sectionBegin, width - 2 * margin,
-                        rowPos - interval - sectionBegin, "Connection settings", ID_CONNECTION_SETTINGS_GROUP_BOX);
+                        rowPos - interval - sectionBegin, "Connection settings", ChildId::CONNECTION_SETTINGS_GROUP_BOX);
 
                     int buttonSizeX = 80;
                     int cancelPosX = width - margin - buttonSizeX;
@@ -176,8 +176,8 @@ namespace ignite
 
                     rowSize = 25;
 
-                    okButton = CreateButton(okPosX, rowPos, buttonSizeX, rowSize, "Ok", ID_OK_BUTTON);
-                    cancelButton = CreateButton(cancelPosX, rowPos, buttonSizeX, rowSize, "Cancel", ID_CANCEL_BUTTON);
+                    okButton = CreateButton(okPosX, rowPos, buttonSizeX, rowSize, "Ok", ChildId::OK_BUTTON);
+                    cancelButton = CreateButton(cancelPosX, rowPos, buttonSizeX, rowSize, "Cancel", ChildId::CANCEL_BUTTON);
                 }
 
                 bool DsnConfigurationWindow::OnMessage(UINT msg, WPARAM wParam, LPARAM lParam)
@@ -188,7 +188,7 @@ namespace ignite
                         {
                             switch (LOWORD(wParam))
                             {
-                                case ID_OK_BUTTON:
+                                case ChildId::OK_BUTTON:
                                 {
                                     try
                                     {
@@ -206,7 +206,7 @@ namespace ignite
                                     break;
                                 }
 
-                                case ID_PROTOCOL_VERSION_COMBO_BOX:
+                                case ChildId::PROTOCOL_VERSION_COMBO_BOX:
                                 {
                                     if (HIWORD(wParam) == CBN_SELCHANGE)
                                     {
@@ -232,21 +232,21 @@ namespace ignite
                                 }
 
                                 case IDCANCEL:
-                                case ID_CANCEL_BUTTON:
+                                case ChildId::CANCEL_BUTTON:
                                 {
                                     PostMessage(GetHandle(), WM_CLOSE, 0, 0);
 
                                     break;
                                 }
 
-                                case ID_DISTRIBUTED_JOINS_CHECK_BOX:
+                                case ChildId::DISTRIBUTED_JOINS_CHECK_BOX:
                                 {
                                     distributedJoinsCheckBox->SetChecked(!distributedJoinsCheckBox->IsChecked());
 
                                     break;
                                 }
 
-                                case ID_ENFORCE_JOIN_ORDER_CHECK_BOX:
+                                case ChildId::ENFORCE_JOIN_ORDER_CHECK_BOX:
                                 {
                                     enforceJoinOrderCheckBox->SetChecked(!enforceJoinOrderCheckBox->IsChecked());
 
@@ -262,7 +262,7 @@ namespace ignite
 
                         case WM_DESTROY:
                         {
-                            PostQuitMessage(accepted ? RESULT_OK : RESULT_CANCEL);
+                            PostQuitMessage(accepted ? Result::OK : Result::CANCEL);
 
                             break;
                         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/os/win/src/system_dsn.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/os/win/src/system_dsn.cpp b/modules/platforms/cpp/odbc/os/win/src/system_dsn.cpp
index 3d41e3e..3402aca 100644
--- a/modules/platforms/cpp/odbc/os/win/src/system_dsn.cpp
+++ b/modules/platforms/cpp/odbc/os/win/src/system_dsn.cpp
@@ -50,7 +50,7 @@ bool DisplayConfigureDsnWindow(HWND hwndParent, Configuration& config)
         window.Show();
         window.Update();
 
-        return ProcessMessages(window) == RESULT_OK;
+        return ProcessMessages(window) == Result::OK;
     }
     catch (const ignite::IgniteError& err)
     {

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
index 1b5f536..ced8c01 100644
--- a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
+++ b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
@@ -36,7 +36,7 @@ namespace ignite
             using ignite::impl::binary::BinaryUtils;
 
             ApplicationDataBuffer::ApplicationDataBuffer() :
-                type(type_traits::IGNITE_ODBC_C_TYPE_UNSUPPORTED),
+                type(type_traits::OdbcNativeType::AI_UNSUPPORTED),
                 buffer(0),
                 buflen(0),
                 reslen(0),
@@ -45,7 +45,7 @@ namespace ignite
                 // No-op.
             }
 
-            ApplicationDataBuffer::ApplicationDataBuffer(type_traits::IgniteSqlType type,
+            ApplicationDataBuffer::ApplicationDataBuffer(type_traits::OdbcNativeType::Type type,
                 void* buffer, SqlLen buflen, SqlLen* reslen, int** offset) :
                 type(type),
                 buffer(buffer),
@@ -92,80 +92,80 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
                     {
                         PutNumToNumBuffer<signed char>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
                     {
                         PutNumToNumBuffer<unsigned char>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
                     {
                         PutNumToNumBuffer<short>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
                     {
                         PutNumToNumBuffer<unsigned short>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_LONG:
                     {
                         PutNumToNumBuffer<long>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
                     {
                         PutNumToNumBuffer<unsigned long>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
                     {
                         PutNumToNumBuffer<int64_t>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
                         PutNumToNumBuffer<uint64_t>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
+                    case OdbcNativeType::AI_FLOAT:
                     {
                         PutNumToNumBuffer<float>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         PutNumToNumBuffer<double>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         PutValToStrBuffer<char>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         PutValToStrBuffer<wchar_t>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_NUMERIC:
                     {
                         if (dataPtr)
                         {
@@ -189,8 +189,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         if (dataPtr)
                         {
@@ -215,21 +215,21 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                     {
                         PutDate(Date(static_cast<int64_t>(value)));
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         PutTimestamp(Timestamp(static_cast<int64_t>(value)));
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         PutTime(Time(static_cast<int64_t>(value)));
 
@@ -383,16 +383,16 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_NUMERIC:
                     {
                         std::stringstream converter;
 
@@ -409,8 +409,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         std::stringstream converter;
 
@@ -427,9 +427,9 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_CHAR:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         PutStrToStrBuffer<char>(value);
 
@@ -438,7 +438,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         PutStrToStrBuffer<wchar_t>(value);
 
@@ -467,21 +467,21 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_CHAR:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         PutValToStrBuffer<char>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         PutValToStrBuffer<wchar_t>(value);
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_GUID:
+                    case OdbcNativeType::AI_GUID:
                     {
                         SQLGUID* guid = reinterpret_cast<SQLGUID*>(GetData());
 
@@ -515,8 +515,8 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         PutRawDataToBuffer(data, len);
 
@@ -525,7 +525,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         std::stringstream converter;
 
@@ -546,7 +546,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         std::wstringstream converter;
 
@@ -595,31 +595,31 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
                         PutNum<int64_t>(value.ToInt64());
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         PutNum<double>(value.ToDouble());
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_CHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         std::stringstream converter;
 
@@ -630,7 +630,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_NUMERIC:
                     {
                         SQL_NUMERIC_STRUCT* numeric =
                             reinterpret_cast<SQL_NUMERIC_STRUCT*>(GetData());
@@ -663,8 +663,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
-                    case IGNITE_ODBC_C_TYPE_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
                     default:
                     {
                         if (resLenPtr)
@@ -686,7 +686,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         char* buffer = reinterpret_cast<char*>(dataPtr);
 
@@ -703,7 +703,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(dataPtr);
 
@@ -729,7 +729,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                     {
                         SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(dataPtr);
 
@@ -743,7 +743,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         SQL_TIME_STRUCT* buffer = reinterpret_cast<SQL_TIME_STRUCT*>(dataPtr);
 
@@ -757,7 +757,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(dataPtr);
 
@@ -775,8 +775,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         if (dataPtr)
                             memcpy(dataPtr, &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
@@ -787,18 +787,18 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
+                    case OdbcNativeType::AI_NUMERIC:
                     default:
                     {
                         if (resLenPtr)
@@ -820,7 +820,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         char* buffer = reinterpret_cast<char*>(dataPtr);
 
@@ -837,7 +837,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(dataPtr);
 
@@ -863,7 +863,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                     {
                         SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(dataPtr);
 
@@ -877,7 +877,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         SQL_TIME_STRUCT* buffer = reinterpret_cast<SQL_TIME_STRUCT*>(dataPtr);
 
@@ -891,7 +891,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(dataPtr);
 
@@ -909,8 +909,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         if (dataPtr)
                             memcpy(dataPtr, &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
@@ -921,18 +921,18 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
+                    case OdbcNativeType::AI_NUMERIC:
                     default:
                     {
                         if (resLenPtr)
@@ -954,7 +954,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         char* buffer = reinterpret_cast<char*>(dataPtr);
 
@@ -971,7 +971,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case OdbcNativeType::AI_WCHAR:
                     {
                         SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(dataPtr);
 
@@ -997,7 +997,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         SQL_TIME_STRUCT* buffer = reinterpret_cast<SQL_TIME_STRUCT*>(dataPtr);
 
@@ -1011,7 +1011,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(dataPtr);
 
@@ -1029,8 +1029,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BINARY:
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case OdbcNativeType::AI_BINARY:
+                    case OdbcNativeType::AI_DEFAULT:
                     {
                         if (dataPtr)
                             memcpy(dataPtr, &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
@@ -1041,19 +1041,19 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
+                    case OdbcNativeType::AI_NUMERIC:
+                    case OdbcNativeType::AI_TDATE:
                     default:
                     {
                         if (resLenPtr)
@@ -1069,7 +1069,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         size_t paramLen = GetInputSize();
 
@@ -1085,10 +1085,10 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
                     {
                         std::stringstream converter;
 
@@ -1099,11 +1099,11 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
                         std::stringstream converter;
 
@@ -1114,7 +1114,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
+                    case OdbcNativeType::AI_FLOAT:
                     {
                         std::stringstream converter;
 
@@ -1125,8 +1125,8 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_NUMERIC:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         std::stringstream converter;
 
@@ -1182,7 +1182,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1201,7 +1201,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_GUID:
+                    case OdbcNativeType::AI_GUID:
                     {
                         const SQLGUID* guid = reinterpret_cast<const SQLGUID*>(GetData());
 
@@ -1255,7 +1255,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1284,68 +1284,68 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const signed char*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const unsigned char*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const signed short*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const unsigned short*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_LONG:
                     {
                         res = static_cast<T>(*reinterpret_cast<const signed long*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
                     {
                         res = static_cast<T>(*reinterpret_cast<const unsigned long*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const int64_t*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const uint64_t*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
+                    case OdbcNativeType::AI_FLOAT:
                     {
                         res = static_cast<T>(*reinterpret_cast<const float*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         res = static_cast<T>(*reinterpret_cast<const double*>(GetData()));
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_NUMERIC:
                     {
                         const SQL_NUMERIC_STRUCT* numeric =
                             reinterpret_cast<const SQL_NUMERIC_STRUCT*>(GetData());
@@ -1373,7 +1373,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                     {
                         const SQL_DATE_STRUCT* buffer = reinterpret_cast<const SQL_DATE_STRUCT*>(GetData());
 
@@ -1384,7 +1384,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         const SQL_TIME_STRUCT* buffer = reinterpret_cast<const SQL_TIME_STRUCT*>(GetData());
 
@@ -1397,7 +1397,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         const SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<const SQL_TIMESTAMP_STRUCT*>(GetData());
 
@@ -1411,7 +1411,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1447,7 +1447,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                     {
                         const SQL_DATE_STRUCT* buffer = reinterpret_cast<const SQL_DATE_STRUCT*>(GetData());
 
@@ -1458,7 +1458,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         const SQL_TIME_STRUCT* buffer = reinterpret_cast<const SQL_TIME_STRUCT*>(GetData());
 
@@ -1471,7 +1471,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         const SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<const SQL_TIMESTAMP_STRUCT*>(GetData());
 
@@ -1487,7 +1487,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1525,7 +1525,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                     {
                         const SQL_TIME_STRUCT* buffer = reinterpret_cast<const SQL_TIME_STRUCT*>(GetData());
 
@@ -1536,7 +1536,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                     {
                         const SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<const SQL_TIMESTAMP_STRUCT*>(GetData());
 
@@ -1547,7 +1547,7 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1575,7 +1575,7 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case OdbcNativeType::AI_CHAR:
                     {
                         SqlLen paramLen = GetInputSize();
 
@@ -1593,36 +1593,36 @@ namespace ignite
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
                     {
                         val.AssignInt64(GetNum<int64_t>());
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
                         val.AssignUint64(GetNum<uint64_t>());
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_FLOAT:
+                    case OdbcNativeType::AI_DOUBLE:
                     {
                         val.AssignDouble(GetNum<double>());
 
                         break;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_NUMERIC:
                     {
                         const SQL_NUMERIC_STRUCT* numeric =
                             reinterpret_cast<const SQL_NUMERIC_STRUCT*>(GetData());
@@ -1671,9 +1671,9 @@ namespace ignite
 
                 switch (type)
                 {
-                    case IGNITE_ODBC_C_TYPE_WCHAR:
-                    case IGNITE_ODBC_C_TYPE_CHAR:
-                    case IGNITE_ODBC_C_TYPE_BINARY:
+                    case OdbcNativeType::AI_WCHAR:
+                    case OdbcNativeType::AI_CHAR:
+                    case OdbcNativeType::AI_BINARY:
                     {
                         const SqlLen* resLenPtr = GetResLen();
 
@@ -1687,52 +1687,52 @@ namespace ignite
                         else
                             ilen = 0;
 
-                        if (type == IGNITE_ODBC_C_TYPE_WCHAR)
+                        if (type == OdbcNativeType::AI_WCHAR)
                             ilen *= 2;
 
                         return ilen;
                     }
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
+                    case OdbcNativeType::AI_SIGNED_SHORT:
+                    case OdbcNativeType::AI_UNSIGNED_SHORT:
                         return static_cast<SqlLen>(sizeof(short));
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
+                    case OdbcNativeType::AI_SIGNED_LONG:
+                    case OdbcNativeType::AI_UNSIGNED_LONG:
                         return static_cast<SqlLen>(sizeof(long));
 
-                    case IGNITE_ODBC_C_TYPE_FLOAT:
+                    case OdbcNativeType::AI_FLOAT:
                         return static_cast<SqlLen>(sizeof(float));
 
-                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                    case OdbcNativeType::AI_DOUBLE:
                         return static_cast<SqlLen>(sizeof(double));
 
-                    case IGNITE_ODBC_C_TYPE_BIT:
-                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
+                    case OdbcNativeType::AI_BIT:
+                    case OdbcNativeType::AI_SIGNED_TINYINT:
+                    case OdbcNativeType::AI_UNSIGNED_TINYINT:
                         return static_cast<SqlLen>(sizeof(char));
 
-                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
-                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                    case OdbcNativeType::AI_SIGNED_BIGINT:
+                    case OdbcNativeType::AI_UNSIGNED_BIGINT:
                         return static_cast<SqlLen>(sizeof(SQLBIGINT));
 
-                    case IGNITE_ODBC_C_TYPE_TDATE:
+                    case OdbcNativeType::AI_TDATE:
                         return static_cast<SqlLen>(sizeof(SQL_DATE_STRUCT));
 
-                    case IGNITE_ODBC_C_TYPE_TTIME:
+                    case OdbcNativeType::AI_TTIME:
                         return static_cast<SqlLen>(sizeof(SQL_TIME_STRUCT));
 
-                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                    case OdbcNativeType::AI_TTIMESTAMP:
                         return static_cast<SqlLen>(sizeof(SQL_TIMESTAMP_STRUCT));
 
-                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                    case OdbcNativeType::AI_NUMERIC:
                         return static_cast<SqlLen>(sizeof(SQL_NUMERIC_STRUCT));
 
-                    case IGNITE_ODBC_C_TYPE_GUID:
+                    case OdbcNativeType::AI_GUID:
                         return static_cast<SqlLen>(sizeof(SQLGUID));
 
-                    case IGNITE_ODBC_C_TYPE_DEFAULT:
-                    case IGNITE_ODBC_C_TYPE_UNSUPPORTED:
+                    case OdbcNativeType::AI_DEFAULT:
+                    case OdbcNativeType::AI_UNSUPPORTED:
                     default:
                         break;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/app/parameter.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/parameter.cpp b/modules/platforms/cpp/odbc/src/app/parameter.cpp
index d351e29..13136f0 100644
--- a/modules/platforms/cpp/odbc/src/app/parameter.cpp
+++ b/modules/platforms/cpp/odbc/src/app/parameter.cpp
@@ -242,12 +242,12 @@ namespace ignite
                     return;
                 }
 
-                if (buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_CHAR ||
-                    buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_BINARY)
+                if (buffer.GetType() == type_traits::OdbcNativeType::AI_CHAR ||
+                    buffer.GetType() == type_traits::OdbcNativeType::AI_BINARY)
                 {
                     SqlLen slen = len;
 
-                    if (buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_CHAR && slen == SQL_NTSL)
+                    if (buffer.GetType() == type_traits::OdbcNativeType::AI_CHAR && slen == SQL_NTSL)
                     {
                         const char* str = reinterpret_cast<char*>(data);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/column.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/column.cpp b/modules/platforms/cpp/odbc/src/column.cpp
index e20c7a8..a9783a9 100644
--- a/modules/platforms/cpp/odbc/src/column.cpp
+++ b/modules/platforms/cpp/odbc/src/column.cpp
@@ -326,22 +326,22 @@ namespace ignite
             size = sizeTmp;
         }
 
-        SqlResult Column::ReadToBuffer(BinaryReaderImpl& reader, app::ApplicationDataBuffer& dataBuf)
+        SqlResult::Type Column::ReadToBuffer(BinaryReaderImpl& reader, app::ApplicationDataBuffer& dataBuf)
         {
             if (!IsValid())
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
 
             if (GetUnreadDataLength() == 0)
             {
                 dataBuf.PutNull();
 
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
             }
 
             InteropInputStream* stream = reader.GetStream();
 
             if (!stream)
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
 
             InteropStreamPositionGuard<InteropInputStream> guard(*stream);
 
@@ -451,7 +451,7 @@ namespace ignite
                     int32_t len;
 
                     if (!GetObjectLength(*stream, len))
-                        return SQL_RESULT_ERROR;
+                        return SqlResult::AI_ERROR;
 
                     std::vector<int8_t> data(len);
 
@@ -521,11 +521,11 @@ namespace ignite
                 default:
                 {
                     // This is a fail case. Return false.
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Column::IncreaseOffset(int32_t value)

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/common_types.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/common_types.cpp b/modules/platforms/cpp/odbc/src/common_types.cpp
index 36d11c2..09ea3dc 100644
--- a/modules/platforms/cpp/odbc/src/common_types.cpp
+++ b/modules/platforms/cpp/odbc/src/common_types.cpp
@@ -24,99 +24,99 @@ namespace ignite
 {
     namespace odbc
     {
-        int SqlResultToReturnCode(SqlResult result)
+        int SqlResultToReturnCode(SqlResult::Type result)
         {
             switch (result)
             {
-                case SQL_RESULT_SUCCESS: 
+                case SqlResult::AI_SUCCESS: 
                     return SQL_SUCCESS;
 
-                case SQL_RESULT_SUCCESS_WITH_INFO:
+                case SqlResult::AI_SUCCESS_WITH_INFO:
                     return SQL_SUCCESS_WITH_INFO;
 
-                case SQL_RESULT_NO_DATA:
+                case SqlResult::AI_NO_DATA:
                     return SQL_NO_DATA;
 
-                case SQL_RESULT_NEED_DATA:
+                case SqlResult::AI_NEED_DATA:
                     return SQL_NEED_DATA;
 
-                case SQL_RESULT_ERROR:
+                case SqlResult::AI_ERROR:
                 default:
                     return SQL_ERROR;
             }
         }
 
-        DiagnosticField DiagnosticFieldToInternal(int16_t field)
+        DiagnosticField::Type DiagnosticFieldToInternal(int16_t field)
         {
             switch (field)
             {
                 case SQL_DIAG_CURSOR_ROW_COUNT:
-                    return IGNITE_SQL_DIAG_HEADER_CURSOR_ROW_COUNT;
+                    return DiagnosticField::HEADER_CURSOR_ROW_COUNT;
 
                 case SQL_DIAG_DYNAMIC_FUNCTION:
-                    return IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION;
+                    return DiagnosticField::HEADER_DYNAMIC_FUNCTION;
 
                 case SQL_DIAG_DYNAMIC_FUNCTION_CODE:
-                    return IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION_CODE;
+                    return DiagnosticField::HEADER_DYNAMIC_FUNCTION_CODE;
 
                 case SQL_DIAG_NUMBER:
-                    return IGNITE_SQL_DIAG_HEADER_NUMBER;
+                    return DiagnosticField::HEADER_NUMBER;
 
                 case SQL_DIAG_RETURNCODE:
-                    return IGNITE_SQL_DIAG_HEADER_RETURNCODE;
+                    return DiagnosticField::HEADER_RETURNCODE;
 
                 case SQL_DIAG_ROW_COUNT:
-                    return IGNITE_SQL_DIAG_HEADER_ROW_COUNT;
+                    return DiagnosticField::HEADER_ROW_COUNT;
 
                 case SQL_DIAG_CLASS_ORIGIN:
-                    return IGNITE_SQL_DIAG_STATUS_CLASS_ORIGIN;
+                    return DiagnosticField::STATUS_CLASS_ORIGIN;
 
                 case SQL_DIAG_COLUMN_NUMBER:
-                    return IGNITE_SQL_DIAG_STATUS_COLUMN_NUMBER;
+                    return DiagnosticField::STATUS_COLUMN_NUMBER;
 
                 case SQL_DIAG_CONNECTION_NAME:
-                    return IGNITE_SQL_DIAG_STATUS_CONNECTION_NAME;
+                    return DiagnosticField::STATUS_CONNECTION_NAME;
 
                 case SQL_DIAG_MESSAGE_TEXT:
-                    return IGNITE_SQL_DIAG_STATUS_MESSAGE_TEXT;
+                    return DiagnosticField::STATUS_MESSAGE_TEXT;
 
                 case SQL_DIAG_NATIVE:
-                    return IGNITE_SQL_DIAG_STATUS_NATIVE;
+                    return DiagnosticField::STATUS_NATIVE;
 
                 case SQL_DIAG_ROW_NUMBER:
-                    return IGNITE_SQL_DIAG_STATUS_ROW_NUMBER;
+                    return DiagnosticField::STATUS_ROW_NUMBER;
 
                 case SQL_DIAG_SERVER_NAME:
-                    return IGNITE_SQL_DIAG_STATUS_SERVER_NAME;
+                    return DiagnosticField::STATUS_SERVER_NAME;
 
                 case SQL_DIAG_SQLSTATE:
-                    return IGNITE_SQL_DIAG_STATUS_SQLSTATE;
+                    return DiagnosticField::STATUS_SQLSTATE;
 
                 case SQL_DIAG_SUBCLASS_ORIGIN:
-                    return IGNITE_SQL_DIAG_STATUS_SUBCLASS_ORIGIN;
+                    return DiagnosticField::STATUS_SUBCLASS_ORIGIN;
 
                 default:
                     break;
             }
 
-            return IGNITE_SQL_DIAG_UNKNOWN;
+            return DiagnosticField::UNKNOWN;
         }
 
-        EnvironmentAttribute EnvironmentAttributeToInternal(int32_t attr)
+        EnvironmentAttribute::Type EnvironmentAttributeToInternal(int32_t attr)
         {
             switch (attr)
             {
                 case SQL_ATTR_ODBC_VERSION:
-                    return IGNITE_SQL_ENV_ATTR_ODBC_VERSION;
+                    return EnvironmentAttribute::ODBC_VERSION;
 
                 case SQL_ATTR_OUTPUT_NTS:
-                    return IGNITE_SQL_ENV_ATTR_OUTPUT_NTS;
+                    return EnvironmentAttribute::OUTPUT_NTS;
 
                 default:
                     break;
             }
 
-            return IGNITE_SQL_ENV_ATTR_UNKNOWN;
+            return EnvironmentAttribute::UNKNOWN;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/config/connection_info.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/config/connection_info.cpp b/modules/platforms/cpp/odbc/src/config/connection_info.cpp
index a34d434..b642a39 100644
--- a/modules/platforms/cpp/odbc/src/config/connection_info.cpp
+++ b/modules/platforms/cpp/odbc/src/config/connection_info.cpp
@@ -627,11 +627,11 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult ConnectionInfo::GetInfo(InfoType type, void* buf,
+            SqlResult::Type ConnectionInfo::GetInfo(InfoType type, void* buf,
                 short buflen, short* reslen) const
             {
                 if (!buf || !buflen)
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
 
                 StringInfoMap::const_iterator itStr = strParams.find(type);
 
@@ -644,7 +644,7 @@ namespace ignite
                     if (reslen)
                         *reslen = strlen;
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
                 UintInfoMap::const_iterator itInt = intParams.find(type);
@@ -655,7 +655,7 @@ namespace ignite
 
                     *res = itInt->second;
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
                 UshortInfoMap::const_iterator itShort = shortParams.find(type);
@@ -666,10 +666,10 @@ namespace ignite
 
                     *res = itShort->second;
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/connection.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/connection.cpp b/modules/platforms/cpp/odbc/src/connection.cpp
index 960a507..62194d0 100644
--- a/modules/platforms/cpp/odbc/src/connection.cpp
+++ b/modules/platforms/cpp/odbc/src/connection.cpp
@@ -76,14 +76,14 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalGetInfo(type, buf, buflen, reslen));
         }
 
-        SqlResult Connection::InternalGetInfo(config::ConnectionInfo::InfoType type, void* buf, short buflen, short* reslen)
+        SqlResult::Type Connection::InternalGetInfo(config::ConnectionInfo::InfoType type, void* buf, short buflen, short* reslen)
         {
             const config::ConnectionInfo& info = GetInfo();
 
-            SqlResult res = info.GetInfo(type, buf, buflen, reslen);
+            SqlResult::Type res = info.GetInfo(type, buf, buflen, reslen);
 
-            if (res != SQL_RESULT_SUCCESS)
-                AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED, "Not implemented.");
+            if (res != SqlResult::AI_SUCCESS)
+                AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED, "Not implemented.");
 
             return res;
         }
@@ -93,7 +93,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalEstablish(connectStr));
         }
 
-        SqlResult Connection::InternalEstablish(const std::string& connectStr)
+        SqlResult::Type Connection::InternalEstablish(const std::string& connectStr)
         {
             config::Configuration config;
 
@@ -103,9 +103,9 @@ namespace ignite
             }
             catch (IgniteError& e)
             {
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, e.GetText());
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, e.GetText());
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             return InternalEstablish(config);
@@ -116,24 +116,24 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalEstablish(cfg));
         }
 
-        SqlResult Connection::InternalEstablish(const config::Configuration cfg)
+        SqlResult::Type Connection::InternalEstablish(const config::Configuration cfg)
         {
             config = cfg;
 
             if (connected)
             {
-                AddStatusRecord(SQL_STATE_08002_ALREADY_CONNECTED, "Already connected.");
+                AddStatusRecord(SqlState::S08002_ALREADY_CONNECTED, "Already connected.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             connected = socket.Connect(cfg.GetHost().c_str(), cfg.GetTcpPort());
 
             if (!connected)
             {
-                AddStatusRecord(SQL_STATE_08001_CANNOT_CONNECT, "Failed to establish connection with the host.");
+                AddStatusRecord(SqlState::S08001_CANNOT_CONNECT, "Failed to establish connection with the host.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             return MakeRequestHandshake();
@@ -144,20 +144,20 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalRelease());
         }
 
-        SqlResult Connection::InternalRelease()
+        SqlResult::Type Connection::InternalRelease()
         {
             if (!connected)
             {
-                AddStatusRecord(SQL_STATE_08003_NOT_CONNECTED, "Connection is not open.");
+                AddStatusRecord(SqlState::S08003_NOT_CONNECTED, "Connection is not open.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             socket.Close();
 
             connected = false;
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         Statement* Connection::CreateStatement()
@@ -169,18 +169,18 @@ namespace ignite
             return statement;
         }
 
-        SqlResult Connection::InternalCreateStatement(Statement*& statement)
+        SqlResult::Type Connection::InternalCreateStatement(Statement*& statement)
         {
             statement = new Statement(*this);
 
             if (!statement)
             {
-                AddStatusRecord(SQL_STATE_HY001_MEMORY_ALLOCATION, "Not enough memory.");
+                AddStatusRecord(SqlState::SHY001_MEMORY_ALLOCATION, "Not enough memory.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Connection::Send(const int8_t* data, size_t len)
@@ -288,7 +288,7 @@ namespace ignite
             return config;
         }
 
-        diagnostic::DiagnosticRecord Connection::CreateStatusRecord(SqlState sqlState,
+        diagnostic::DiagnosticRecord Connection::CreateStatusRecord(SqlState::Type sqlState,
             const std::string& message, int32_t rowNum, int32_t columnNum)
         {
             return diagnostic::DiagnosticRecord(sqlState, message, "", "", rowNum, columnNum);
@@ -299,9 +299,9 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalTransactionCommit());
         }
 
-        SqlResult Connection::InternalTransactionCommit()
+        SqlResult::Type Connection::InternalTransactionCommit()
         {
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Connection::TransactionRollback()
@@ -309,15 +309,15 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalTransactionRollback());
         }
 
-        SqlResult Connection::InternalTransactionRollback()
+        SqlResult::Type Connection::InternalTransactionRollback()
         {
-            AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+            AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                 "Rollback operation is not supported.");
 
-            return SQL_RESULT_ERROR;
+            return SqlResult::AI_ERROR;
         }
 
-        SqlResult Connection::MakeRequestHandshake()
+        SqlResult::Type Connection::MakeRequestHandshake()
         {
             bool distributedJoins = false;
             bool enforceJoinOrder = false;
@@ -331,9 +331,9 @@ namespace ignite
             }
             catch (const IgniteError& err)
             {
-                AddStatusRecord(SQL_STATE_01S00_INVALID_CONNECTION_STRING_ATTRIBUTE, err.GetText());
+                AddStatusRecord(SqlState::S01S00_INVALID_CONNECTION_STRING_ATTRIBUTE, err.GetText());
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             HandshakeRequest req(protocolVersion, distributedJoins, enforceJoinOrder);
@@ -345,20 +345,20 @@ namespace ignite
             }
             catch (const IgniteError& err)
             {
-                AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                AddStatusRecord(SqlState::SHYT01_CONNECTIOIN_TIMEOUT, err.GetText());
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            if (rsp.GetStatus() != RESPONSE_STATUS_SUCCESS)
+            if (rsp.GetStatus() != ResponseStatus::SUCCESS)
             {
                 LOG_MSG("Error: " << rsp.GetError().c_str());
 
-                AddStatusRecord(SQL_STATE_08001_CANNOT_CONNECT, rsp.GetError());
+                AddStatusRecord(SqlState::S08001_CANNOT_CONNECT, rsp.GetError());
 
                 InternalRelease();
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (!rsp.IsAccepted())
@@ -372,14 +372,14 @@ namespace ignite
                     << "node protocol version introduced in version: " << rsp.ProtoVerSince() << ", "
                     << "driver protocol version introduced in version: " << config.GetProtocolVersion().ToString() << ".";
 
-                AddStatusRecord(SQL_STATE_08001_CANNOT_CONNECT, constructor.str());
+                AddStatusRecord(SqlState::S08001_CANNOT_CONNECT, constructor.str());
 
                 InternalRelease();
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/diagnostic/diagnosable_adapter.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/diagnostic/diagnosable_adapter.cpp b/modules/platforms/cpp/odbc/src/diagnostic/diagnosable_adapter.cpp
index 94ea53e..6c07c29 100644
--- a/modules/platforms/cpp/odbc/src/diagnostic/diagnosable_adapter.cpp
+++ b/modules/platforms/cpp/odbc/src/diagnostic/diagnosable_adapter.cpp
@@ -25,7 +25,7 @@ namespace ignite
     {
         namespace diagnostic
         {
-            void DiagnosableAdapter::AddStatusRecord(SqlState sqlState,
+            void DiagnosableAdapter::AddStatusRecord(SqlState::Type  sqlState,
                 const std::string& message, int32_t rowNum, int32_t columnNum)
             {
                 if (connection)
@@ -40,7 +40,7 @@ namespace ignite
                 }
             }
 
-            void DiagnosableAdapter::AddStatusRecord(SqlState sqlState, const std::string& message)
+            void DiagnosableAdapter::AddStatusRecord(SqlState::Type  sqlState, const std::string& message)
             {
                 LOG_MSG("Adding new record: " << message);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7e106cd0/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
index 3c411d2..c8e0e81 100644
--- a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
+++ b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
@@ -102,7 +102,7 @@ namespace ignite
         namespace diagnostic
         {
             DiagnosticRecord::DiagnosticRecord() :
-                sqlState(SQL_STATE_UNKNOWN),
+                sqlState(SqlState::UNKNOWN),
                 message(),
                 connectionName(),
                 serverName(),
@@ -113,7 +113,7 @@ namespace ignite
                 // No-op.
             }
 
-            DiagnosticRecord::DiagnosticRecord(SqlState sqlState,
+            DiagnosticRecord::DiagnosticRecord(SqlState::Type sqlState,
                 const std::string& message, const std::string& connectionName,
                 const std::string& serverName, int32_t rowNum, int32_t columnNum) :
                 sqlState(sqlState),
@@ -221,67 +221,67 @@ namespace ignite
             {
                 switch (sqlState)
                 {
-                    case SQL_STATE_01004_DATA_TRUNCATED:
+                    case SqlState::S01004_DATA_TRUNCATED:
                         return STATE_01004;
 
-                    case SQL_STATE_01S00_INVALID_CONNECTION_STRING_ATTRIBUTE:
+                    case SqlState::S01S00_INVALID_CONNECTION_STRING_ATTRIBUTE:
                         return STATE_01S00;
 
-                    case SQL_STATE_01S01_ERROR_IN_ROW:
+                    case SqlState::S01S01_ERROR_IN_ROW:
                         return STATE_01S01;
 
-                    case SQL_STATE_22026_DATA_LENGTH_MISMATCH:
+                    case SqlState::S22026_DATA_LENGTH_MISMATCH:
                         return STATE_22026;
 
-                    case SQL_STATE_24000_INVALID_CURSOR_STATE:
+                    case SqlState::S24000_INVALID_CURSOR_STATE:
                         return STATE_24000;
 
-                    case SQL_STATE_07009_INVALID_DESCRIPTOR_INDEX:
+                    case SqlState::S07009_INVALID_DESCRIPTOR_INDEX:
                         return STATE_07009;
 
-                    case SQL_STATE_08001_CANNOT_CONNECT:
+                    case SqlState::S08001_CANNOT_CONNECT:
                         return STATE_08001;
 
-                    case SQL_STATE_08002_ALREADY_CONNECTED:
+                    case SqlState::S08002_ALREADY_CONNECTED:
                         return STATE_08002;
 
-                    case SQL_STATE_08003_NOT_CONNECTED:
+                    case SqlState::S08003_NOT_CONNECTED:
                         return STATE_08003;
 
-                    case SQL_STATE_HY000_GENERAL_ERROR:
+                    case SqlState::SHY000_GENERAL_ERROR:
                         return STATE_HY000;
 
-                    case SQL_STATE_HY001_MEMORY_ALLOCATION:
+                    case SqlState::SHY001_MEMORY_ALLOCATION:
                         return STATE_HY001;
 
-                    case SQL_STATE_HY003_INVALID_APPLICATION_BUFFER_TYPE:
+                    case SqlState::SHY003_INVALID_APPLICATION_BUFFER_TYPE:
                         return STATE_HY003;
 
-                    case SQL_STATE_HY009_INVALID_USE_OF_NULL_POINTER:
+                    case SqlState::SHY009_INVALID_USE_OF_NULL_POINTER:
                         return STATE_HY009;
 
-                    case SQL_STATE_HY010_SEQUENCE_ERROR:
+                    case SqlState::SHY010_SEQUENCE_ERROR:
                         return STATE_HY010;
 
-                    case SQL_STATE_HY090_INVALID_STRING_OR_BUFFER_LENGTH:
+                    case SqlState::SHY090_INVALID_STRING_OR_BUFFER_LENGTH:
                         return STATE_HY090;
 
-                    case SQL_STATE_HY092_OPTION_TYPE_OUT_OF_RANGE:
+                    case SqlState::SHY092_OPTION_TYPE_OUT_OF_RANGE:
                         return STATE_HY092;
 
-                    case SQL_STATE_HY105_INVALID_PARAMETER_TYPE:
+                    case SqlState::SHY105_INVALID_PARAMETER_TYPE:
                         return STATE_HY105;
 
-                    case SQL_STATE_HY106_FETCH_TYPE_OUT_OF_RANGE:
+                    case SqlState::SHY106_FETCH_TYPE_OUT_OF_RANGE:
                         return STATE_HY106;
 
-                    case SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED:
+                    case SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED:
                         return STATE_HYC00;
 
-                    case SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT:
+                    case SqlState::SHYT01_CONNECTIOIN_TIMEOUT:
                         return STATE_HYT01;
 
-                    case SQL_STATE_IM001_FUNCTION_NOT_SUPPORTED:
+                    case SqlState::SIM001_FUNCTION_NOT_SUPPORTED:
                         return STATE_IM001;
 
                     default:


Mime
View raw message