You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2017/04/13 11:47:58 UTC

[1/8] ignite git commit: IGNITE-3581: Renaming

Repository: ignite
Updated Branches:
  refs/heads/ignite-3581 [created] 869c9121e


IGNITE-3581: Renaming


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0da662f3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0da662f3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0da662f3

Branch: refs/heads/ignite-3581
Commit: 0da662f383893aa13dafa53e2ee84f4c2b56e55d
Parents: 5c4b7b0
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Apr 12 18:05:05 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Thu Apr 13 14:40:02 2017 +0300

----------------------------------------------------------------------
 .../cpp/core/include/ignite/impl/interop/interop_target.h    | 6 +++---
 .../platforms/cpp/core/src/impl/interop/interop_target.cpp   | 8 ++++----
 modules/platforms/cpp/odbc-test/src/test_utils.cpp           | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0da662f3/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
index 2040c74..f9b2b7f 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
@@ -41,13 +41,13 @@ namespace ignite
                     enum Type
                     {
                         /** Null. */
-                        R_NULL = 0,
+                        AI_NULL = 0,
 
                         /** Success. */
-                        R_SUCCESS = 1,
+                        AI_SUCCESS = 1,
 
                         /** Error. */
-                        R_ERROR = -1
+                        AI_ERROR = -1
                     };
                 };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0da662f3/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp b/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
index 24dbb25..b0932e7 100644
--- a/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
@@ -186,11 +186,11 @@ namespace ignite
 
                     IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                    if (jniErr.code == IGNITE_JNI_ERR_SUCCESS && res == OperationResult::R_SUCCESS)
+                    if (jniErr.code == IGNITE_JNI_ERR_SUCCESS && res == OperationResult::AI_SUCCESS)
                         ReadFrom(outInMem.Get(), outOp);
-                    else if (res == OperationResult::R_NULL)
+                    else if (res == OperationResult::AI_NULL)
                         outOp.SetNull();
-                    else if (res == OperationResult::R_ERROR)
+                    else if (res == OperationResult::AI_ERROR)
                         ReadError(outInMem.Get(), err);
                     else
                         assert(false);
@@ -213,7 +213,7 @@ namespace ignite
                     return static_cast<OperationResult::Type>(res);
                 }
 
-                return OperationResult::R_ERROR;
+                return OperationResult::AI_ERROR;
             }
 
             int64_t InteropTarget::OutInOpLong(int32_t opType, int64_t val, IgniteError& err)

http://git-wip-us.apache.org/repos/asf/ignite/blob/0da662f3/modules/platforms/cpp/odbc-test/src/test_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/test_utils.cpp b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
index 6fceb03..713601a 100644
--- a/modules/platforms/cpp/odbc-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
@@ -44,11 +44,11 @@ namespace ignite_test
         cfg.jvmOpts.push_back("-Xdebug");
         cfg.jvmOpts.push_back("-Xnoagent");
         cfg.jvmOpts.push_back("-Djava.compiler=NONE");
-        cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
+        cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005");
         cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
         cfg.jvmOpts.push_back("-Duser.timezone=GMT");
         cfg.jvmOpts.push_back("-DIGNITE_QUIET=false");
-        cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
+        //cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
 
         std::string home;


[8/8] ignite git commit: IGNITE-3581: Minor fix

Posted by is...@apache.org.
IGNITE-3581: Minor fix


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/869c9121
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/869c9121
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/869c9121

Branch: refs/heads/ignite-3581
Commit: 869c9121e8dd31709cb3a761ac7963af9d9b66ae
Parents: 0da662f
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Apr 12 19:43:44 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Thu Apr 13 14:40:03 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/odbc-test/src/test_utils.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/869c9121/modules/platforms/cpp/odbc-test/src/test_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/test_utils.cpp b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
index 713601a..0599789 100644
--- a/modules/platforms/cpp/odbc-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
@@ -48,7 +48,7 @@ namespace ignite_test
         cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
         cfg.jvmOpts.push_back("-Duser.timezone=GMT");
         cfg.jvmOpts.push_back("-DIGNITE_QUIET=false");
-        //cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
+        cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
 
         std::string home;


[2/8] ignite git commit: IGNITE-3581: Implemented for enums from ODBC

Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/type_info_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/type_info_query.cpp b/modules/platforms/cpp/odbc/src/query/type_info_query.cpp
index 2de2a7c..280477b 100644
--- a/modules/platforms/cpp/odbc/src/query/type_info_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/type_info_query.cpp
@@ -25,87 +25,90 @@
 
 namespace
 {
-    enum ResultColumn
+    struct ResultColumn
     {
-        /** Data source\ufffddependent data-type name. */
-        TYPE_NAME = 1,
-
-        /** SQL data type. */
-        DATA_TYPE,
-
-        /** The maximum column size that the server supports for this data type. */
-        COLUMN_SIZE,
-
-        /** Character or characters used to prefix a literal. */
-        LITERAL_PREFIX,
-
-        /** Character or characters used to terminate a literal. */
-        LITERAL_SUFFIX,
-
-        /**
-         * A list of keywords, separated by commas, corresponding to each
-         * parameter that the application may specify in parentheses when using
-         * the name that is returned in the TYPE_NAME field.
-         */
-        CREATE_PARAMS,
-
-        /** Whether the data type accepts a NULL value. */
-        NULLABLE,
-
-        /**
-         * Whether a character data type is case-sensitive in collations and
-         * comparisons.
-         */
-        CASE_SENSITIVE,
-
-        /** How the data type is used in a WHERE clause. */
-        SEARCHABLE,
-
-        /** Whether the data type is unsigned. */
-        UNSIGNED_ATTRIBUTE,
-
-        /** Whether the data type has predefined fixed precision and scale. */
-        FIXED_PREC_SCALE,
-
-        /** Whether the data type is autoincrementing. */
-        AUTO_UNIQUE_VALUE,
-
-        /**
-         * Localized version of the data source\ufffddependent name of the data
-         * type.
-         */
-        LOCAL_TYPE_NAME,
-
-        /** The minimum scale of the data type on the data source. */
-        MINIMUM_SCALE,
-
-        /** The maximum scale of the data type on the data source. */
-        MAXIMUM_SCALE,
-
-        /**
-         * The value of the SQL data type as it appears in the SQL_DESC_TYPE
-         * field of the descriptor.
-         */
-        SQL_DATA_TYPE,
-
-        /**
-         * When the value of SQL_DATA_TYPE is SQL_DATETIME or SQL_INTERVAL,
-         * this column contains the datetime/interval subcode.
-         */
-        SQL_DATETIME_SUB,
-
-        /**
-         * If the data type is an approximate numeric type, this column
-         * contains the value 2 to indicate that COLUMN_SIZE specifies a number
-         * of bits.
-         */
-        NUM_PREC_RADIX,
-
-        /**
-         * If the data type is an interval data type, then this column contains
-         * the value of the interval leading precision.
-         */
-        INTERVAL_PRECISION
+        enum Type
+        {
+            /** Data source\ufffddependent data-type name. */
+            TYPE_NAME = 1,
+
+            /** SQL data type. */
+            DATA_TYPE,
+
+            /** The maximum column size that the server supports for this data type. */
+            COLUMN_SIZE,
+
+            /** Character or characters used to prefix a literal. */
+            LITERAL_PREFIX,
+
+            /** Character or characters used to terminate a literal. */
+            LITERAL_SUFFIX,
+
+            /**
+             * A list of keywords, separated by commas, corresponding to each
+             * parameter that the application may specify in parentheses when using
+             * the name that is returned in the TYPE_NAME field.
+             */
+            CREATE_PARAMS,
+
+            /** Whether the data type accepts a NULL value. */
+            NULLABLE,
+
+            /**
+             * Whether a character data type is case-sensitive in collations and
+             * comparisons.
+             */
+            CASE_SENSITIVE,
+
+            /** How the data type is used in a WHERE clause. */
+            SEARCHABLE,
+
+            /** Whether the data type is unsigned. */
+            UNSIGNED_ATTRIBUTE,
+
+            /** Whether the data type has predefined fixed precision and scale. */
+            FIXED_PREC_SCALE,
+
+            /** Whether the data type is autoincrementing. */
+            AUTO_UNIQUE_VALUE,
+
+            /**
+             * Localized version of the data source\ufffddependent name of the data
+             * type.
+             */
+            LOCAL_TYPE_NAME,
+
+            /** The minimum scale of the data type on the data source. */
+            MINIMUM_SCALE,
+
+            /** The maximum scale of the data type on the data source. */
+            MAXIMUM_SCALE,
+
+            /**
+             * The value of the SQL data type as it appears in the SQL_DESC_TYPE
+             * field of the descriptor.
+             */
+            SQL_DATA_TYPE,
+
+            /**
+             * When the value of SQL_DATA_TYPE is SQL_DATETIME or SQL_INTERVAL,
+             * this column contains the datetime/interval subcode.
+             */
+            SQL_DATETIME_SUB,
+
+            /**
+             * If the data type is an approximate numeric type, this column
+             * contains the value 2 to indicate that COLUMN_SIZE specifies a number
+             * of bits.
+             */
+            NUM_PREC_RADIX,
+
+            /**
+             * If the data type is an interval data type, then this column contains
+             * the value of the interval leading precision.
+             */
+            INTERVAL_PRECISION
+        };
     };
 }
 
@@ -116,7 +119,7 @@ namespace ignite
         namespace query
         {
             TypeInfoQuery::TypeInfoQuery(diagnostic::Diagnosable& diag, int16_t sqlType) :
-                Query(diag, TYPE_INFO),
+                Query(diag, QueryType::TYPE_INFO),
                 columnsMeta(),
                 executed(false),
                 types(),
@@ -177,13 +180,13 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult TypeInfoQuery::Execute()
+            SqlResult::Type TypeInfoQuery::Execute()
             {
                 cursor = types.begin();
 
                 executed = true;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             const meta::ColumnMetaVector & TypeInfoQuery::GetMeta() const
@@ -191,17 +194,17 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult TypeInfoQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
+            SqlResult::Type TypeInfoQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == types.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 app::ColumnBindingMap::iterator it;
 
@@ -210,50 +213,50 @@ namespace ignite
 
                 ++cursor;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult TypeInfoQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
+            SqlResult::Type TypeInfoQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
             {
                 using namespace ignite::impl::binary;
 
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == types.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 int8_t currentType = *cursor;
 
                 switch (columnIdx)
                 {
-                    case TYPE_NAME:
+                    case ResultColumn::TYPE_NAME:
                     {
                         buffer.PutString(type_traits::BinaryTypeToSqlTypeName(currentType));
 
                         break;
                     }
 
-                    case DATA_TYPE:
-                    case SQL_DATA_TYPE:
+                    case ResultColumn::DATA_TYPE:
+                    case ResultColumn::SQL_DATA_TYPE:
                     {
                         buffer.PutInt16(type_traits::BinaryToSqlType(currentType));
 
                         break;
                     }
 
-                    case COLUMN_SIZE:
+                    case ResultColumn::COLUMN_SIZE:
                     {
                         buffer.PutInt32(type_traits::BinaryTypeColumnSize(currentType));
 
                         break;
                     }
 
-                    case LITERAL_PREFIX:
+                    case ResultColumn::LITERAL_PREFIX:
                     {
                         if (currentType == IGNITE_TYPE_STRING)
                             buffer.PutString("'");
@@ -265,7 +268,7 @@ namespace ignite
                         break;
                     }
 
-                    case LITERAL_SUFFIX:
+                    case ResultColumn::LITERAL_SUFFIX:
                     {
                         if (currentType == IGNITE_TYPE_STRING)
                             buffer.PutString("'");
@@ -275,21 +278,21 @@ namespace ignite
                         break;
                     }
 
-                    case CREATE_PARAMS:
+                    case ResultColumn::CREATE_PARAMS:
                     {
                         buffer.PutNull();
 
                         break;
                     }
 
-                    case NULLABLE:
+                    case ResultColumn::NULLABLE:
                     {
                         buffer.PutInt32(type_traits::BinaryTypeNullability(currentType));
 
                         break;
                     }
 
-                    case CASE_SENSITIVE:
+                    case ResultColumn::CASE_SENSITIVE:
                     {
                         if (currentType == IGNITE_TYPE_STRING)
                             buffer.PutInt16(SQL_TRUE);
@@ -299,64 +302,64 @@ namespace ignite
                         break;
                     }
 
-                    case SEARCHABLE:
+                    case ResultColumn::SEARCHABLE:
                     {
                         buffer.PutInt16(SQL_SEARCHABLE);
 
                         break;
                     }
 
-                    case UNSIGNED_ATTRIBUTE:
+                    case ResultColumn::UNSIGNED_ATTRIBUTE:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeUnsigned(currentType));
 
                         break;
                     }
 
-                    case FIXED_PREC_SCALE:
+                    case ResultColumn::FIXED_PREC_SCALE:
                     {
                         buffer.PutInt16(SQL_FALSE);
 
                         break;
                     }
 
-                    case AUTO_UNIQUE_VALUE:
+                    case ResultColumn::AUTO_UNIQUE_VALUE:
                     {
                         buffer.PutInt16(SQL_FALSE);
 
                         break;
                     }
 
-                    case LOCAL_TYPE_NAME:
+                    case ResultColumn::LOCAL_TYPE_NAME:
                     {
                         buffer.PutNull();
 
                         break;
                     }
 
-                    case MINIMUM_SCALE:
-                    case MAXIMUM_SCALE:
+                    case ResultColumn::MINIMUM_SCALE:
+                    case ResultColumn::MAXIMUM_SCALE:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeDecimalDigits(currentType));
 
                         break;
                     }
 
-                    case SQL_DATETIME_SUB:
+                    case ResultColumn::SQL_DATETIME_SUB:
                     {
                         buffer.PutNull();
 
                         break;
                     }
 
-                    case NUM_PREC_RADIX:
+                    case ResultColumn::NUM_PREC_RADIX:
                     {
                         buffer.PutInt32(type_traits::BinaryTypeNumPrecRadix(currentType));
 
                         break;
                     }
 
-                    case INTERVAL_PRECISION:
+                    case ResultColumn::INTERVAL_PRECISION:
                     {
                         buffer.PutNull();
 
@@ -367,16 +370,16 @@ namespace ignite
                         break;
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult TypeInfoQuery::Close()
+            SqlResult::Type TypeInfoQuery::Close()
             {
                 cursor = types.end();
 
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool TypeInfoQuery::DataAvailable() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/row.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/row.cpp b/modules/platforms/cpp/odbc/src/row.cpp
index 5e5a00e..34b061b 100644
--- a/modules/platforms/cpp/odbc/src/row.cpp
+++ b/modules/platforms/cpp/odbc/src/row.cpp
@@ -74,13 +74,13 @@ namespace ignite
             return true;
         }
 
-        SqlResult Row::ReadColumnToBuffer(uint16_t columnIdx, app::ApplicationDataBuffer& dataBuf)
+        SqlResult::Type Row::ReadColumnToBuffer(uint16_t columnIdx, app::ApplicationDataBuffer& dataBuf)
         {
             using namespace ignite::impl::binary;
             using namespace ignite::impl::interop;
 
             if (!EnsureColumnDiscovered(columnIdx))
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
 
             Column& column = GetColumn(columnIdx);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/statement.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/statement.cpp b/modules/platforms/cpp/odbc/src/statement.cpp
index 2395d66..99ec42e 100644
--- a/modules/platforms/cpp/odbc/src/statement.cpp
+++ b/modules/platforms/cpp/odbc/src/statement.cpp
@@ -56,24 +56,24 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalBindColumn(columnIdx, targetType, targetValue, bufferLength, strLengthOrIndicator));
         }
 
-        SqlResult Statement::InternalBindColumn(uint16_t columnIdx, int16_t targetType, void* targetValue, SqlLen bufferLength, SqlLen* strLengthOrIndicator)
+        SqlResult::Type Statement::InternalBindColumn(uint16_t columnIdx, int16_t targetType, void* targetValue, SqlLen bufferLength, SqlLen* strLengthOrIndicator)
         {
             using namespace odbc::type_traits;
-            IgniteSqlType driverType = ToDriverType(targetType);
+            OdbcNativeType::Type driverType = ToDriverType(targetType);
 
-            if (driverType == IGNITE_ODBC_C_TYPE_UNSUPPORTED)
+            if (driverType == OdbcNativeType::AI_UNSUPPORTED)
             {
-                AddStatusRecord(odbc::SQL_STATE_HY003_INVALID_APPLICATION_BUFFER_TYPE, "The argument TargetType was not a valid data type.");
+                AddStatusRecord(odbc::SqlState::SHY003_INVALID_APPLICATION_BUFFER_TYPE, "The argument TargetType was not a valid data type.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (bufferLength < 0)
             {
-                AddStatusRecord(odbc::SQL_STATE_HY090_INVALID_STRING_OR_BUFFER_LENGTH,
+                AddStatusRecord(odbc::SqlState::SHY090_INVALID_STRING_OR_BUFFER_LENGTH,
                     "The value specified for the argument BufferLength was less than 0.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (targetValue || strLengthOrIndicator)
@@ -85,7 +85,7 @@ namespace ignite
             else
                 SafeUnbindColumn(columnIdx);
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::SafeBindColumn(uint16_t columnIdx, const app::ApplicationDataBuffer& buffer)
@@ -124,20 +124,20 @@ namespace ignite
             return res;
         }
 
-        SqlResult Statement::InternalGetColumnNumber(int32_t &res)
+        SqlResult::Type Statement::InternalGetColumnNumber(int32_t &res)
         {
             const meta::ColumnMetaVector* meta = GetMeta();
 
             if (!meta)
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not executed.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not executed.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             res = static_cast<int32_t>(meta->size());
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::BindParameter(uint16_t paramIdx, int16_t ioType, int16_t bufferType, int16_t paramSqlType,
@@ -146,7 +146,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalBindParameter(paramIdx, ioType, bufferType, paramSqlType, columnSize, decDigits, buffer, bufferLen, resLen));
         }
 
-        SqlResult Statement::InternalBindParameter(uint16_t paramIdx, int16_t ioType, int16_t bufferType, int16_t paramSqlType,
+        SqlResult::Type Statement::InternalBindParameter(uint16_t paramIdx, int16_t ioType, int16_t bufferType, int16_t paramSqlType,
                                                    SqlUlen columnSize, int16_t decDigits, void* buffer, SqlLen bufferLen, SqlLen* resLen)
         {
             using namespace odbc::type_traits;
@@ -157,36 +157,36 @@ namespace ignite
 
             if (paramIdx == 0)
             {
-                AddStatusRecord(SQL_STATE_24000_INVALID_CURSOR_STATE,
+                AddStatusRecord(SqlState::S24000_INVALID_CURSOR_STATE,
                     "The value specified for the argument ParameterNumber was less than 1.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (ioType != SQL_PARAM_INPUT)
             {
-                AddStatusRecord(SQL_STATE_HY105_INVALID_PARAMETER_TYPE,
+                AddStatusRecord(SqlState::SHY105_INVALID_PARAMETER_TYPE,
                     "The value specified for the argument InputOutputType was not SQL_PARAM_INPUT.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (!IsSqlTypeSupported(paramSqlType))
             {
-                AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                     "Data type is not supported.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            IgniteSqlType driverType = ToDriverType(bufferType);
+            OdbcNativeType::Type driverType = ToDriverType(bufferType);
 
-            if (driverType == IGNITE_ODBC_C_TYPE_UNSUPPORTED)
+            if (driverType == OdbcNativeType::AI_UNSUPPORTED)
             {
-                AddStatusRecord(odbc::SQL_STATE_HY003_INVALID_APPLICATION_BUFFER_TYPE,
+                AddStatusRecord(odbc::SqlState::SHY003_INVALID_APPLICATION_BUFFER_TYPE,
                     "The argument TargetType was not a valid data type.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (buffer)
@@ -200,7 +200,7 @@ namespace ignite
             else
                 SafeUnbindParameter(paramIdx);
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::SafeBindParameter(uint16_t paramIdx, const app::Parameter& param)
@@ -225,7 +225,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalSetAttribute(attr, value, valueLen));
         }
 
-        SqlResult Statement::InternalSetAttribute(int attr, void* value, SQLINTEGER valueLen)
+        SqlResult::Type Statement::InternalSetAttribute(int attr, void* value, SQLINTEGER valueLen)
         {
             switch (attr)
             {
@@ -237,10 +237,10 @@ namespace ignite
 
                     if (val != 1)
                     {
-                        AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                        AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                             "Fetching of more than one row by call is not supported.");
 
-                        return SQL_RESULT_ERROR;
+                        return SqlResult::AI_ERROR;
                     }
 
                     break;
@@ -276,14 +276,14 @@ namespace ignite
 
                 default:
                 {
-                    AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                    AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                         "Specified attribute is not supported.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::GetAttribute(int attr, void* buf, SQLINTEGER bufLen, SQLINTEGER* valueLen)
@@ -291,13 +291,13 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalGetAttribute(attr, buf, bufLen, valueLen));
         }
 
-        SqlResult Statement::InternalGetAttribute(int attr, void* buf, SQLINTEGER bufLen, SQLINTEGER* valueLen)
+        SqlResult::Type Statement::InternalGetAttribute(int attr, void* buf, SQLINTEGER bufLen, SQLINTEGER* valueLen)
         {
             if (!buf)
             {
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Data buffer is NULL.");
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, "Data buffer is NULL.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             switch (attr)
@@ -361,14 +361,14 @@ namespace ignite
 
                 default:
                 {
-                    AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                    AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                         "Specified attribute is not supported.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         uint16_t Statement::GetParametersNumber()
@@ -395,18 +395,18 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalGetColumnData(columnIdx, buffer));
         }
 
-        SqlResult Statement::InternalGetColumnData(uint16_t columnIdx,
+        SqlResult::Type Statement::InternalGetColumnData(uint16_t columnIdx,
             app::ApplicationDataBuffer& buffer)
         {
             if (!currentQuery.get())
             {
-                AddStatusRecord(SQL_STATE_24000_INVALID_CURSOR_STATE,
+                AddStatusRecord(SqlState::S24000_INVALID_CURSOR_STATE,
                     "Cursor is not in the open state.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            SqlResult res = currentQuery->GetColumn(columnIdx, buffer);
+            SqlResult::Type res = currentQuery->GetColumn(columnIdx, buffer);
 
             return res;
         }
@@ -416,7 +416,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalPrepareSqlQuery(query));
         }
 
-        SqlResult Statement::InternalPrepareSqlQuery(const std::string& query)
+        SqlResult::Type Statement::InternalPrepareSqlQuery(const std::string& query)
         {
             if (currentQuery.get())
                 currentQuery->Close();
@@ -426,7 +426,7 @@ namespace ignite
             // Resetting parameters types as we are changing the query.
             paramTypes.clear();
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::ExecuteSqlQuery(const std::string& query)
@@ -434,11 +434,11 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalExecuteSqlQuery(query));
         }
 
-        SqlResult Statement::InternalExecuteSqlQuery(const std::string& query)
+        SqlResult::Type Statement::InternalExecuteSqlQuery(const std::string& query)
         {
-            SqlResult result = InternalPrepareSqlQuery(query);
+            SqlResult::Type result = InternalPrepareSqlQuery(query);
 
-            if (result != SQL_RESULT_SUCCESS)
+            if (result != SqlResult::AI_SUCCESS)
                 return result;
 
             return InternalExecuteSqlQuery();
@@ -449,13 +449,13 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalExecuteSqlQuery());
         }
 
-        SqlResult Statement::InternalExecuteSqlQuery()
+        SqlResult::Type Statement::InternalExecuteSqlQuery()
         {
             if (!currentQuery.get())
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not prepared.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not prepared.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             bool paramDataReady = true;
@@ -471,7 +471,7 @@ namespace ignite
             }
 
             if (!paramDataReady)
-                return SQL_RESULT_NEED_DATA;
+                return SqlResult::AI_NEED_DATA;
 
             return currentQuery->Execute();
         }
@@ -482,7 +482,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalExecuteGetColumnsMetaQuery(schema, table, column));
         }
 
-        SqlResult Statement::InternalExecuteGetColumnsMetaQuery(const std::string& schema,
+        SqlResult::Type Statement::InternalExecuteGetColumnsMetaQuery(const std::string& schema,
             const std::string& table, const std::string& column)
         {
             if (currentQuery.get())
@@ -506,7 +506,7 @@ namespace ignite
                 catalog, schema, table, tableType));
         }
 
-        SqlResult Statement::InternalExecuteGetTablesMetaQuery(const std::string& catalog,
+        SqlResult::Type Statement::InternalExecuteGetTablesMetaQuery(const std::string& catalog,
             const std::string& schema, const std::string& table, const std::string& tableType)
         {
             if (currentQuery.get())
@@ -527,7 +527,7 @@ namespace ignite
                 primarySchema, primaryTable, foreignCatalog, foreignSchema, foreignTable));
         }
 
-        SqlResult Statement::InternalExecuteGetForeignKeysQuery(const std::string& primaryCatalog,
+        SqlResult::Type Statement::InternalExecuteGetForeignKeysQuery(const std::string& primaryCatalog,
             const std::string& primarySchema, const std::string& primaryTable,
             const std::string& foreignCatalog, const std::string& foreignSchema,
             const std::string& foreignTable)
@@ -547,7 +547,7 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalExecuteGetPrimaryKeysQuery(catalog, schema, table));
         }
 
-        SqlResult Statement::InternalExecuteGetPrimaryKeysQuery(const std::string& catalog,
+        SqlResult::Type Statement::InternalExecuteGetPrimaryKeysQuery(const std::string& catalog,
             const std::string& schema, const std::string& table)
         {
             if (currentQuery.get())
@@ -567,16 +567,16 @@ namespace ignite
                 catalog, schema, table, scope, nullable));
         }
 
-        SqlResult Statement::InternalExecuteSpecialColumnsQuery(int16_t type,
+        SqlResult::Type Statement::InternalExecuteSpecialColumnsQuery(int16_t type,
             const std::string& catalog, const std::string& schema,
             const std::string& table, int16_t scope, int16_t nullable)
         {
             if (type != SQL_BEST_ROWID && type != SQL_ROWVER)
             {
-                AddStatusRecord(SQL_STATE_HY097_COLUMN_TYPE_OUT_OF_RANGE,
+                AddStatusRecord(SqlState::SHY097_COLUMN_TYPE_OUT_OF_RANGE,
                     "An invalid IdentifierType value was specified.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (currentQuery.get())
@@ -593,14 +593,14 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalExecuteGetTypeInfoQuery(sqlType));
         }
 
-        SqlResult Statement::InternalExecuteGetTypeInfoQuery(int16_t sqlType)
+        SqlResult::Type Statement::InternalExecuteGetTypeInfoQuery(int16_t sqlType)
         {
             if (!type_traits::IsSqlTypeSupported(sqlType))
             {
-                AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                     "Data type is not supported.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (currentQuery.get())
@@ -616,15 +616,15 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalFreeResources(option));
         }
 
-        SqlResult Statement::InternalFreeResources(int16_t option)
+        SqlResult::Type Statement::InternalFreeResources(int16_t option)
         {
             switch (option)
             {
                 case SQL_DROP:
                 {
-                    AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Deprecated, call SQLFreeHandle instead");
+                    AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, "Deprecated, call SQLFreeHandle instead");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 case SQL_CLOSE:
@@ -648,11 +648,11 @@ namespace ignite
 
                 default:
                 {
-                    AddStatusRecord(SQL_STATE_HY092_OPTION_TYPE_OUT_OF_RANGE, "The value specified for the argument Option was invalid");
-                    return SQL_RESULT_ERROR;
+                    AddStatusRecord(SqlState::SHY092_OPTION_TYPE_OUT_OF_RANGE, "The value specified for the argument Option was invalid");
+                    return SqlResult::AI_ERROR;
                 }
             }
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::Close()
@@ -660,14 +660,14 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalClose());
         }
 
-        SqlResult Statement::InternalClose()
+        SqlResult::Type Statement::InternalClose()
         {
             if (!currentQuery.get())
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
 
-            SqlResult result = currentQuery->Close();
+            SqlResult::Type result = currentQuery->Close();
 
-            if (result == SQL_RESULT_SUCCESS)
+            if (result == SqlResult::AI_SUCCESS)
                 currentQuery.reset();
 
             return result;
@@ -678,14 +678,14 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalFetchScroll(orientation, offset));
         }
 
-        SqlResult Statement::InternalFetchScroll(int16_t orientation, int64_t offset)
+        SqlResult::Type Statement::InternalFetchScroll(int16_t orientation, int64_t offset)
         {
             UNREFERENCED_PARAMETER(offset);
 
             if (orientation != SQL_FETCH_NEXT)
             {
-                AddStatusRecord(SQL_STATE_HY106_FETCH_TYPE_OUT_OF_RANGE, "The value specified for the argument FetchOrientation was not SQL_FETCH_NEXT.");
-                return SQL_RESULT_ERROR;
+                AddStatusRecord(SqlState::SHY106_FETCH_TYPE_OUT_OF_RANGE, "The value specified for the argument FetchOrientation was not SQL_FETCH_NEXT.");
+                return SqlResult::AI_ERROR;
             }
 
             return InternalFetchRow();
@@ -696,22 +696,22 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalFetchRow());
         }
 
-        SqlResult Statement::InternalFetchRow()
+        SqlResult::Type Statement::InternalFetchRow()
         {
             if (rowsFetched)
                 *rowsFetched = 0;
 
             if (!currentQuery.get())
             {
-                AddStatusRecord(SQL_STATE_24000_INVALID_CURSOR_STATE,
+                AddStatusRecord(SqlState::S24000_INVALID_CURSOR_STATE,
                     "Cursor is not in the open state.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            SqlResult res = currentQuery->FetchNextRow(columnBindings);
+            SqlResult::Type res = currentQuery->FetchNextRow(columnBindings);
 
-            if (res == SQL_RESULT_SUCCESS)
+            if (res == SqlResult::AI_SUCCESS)
             {
                 if (rowsFetched)
                     *rowsFetched = 1;
@@ -741,14 +741,14 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalNextResults());
         }
 
-        SqlResult Statement::InternalNextResults()
+        SqlResult::Type Statement::InternalNextResults()
         {
             if (!currentQuery.get())
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
 
-            SqlResult result = currentQuery->Close();
+            SqlResult::Type result = currentQuery->Close();
 
-            return result == SQL_RESULT_SUCCESS ? SQL_RESULT_NO_DATA : result;
+            return result == SqlResult::AI_SUCCESS ? SqlResult::AI_NO_DATA : result;
         }
 
         void Statement::GetColumnAttribute(uint16_t colIdx, uint16_t attrId,
@@ -758,7 +758,7 @@ namespace ignite
                 strbuf, buflen, reslen, numbuf));
         }
 
-        SqlResult Statement::InternalGetColumnAttribute(uint16_t colIdx,
+        SqlResult::Type Statement::InternalGetColumnAttribute(uint16_t colIdx,
             uint16_t attrId, char* strbuf, int16_t buflen, int16_t* reslen,
             SqlLen* numbuf)
         {
@@ -766,17 +766,17 @@ namespace ignite
 
             if (!meta)
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not executed.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not executed.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (colIdx > meta->size() + 1 || colIdx < 1)
             {
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR,
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR,
                     "Column index is out of range.", 0, colIdx);
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             const meta::ColumnMeta& columnMeta = meta->at(colIdx - 1);
@@ -803,13 +803,13 @@ namespace ignite
 
             if (!found)
             {
-                AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+                AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                     "Unknown attribute.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         int64_t Statement::AffectedRows()
@@ -821,18 +821,18 @@ namespace ignite
             return rowCnt;
         }
 
-        SqlResult Statement::InternalAffectedRows(int64_t& rowCnt)
+        SqlResult::Type Statement::InternalAffectedRows(int64_t& rowCnt)
         {
             if (!currentQuery.get())
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not executed.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not executed.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             rowCnt = currentQuery->AffectedRows();
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::SetRowsFetchedPtr(size_t* ptr)
@@ -860,21 +860,21 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalSelectParam(paramPtr));
         }
 
-        SqlResult Statement::InternalSelectParam(void** paramPtr)
+        SqlResult::Type Statement::InternalSelectParam(void** paramPtr)
         {
             if (!paramPtr)
             {
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR,
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR,
                     "Invalid parameter: ValuePtrPtr is null.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (!currentQuery.get())
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not prepared.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not prepared.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             app::ParameterBindingMap::iterator it;
@@ -885,11 +885,11 @@ namespace ignite
 
                 if (it != paramBindings.end() && !it->second.IsDataReady())
                 {
-                    AddStatusRecord(SQL_STATE_22026_DATA_LENGTH_MISMATCH,
+                    AddStatusRecord(SqlState::S22026_DATA_LENGTH_MISMATCH,
                         "Less data was sent for a parameter than was specified with "
                         "the StrLen_or_IndPtr argument in SQLBindParameter.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
             }
 
@@ -904,14 +904,14 @@ namespace ignite
 
                     currentParamIdx = paramIdx;
 
-                    return SQL_RESULT_NEED_DATA;
+                    return SqlResult::AI_NEED_DATA;
                 }
             }
 
-            SqlResult res = currentQuery->Execute();
+            SqlResult::Type res = currentQuery->Execute();
 
-            if (res != SQL_RESULT_SUCCESS)
-                res = SQL_RESULT_SUCCESS_WITH_INFO;
+            if (res != SqlResult::AI_SUCCESS)
+                res = SqlResult::AI_SUCCESS_WITH_INFO;
 
             return res;
         }
@@ -921,40 +921,40 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalPutData(data, len));
         }
 
-        SqlResult Statement::InternalPutData(void* data, SqlLen len)
+        SqlResult::Type Statement::InternalPutData(void* data, SqlLen len)
         {
             if (!data && len != 0 && len != SQL_DEFAULT_PARAM && len != SQL_NULL_DATA)
             {
-                AddStatusRecord(SQL_STATE_HY009_INVALID_USE_OF_NULL_POINTER,
+                AddStatusRecord(SqlState::SHY009_INVALID_USE_OF_NULL_POINTER,
                     "Invalid parameter: DataPtr is null StrLen_or_Ind is not 0, "
                     "SQL_DEFAULT_PARAM, or SQL_NULL_DATA.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             if (currentParamIdx == 0)
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR,
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR,
                     "Parameter is not selected with the SQLParamData.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             app::ParameterBindingMap::iterator it = paramBindings.find(currentParamIdx);
 
             if (it == paramBindings.end())
             {
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR,
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR,
                     "Selected parameter has been unbound.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             app::Parameter& param = it->second;
 
             param.PutData(data, len);
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Statement::DescribeParam(int16_t paramNum, int16_t* dataType,
@@ -964,22 +964,22 @@ namespace ignite
                 dataType, paramSize, decimalDigits, nullable));
         }
 
-        SqlResult Statement::InternalDescribeParam(int16_t paramNum, int16_t* dataType,
+        SqlResult::Type Statement::InternalDescribeParam(int16_t paramNum, int16_t* dataType,
             SqlUlen* paramSize, int16_t* decimalDigits, int16_t* nullable)
         {
             query::Query *qry = currentQuery.get();
             if (!qry)
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not prepared.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not prepared.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
-            if (qry->GetType() != query::Query::DATA)
+            if (qry->GetType() != query::QueryType::DATA)
             {
-                AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query is not SQL data query.");
+                AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query is not SQL data query.");
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             int8_t type = 0;
@@ -991,9 +991,9 @@ namespace ignite
 
             if (!type)
             {
-                SqlResult res = UpdateParamsMeta();
+                SqlResult::Type res = UpdateParamsMeta();
 
-                if (res != SQL_RESULT_SUCCESS)
+                if (res != SqlResult::AI_SUCCESS)
                     return res;
 
                 if (paramNum < 1 || static_cast<size_t>(paramNum) > paramTypes.size())
@@ -1014,15 +1014,15 @@ namespace ignite
             if (nullable)
                 *nullable = type_traits::BinaryTypeNullability(type);
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
-        SqlResult Statement::UpdateParamsMeta()
+        SqlResult::Type Statement::UpdateParamsMeta()
         {
             query::Query *qry0 = currentQuery.get();
 
             assert(qry0 != 0);
-            assert(qry0->GetType() == query::Query::DATA);
+            assert(qry0->GetType() == query::QueryType::DATA);
 
             query::DataQuery* qry = static_cast<query::DataQuery*>(qry0);
 
@@ -1038,18 +1038,18 @@ 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());
 
-                AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
             paramTypes = rsp.GetTypeIds();
@@ -1059,7 +1059,7 @@ namespace ignite
                 LOG_MSG("[" << i << "] Parameter type: " << paramTypes[i]);
             }
 
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/type_traits.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/type_traits.cpp b/modules/platforms/cpp/odbc/src/type_traits.cpp
index e4ce10f..bff21d1 100644
--- a/modules/platforms/cpp/odbc/src/type_traits.cpp
+++ b/modules/platforms/cpp/odbc/src/type_traits.cpp
@@ -187,7 +187,7 @@ namespace ignite
 
             bool IsApplicationTypeSupported(int16_t type)
             {
-                return ToDriverType(type) != IGNITE_ODBC_C_TYPE_UNSUPPORTED;
+                return ToDriverType(type) != OdbcNativeType::AI_UNSUPPORTED;
             }
 
             bool IsSqlTypeSupported(int16_t type)
@@ -296,75 +296,75 @@ namespace ignite
                 return -1;
             }
 
-            IgniteSqlType ToDriverType(int16_t type)
+            OdbcNativeType::Type ToDriverType(int16_t type)
             {
                 switch (type)
                 {
                 case SQL_C_CHAR:
-                    return IGNITE_ODBC_C_TYPE_CHAR;
+                    return OdbcNativeType::AI_CHAR;
 
                 case SQL_C_WCHAR:
-                    return IGNITE_ODBC_C_TYPE_WCHAR;
+                    return OdbcNativeType::AI_WCHAR;
 
                 case SQL_C_SSHORT:
                 case SQL_C_SHORT:
-                    return IGNITE_ODBC_C_TYPE_SIGNED_SHORT;
+                    return OdbcNativeType::AI_SIGNED_SHORT;
 
                 case SQL_C_USHORT:
-                    return IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT;
+                    return OdbcNativeType::AI_UNSIGNED_SHORT;
 
                 case SQL_C_SLONG:
                 case SQL_C_LONG:
-                    return IGNITE_ODBC_C_TYPE_SIGNED_LONG;
+                    return OdbcNativeType::AI_SIGNED_LONG;
 
                 case SQL_C_ULONG:
-                    return IGNITE_ODBC_C_TYPE_UNSIGNED_LONG;
+                    return OdbcNativeType::AI_UNSIGNED_LONG;
 
                 case SQL_C_FLOAT:
-                    return IGNITE_ODBC_C_TYPE_FLOAT;
+                    return OdbcNativeType::AI_FLOAT;
 
                 case SQL_C_DOUBLE:
-                    return IGNITE_ODBC_C_TYPE_DOUBLE;
+                    return OdbcNativeType::AI_DOUBLE;
 
                 case SQL_C_BIT:
-                    return IGNITE_ODBC_C_TYPE_BIT;
+                    return OdbcNativeType::AI_BIT;
 
                 case SQL_C_STINYINT:
                 case SQL_C_TINYINT:
-                    return IGNITE_ODBC_C_TYPE_SIGNED_TINYINT;
+                    return OdbcNativeType::AI_SIGNED_TINYINT;
 
                 case SQL_C_UTINYINT:
-                    return IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT;
+                    return OdbcNativeType::AI_UNSIGNED_TINYINT;
 
                 case SQL_C_SBIGINT:
-                    return IGNITE_ODBC_C_TYPE_SIGNED_BIGINT;
+                    return OdbcNativeType::AI_SIGNED_BIGINT;
 
                 case SQL_C_UBIGINT:
-                    return IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT;
+                    return OdbcNativeType::AI_UNSIGNED_BIGINT;
 
                 case SQL_C_BINARY:
-                    return IGNITE_ODBC_C_TYPE_BINARY;
+                    return OdbcNativeType::AI_BINARY;
 
                 case SQL_C_TYPE_DATE:
-                    return IGNITE_ODBC_C_TYPE_TDATE;
+                    return OdbcNativeType::AI_TDATE;
 
                 case SQL_C_TYPE_TIME:
-                    return IGNITE_ODBC_C_TYPE_TTIME;
+                    return OdbcNativeType::AI_TTIME;
 
                 case SQL_C_TYPE_TIMESTAMP:
-                    return IGNITE_ODBC_C_TYPE_TTIMESTAMP;
+                    return OdbcNativeType::AI_TTIMESTAMP;
 
                 case SQL_C_NUMERIC:
-                    return IGNITE_ODBC_C_TYPE_NUMERIC;
+                    return OdbcNativeType::AI_NUMERIC;
 
                 case SQL_C_GUID:
-                    return IGNITE_ODBC_C_TYPE_GUID;
+                    return OdbcNativeType::AI_GUID;
 
                 case SQL_C_DEFAULT:
-                    return IGNITE_ODBC_C_TYPE_DEFAULT;
+                    return OdbcNativeType::AI_DEFAULT;
 
                 default:
-                    return IGNITE_ODBC_C_TYPE_UNSUPPORTED;
+                    return OdbcNativeType::AI_UNSUPPORTED;
                 }
             }
 


[4/8] ignite git commit: IGNITE-3581: Implemented for enums from ODBC

Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/primary_keys_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/primary_keys_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/primary_keys_query.h
index 5cb7b6e..65bac33 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/primary_keys_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/primary_keys_query.h
@@ -57,7 +57,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -71,7 +71,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -80,14 +80,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/query.h
index 40be1ed..4959eaf 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/query.h
@@ -33,14 +33,11 @@ namespace ignite
     {
         namespace query
         {
-            /**
-             * Query.
-             */
-            class Query
+            /** Query type. */
+            struct QueryType
             {
-            public:
-                /** Query type. */
-                enum Type {
+                enum Type
+                {
                     /** Column metadata query type. */
                     COLUMN_METADATA,
 
@@ -62,7 +59,14 @@ namespace ignite
                     /** Type info query type. */
                     TYPE_INFO
                 };
+            };
 
+            /**
+             * Query.
+             */
+            class Query
+            {
+            public:
                 /**
                  * Destructor.
                  */
@@ -76,7 +80,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute() = 0;
+                virtual SqlResult::Type Execute() = 0;
 
                 /**
                  * Fetch next result row to application buffers.
@@ -84,7 +88,7 @@ namespace ignite
                  * @param columnBindings Application buffers to put data to.
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings) = 0;
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings) = 0;
 
                 /**
                  * Get data of the specified column in the result set.
@@ -93,14 +97,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer) = 0;
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer) = 0;
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close() = 0;
+                virtual SqlResult::Type Close() = 0;
 
                 /**
                  * Get column metadata.
@@ -128,7 +132,7 @@ namespace ignite
                  *
                  * @return Query type.
                  */
-                Type GetType() const
+                QueryType::Type GetType() const
                 {
                     return type;
                 }
@@ -137,7 +141,7 @@ namespace ignite
                 /**
                  * Constructor.
                  */
-                Query(diagnostic::Diagnosable& diag, Type type) :
+                Query(diagnostic::Diagnosable& diag, QueryType::Type type) :
                     diag(diag),
                     type(type)
                 {
@@ -148,7 +152,7 @@ namespace ignite
                 diagnostic::Diagnosable& diag;
 
                 /** Query type. */
-                Type type;
+                QueryType::Type type;
             };
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/special_columns_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/special_columns_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/special_columns_query.h
index 1d2f339..0f6660f 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/special_columns_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/special_columns_query.h
@@ -58,7 +58,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Fetch next result row to application buffers.
@@ -66,7 +66,7 @@ namespace ignite
                  * @param columnBindings Application buffers to put data to.
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -75,14 +75,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Get column metadata.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/table_metadata_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/table_metadata_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/table_metadata_query.h
index 6322435..cef963c 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/table_metadata_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/table_metadata_query.h
@@ -60,7 +60,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -74,7 +74,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -83,14 +83,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.
@@ -114,7 +114,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                SqlResult MakeRequestGetTablesMeta();
+                SqlResult::Type MakeRequestGetTablesMeta();
 
                 /** Connection associated with the statement. */
                 Connection& connection;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/type_info_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/type_info_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/type_info_query.h
index d337d03..22b291a 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/type_info_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/type_info_query.h
@@ -50,7 +50,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -64,7 +64,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -73,14 +73,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/row.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/row.h b/modules/platforms/cpp/odbc/include/ignite/odbc/row.h
index 888432e..9c0c117 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/row.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/row.h
@@ -61,7 +61,7 @@ namespace ignite
              * @param dataBuf Application data buffer.
              * @return True on success.
              */
-            SqlResult ReadColumnToBuffer(uint16_t columnIdx, app::ApplicationDataBuffer& dataBuf);
+            SqlResult::Type ReadColumnToBuffer(uint16_t columnIdx, app::ApplicationDataBuffer& dataBuf);
 
             /**
              * Move to next row.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h b/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
index 596fc66..09122c3 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
@@ -393,7 +393,7 @@ namespace ignite
              * @param strLengthOrIndicator Pointer to the length/indicator buffer.
              * @return Operation result.
              */
-            SqlResult InternalBindColumn(uint16_t columnIdx, int16_t targetType, void* targetValue, SqlLen bufferLength, SqlLen* strLengthOrIndicator);
+            SqlResult::Type InternalBindColumn(uint16_t columnIdx, int16_t targetType, void* targetValue, SqlLen bufferLength, SqlLen* strLengthOrIndicator);
 
             /**
              * Bind parameter.
@@ -429,7 +429,7 @@ namespace ignite
              * @param resLen A pointer to a buffer for the parameter's length.
              * @return Operation result.
              */
-            SqlResult InternalBindParameter(uint16_t paramIdx, int16_t ioType, int16_t bufferType, int16_t paramSqlType,
+            SqlResult::Type InternalBindParameter(uint16_t paramIdx, int16_t ioType, int16_t bufferType, int16_t paramSqlType,
                                             SqlUlen columnSize, int16_t decDigits, void* buffer, SqlLen bufferLen, SqlLen* resLen);
 
             /**
@@ -441,7 +441,7 @@ namespace ignite
              * @param valueLen Value length.
              * @return Operation result.
              */
-            SqlResult InternalSetAttribute(int attr, void* value, SQLINTEGER valueLen);
+            SqlResult::Type InternalSetAttribute(int attr, void* value, SQLINTEGER valueLen);
 
             /**
              * Get statement attribute.
@@ -453,7 +453,7 @@ namespace ignite
              * @param valueLen Resulting value length.
              * @return Operation result.
              */
-            SqlResult InternalGetAttribute(int attr, void* buf, SQLINTEGER bufLen, SQLINTEGER* valueLen);
+            SqlResult::Type InternalGetAttribute(int attr, void* buf, SQLINTEGER bufLen, SQLINTEGER* valueLen);
 
             /**
              * Get value of the column in the result set.
@@ -462,7 +462,7 @@ namespace ignite
              * @param buffer Buffer to put column data to.
              * @return Operation result.
              */
-            SqlResult InternalGetColumnData(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+            SqlResult::Type InternalGetColumnData(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
 
             /**
@@ -470,7 +470,7 @@ namespace ignite
              * @param option indicates what needs to be freed
              * @return Operation result.
              */
-            SqlResult InternalFreeResources(int16_t option);
+            SqlResult::Type InternalFreeResources(int16_t option);
 
             /**
              * Close statement.
@@ -478,7 +478,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalClose();
+            SqlResult::Type InternalClose();
 
             /**
              * Prepare SQL query.
@@ -486,7 +486,7 @@ namespace ignite
              * @param query SQL query.
              * @return Operation result.
              */
-            SqlResult InternalPrepareSqlQuery(const std::string& query);
+            SqlResult::Type InternalPrepareSqlQuery(const std::string& query);
 
             /**
              * Execute SQL query.
@@ -494,14 +494,14 @@ namespace ignite
              * @param query SQL query.
              * @return Operation result.
              */
-            SqlResult InternalExecuteSqlQuery(const std::string& query);
+            SqlResult::Type InternalExecuteSqlQuery(const std::string& query);
 
             /**
              * Execute SQL query.
              *
              * @return Operation result.
              */
-            SqlResult InternalExecuteSqlQuery();
+            SqlResult::Type InternalExecuteSqlQuery();
 
             /**
              * Fetch query result row with offset
@@ -509,14 +509,14 @@ namespace ignite
              * @param offset Fetch offset
              * @return Operation result.
              */
-            SqlResult InternalFetchScroll(int16_t orientation, int64_t offset);
+            SqlResult::Type InternalFetchScroll(int16_t orientation, int64_t offset);
 
             /**
              * Fetch query result row.
              *
              * @return Operation result.
              */
-            SqlResult InternalFetchRow();
+            SqlResult::Type InternalFetchRow();
 
             /**
              * Get number of columns in the result set.
@@ -524,7 +524,7 @@ namespace ignite
              * @param res Columns number.
              * @return Operation result.
              */
-            SqlResult InternalGetColumnNumber(int32_t &res);
+            SqlResult::Type InternalGetColumnNumber(int32_t &res);
 
             /**
              * Get columns metadata.
@@ -534,7 +534,7 @@ namespace ignite
              * @param column Column search pattern.
              * @return Operation result.
              */
-            SqlResult InternalExecuteGetColumnsMetaQuery(const std::string& schema,
+            SqlResult::Type InternalExecuteGetColumnsMetaQuery(const std::string& schema,
                 const std::string& table, const std::string& column);
 
             /**
@@ -546,7 +546,7 @@ namespace ignite
              * @param tableType Table type search pattern.
              * @return Operation result.
              */
-            SqlResult InternalExecuteGetTablesMetaQuery(const std::string& catalog,
+            SqlResult::Type InternalExecuteGetTablesMetaQuery(const std::string& catalog,
                 const std::string& schema, const std::string& table,
                 const std::string& tableType);
 
@@ -561,7 +561,7 @@ namespace ignite
              * @param foreignTable Foreign key table name.
              * @return Operation result.
              */
-            SqlResult InternalExecuteGetForeignKeysQuery(const std::string& primaryCatalog,
+            SqlResult::Type InternalExecuteGetForeignKeysQuery(const std::string& primaryCatalog,
                 const std::string& primarySchema, const std::string& primaryTable,
                 const std::string& foreignCatalog, const std::string& foreignSchema,
                 const std::string& foreignTable);
@@ -574,7 +574,7 @@ namespace ignite
              * @param table Table name.
              * @return Operation result.
              */
-            SqlResult InternalExecuteGetPrimaryKeysQuery(const std::string& catalog,
+            SqlResult::Type InternalExecuteGetPrimaryKeysQuery(const std::string& catalog,
                 const std::string& schema, const std::string& table);
 
             /**
@@ -589,7 +589,7 @@ namespace ignite
              *                 that can have a NULL value.
              * @return Operation result.
              */
-            SqlResult InternalExecuteSpecialColumnsQuery(int16_t type,
+            SqlResult::Type InternalExecuteSpecialColumnsQuery(int16_t type,
                 const std::string& catalog, const std::string& schema,
                 const std::string& table, int16_t scope, int16_t nullable);
 
@@ -599,7 +599,7 @@ namespace ignite
              * @param sqlType SQL type for which to return info or SQL_ALL_TYPES.
              * @return Operation result.
              */
-            SqlResult InternalExecuteGetTypeInfoQuery(int16_t sqlType);
+            SqlResult::Type InternalExecuteGetTypeInfoQuery(int16_t sqlType);
 
             /**
              * Next results.
@@ -608,7 +608,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalNextResults();
+            SqlResult::Type InternalNextResults();
 
             /**
              * Get column attribute.
@@ -621,7 +621,7 @@ namespace ignite
              * @param numbuf Numeric value buffer.
              * @return Operation result.
              */
-            SqlResult InternalGetColumnAttribute(uint16_t colIdx, uint16_t attrId,
+            SqlResult::Type InternalGetColumnAttribute(uint16_t colIdx, uint16_t attrId,
                 char* strbuf, int16_t buflen, int16_t* reslen, SqlLen* numbuf);
 
             /**
@@ -630,7 +630,7 @@ namespace ignite
              * @param rowCnt Number of rows affected by the statement.
              * @return Operation result.
              */
-            SqlResult InternalAffectedRows(int64_t& rowCnt);
+            SqlResult::Type InternalAffectedRows(int64_t& rowCnt);
 
             /**
              * Select next parameter data for which is required.
@@ -638,7 +638,7 @@ namespace ignite
              * @param paramPtr Pointer to param id stored here.
              * @return Operation result.
              */
-            SqlResult InternalSelectParam(void** paramPtr);
+            SqlResult::Type InternalSelectParam(void** paramPtr);
 
             /**
              * Puts data for previously selected parameter or column.
@@ -647,7 +647,7 @@ namespace ignite
              * @param len Data length.
              * @return Operation result.
              */
-            SqlResult InternalPutData(void* data, SqlLen len);
+            SqlResult::Type InternalPutData(void* data, SqlLen len);
 
             /**
              * Get type info of the parameter of the prepared statement.
@@ -659,13 +659,13 @@ namespace ignite
              * @param nullable - Nullability flag.
              * @return Operation result.
              */
-            SqlResult InternalDescribeParam(int16_t paramNum, int16_t* dataType,
+            SqlResult::Type InternalDescribeParam(int16_t paramNum, int16_t* dataType,
                 SqlUlen* paramSize, int16_t* decimalDigits, int16_t* nullable);
 
             /**
              * Make request to data source to update parameters metadata.
              */
-            SqlResult UpdateParamsMeta();
+            SqlResult::Type UpdateParamsMeta();
 
             /**
              * Constructor.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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)


[6/8] ignite git commit: IGNITE-3581: Moved enums to separate structs for Core

Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core-test/src/transactions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/transactions_test.cpp b/modules/platforms/cpp/core-test/src/transactions_test.cpp
index 3bf1ac6..68ab78a 100644
--- a/modules/platforms/cpp/core-test/src/transactions_test.cpp
+++ b/modules/platforms/cpp/core-test/src/transactions_test.cpp
@@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(TransactionRollbackOnly)
 
     tx.Close();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
     BOOST_CHECK(tx.IsRollbackOnly());
 
     BOOST_CHECK_EQUAL(1, cache.Get(1));
@@ -207,55 +207,55 @@ BOOST_AUTO_TEST_CASE(TransactionAttributes)
     Transaction tx = transactions.GetTx();
     BOOST_REQUIRE(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_OPTIMISTIC,
-        IGNITE_TX_ISOLATION_SERIALIZABLE, 1000, 100);
+    tx = transactions.TxStart(TransactionConcurrency::OPTIMISTIC,
+        TransactionIsolation::SERIALIZABLE, 1000, 100);
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_OPTIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_SERIALIZABLE, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::OPTIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::SERIALIZABLE, tx.GetIsolation());
     BOOST_CHECK_EQUAL(1000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Commit();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_COMMITTED, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::COMMITTED, tx.GetState());
 
     tx = transactions.GetTx();
 
     BOOST_CHECK(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_PESSIMISTIC,
-        IGNITE_TX_ISOLATION_READ_COMMITTED, 2000, 10);
+    tx = transactions.TxStart(TransactionConcurrency::PESSIMISTIC,
+        TransactionIsolation::READ_COMMITTED, 2000, 10);
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_PESSIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_READ_COMMITTED, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::PESSIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::READ_COMMITTED, tx.GetIsolation());
     BOOST_CHECK_EQUAL(2000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Rollback();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
 
     tx = transactions.GetTx();
 
     BOOST_CHECK(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_OPTIMISTIC,
-        IGNITE_TX_ISOLATION_REPEATABLE_READ, 3000, 0);
+    tx = transactions.TxStart(TransactionConcurrency::OPTIMISTIC,
+        TransactionIsolation::REPEATABLE_READ, 3000, 0);
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_OPTIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_REPEATABLE_READ, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::OPTIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::REPEATABLE_READ, tx.GetIsolation());
     BOOST_CHECK_EQUAL(3000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Close();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
 
     tx = transactions.GetTx();
 
@@ -531,7 +531,7 @@ BOOST_AUTO_TEST_CASE(TransactionRollbackOnlyNe)
     if (!err.GetCode() == IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
     BOOST_CHECK(tx.IsRollbackOnly());
 
     BOOST_CHECK_EQUAL(1, cache.Get(1));
@@ -553,64 +553,64 @@ BOOST_AUTO_TEST_CASE(TransactionAttributesNe)
     Transaction tx = transactions.GetTx();
     BOOST_REQUIRE(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_OPTIMISTIC,
-        IGNITE_TX_ISOLATION_SERIALIZABLE, 1000, 100, err);
+    tx = transactions.TxStart(TransactionConcurrency::OPTIMISTIC,
+        TransactionIsolation::SERIALIZABLE, 1000, 100, err);
 
     if (!err.GetCode() == IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_OPTIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_SERIALIZABLE, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::OPTIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::SERIALIZABLE, tx.GetIsolation());
     BOOST_CHECK_EQUAL(1000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Commit();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_COMMITTED, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::COMMITTED, tx.GetState());
 
     tx = transactions.GetTx();
 
     BOOST_CHECK(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_PESSIMISTIC,
-        IGNITE_TX_ISOLATION_READ_COMMITTED, 2000, 10, err);
+    tx = transactions.TxStart(TransactionConcurrency::PESSIMISTIC,
+        TransactionIsolation::READ_COMMITTED, 2000, 10, err);
 
     if (!err.GetCode() == IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_PESSIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_READ_COMMITTED, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::PESSIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::READ_COMMITTED, tx.GetIsolation());
     BOOST_CHECK_EQUAL(2000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Rollback();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
 
     tx = transactions.GetTx();
 
     BOOST_CHECK(!tx.IsValid());
 
-    tx = transactions.TxStart(IGNITE_TX_CONCURRENCY_OPTIMISTIC,
-        IGNITE_TX_ISOLATION_REPEATABLE_READ, 3000, 0, err);
+    tx = transactions.TxStart(TransactionConcurrency::OPTIMISTIC,
+        TransactionIsolation::REPEATABLE_READ, 3000, 0, err);
 
     if (!err.GetCode() == IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
     BOOST_REQUIRE(transactions.GetTx().IsValid());
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_CONCURRENCY_OPTIMISTIC, tx.GetConcurrency());
-    BOOST_CHECK_EQUAL(IGNITE_TX_ISOLATION_REPEATABLE_READ, tx.GetIsolation());
+    BOOST_CHECK_EQUAL(TransactionConcurrency::OPTIMISTIC, tx.GetConcurrency());
+    BOOST_CHECK_EQUAL(TransactionIsolation::REPEATABLE_READ, tx.GetIsolation());
     BOOST_CHECK_EQUAL(3000, tx.GetTimeout());
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ACTIVE, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ACTIVE, tx.GetState());
 
     tx.Close();
 
-    BOOST_CHECK_EQUAL(IGNITE_TX_STATE_ROLLED_BACK, tx.GetState());
+    BOOST_CHECK_EQUAL(TransactionState::ROLLED_BACK, tx.GetState());
 
     tx = transactions.GetTx();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache.h b/modules/platforms/cpp/core/include/ignite/cache/cache.h
index 33fffc8..e37e806 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache.h
@@ -95,7 +95,7 @@ namespace ignite
 
             /**
              * Checks whether this cache contains no key-value mappings.
-             * Semantically equals to Cache.Size(IGNITE_PEEK_MODE_PRIMARY) == 0.
+             * Semantically equals to Cache.Size(CachePeekMode::PRIMARY) == 0.
              *
              * This method should only be used on the valid instance.
              *
@@ -114,7 +114,7 @@ namespace ignite
 
             /**
              * Checks whether this cache contains no key-value mappings.
-             * Semantically equals to Cache.Size(IGNITE_PEEK_MODE_PRIMARY) == 0.
+             * Semantically equals to Cache.Size(CachePeekMode::PRIMARY) == 0.
              *
              * This method should only be used on the valid instance.
              *
@@ -1256,7 +1256,7 @@ namespace ignite
              */
             int32_t LocalSize()
             {
-                return LocalSize(IGNITE_PEEK_MODE_ALL);
+                return LocalSize(CachePeekMode::ALL);
             }
 
             /**
@@ -1269,7 +1269,7 @@ namespace ignite
              */
             int32_t LocalSize(IgniteError& err)
             {
-                return LocalSize(IGNITE_PEEK_MODE_ALL, err);
+                return LocalSize(CachePeekMode::ALL, err);
             }
 
             /**
@@ -1315,7 +1315,7 @@ namespace ignite
              */
             int32_t Size()
             {
-                return Size(ignite::cache::IGNITE_PEEK_MODE_ALL);
+                return Size(ignite::cache::CachePeekMode::ALL);
             }
 
             /**
@@ -1329,7 +1329,7 @@ namespace ignite
              */
             int32_t Size(IgniteError& err)
             {
-                return Size(ignite::cache::IGNITE_PEEK_MODE_ALL, err);
+                return Size(ignite::cache::CachePeekMode::ALL, err);
             }
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/cache/cache_peek_mode.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache_peek_mode.h b/modules/platforms/cpp/core/include/ignite/cache/cache_peek_mode.h
index ef9d031..7edaecb 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache_peek_mode.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache_peek_mode.h
@@ -30,45 +30,48 @@ namespace ignite
         /**
          * Enumeration of all supported cache peek modes.
          */
-        enum CachePeekMode
+        struct CachePeekMode
         {
-            /**
-             * Peeks into all available cache storages.
-             */
-            IGNITE_PEEK_MODE_ALL = 0x01,
+            enum Type
+            {
+                /**
+                 * Peeks into all available cache storages.
+                 */
+                ALL = 0x01,
 
-            /**
-             * Peek into near cache only (don't peek into partitioned cache).
-             * In case of LOCAL cache, behaves as IGNITE_PEEK_MODE_ALL mode.
-             */
-            IGNITE_PEEK_MODE_NEAR = 0x02,
+                /**
+                 * Peek into near cache only (don't peek into partitioned cache).
+                 * In case of LOCAL cache, behaves as CachePeekMode::ALL mode.
+                 */
+                NEAR_CACHE = 0x02,
 
-            /**
-             * Peek value from primary copy of partitioned cache only (skip near cache).
-             * In case of LOCAL cache, behaves as IGNITE_PEEK_MODE_ALL mode.
-             */
-            IGNITE_PEEK_MODE_PRIMARY = 0x04,
+                /**
+                 * Peek value from primary copy of partitioned cache only (skip near cache).
+                 * In case of LOCAL cache, behaves as CachePeekMode::ALL mode.
+                 */
+                PRIMARY = 0x04,
 
-            /**
-             * Peek value from backup copies of partitioned cache only (skip near cache).
-             * In case of LOCAL cache, behaves as IGNITE_PEEK_MODE_ALL mode.
-             */
-            IGNITE_PEEK_MODE_BACKUP = 0x08,
+                /**
+                 * Peek value from backup copies of partitioned cache only (skip near cache).
+                 * In case of LOCAL cache, behaves as CachePeekMode::ALL mode.
+                 */
+                BACKUP = 0x08,
 
-            /**
-             * Peeks value from the on-heap storage only.
-             */
-            IGNITE_PEEK_MODE_ONHEAP = 0x10,
+                /**
+                 * Peeks value from the on-heap storage only.
+                 */
+                ONHEAP = 0x10,
 
-            /**
-             * Peeks value from the off-heap storage only, without loading off-heap value into cache.
-             */
-            IGNITE_PEEK_MODE_OFFHEAP = 0x20,
+                /**
+                 * Peeks value from the off-heap storage only, without loading off-heap value into cache.
+                 */
+                OFFHEAP = 0x20,
 
-            /**
-             * Peeks value from the swap storage only, without loading swapped value into cache.
-             */
-            IGNITE_PEEK_MODE_SWAP = 0x40
+                /**
+                 * Peeks value from the swap storage only, without loading swapped value into cache.
+                 */
+                SWAP = 0x40
+            };
         };
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/ignite_binding.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite_binding.h b/modules/platforms/cpp/core/include/ignite/ignite_binding.h
index 70bdedb..344bdf6 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite_binding.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite_binding.h
@@ -84,7 +84,7 @@ namespace ignite
 
             if (im)
             {
-                im->RegisterCallback(impl::IgniteBindingImpl::CACHE_ENTRY_PROCESSOR_APPLY,
+                im->RegisterCallback(impl::IgniteBindingImpl::CallbackType::CACHE_ENTRY_PROCESSOR_APPLY,
                     binary::BinaryType<P>::GetTypeId(), impl::binding::ListenerApply<P, typename P::KeyType,
                         typename P::ValueType, typename P::ReturnType, typename P::ArgumentType>, err);
             }
@@ -110,7 +110,7 @@ namespace ignite
 
             if (im)
             {
-                im->RegisterCallback(impl::IgniteBindingImpl::CACHE_ENTRY_FILTER_CREATE,
+                im->RegisterCallback(impl::IgniteBindingImpl::CallbackType::CACHE_ENTRY_FILTER_CREATE,
                     typeId, impl::binding::FilterCreate<F>);
             }
             else

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/bindings.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/bindings.h b/modules/platforms/cpp/core/include/ignite/impl/bindings.h
index ce77672..c1ada12 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/bindings.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/bindings.h
@@ -75,13 +75,13 @@ namespace ignite
                 V value;
                 bool exists = reader.TryReadObject<V>(value);
 
-                cache::MutableCacheEntryState entryState;
+                cache::MutableCacheEntryState::Type entryState;
 
                 R res = procHolder.template Process<R, K, V>(key, value, exists, entryState);
 
                 writer.WriteInt8(static_cast<int8_t>(entryState));
 
-                if (entryState == cache::ENTRY_STATE_VALUE_SET)
+                if (entryState == cache::MutableCacheEntryState::VALUE_SET)
                     writer.WriteTopObject(value);
 
                 writer.WriteTopObject(res);

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/cache/cache_entry_processor_holder.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/cache/cache_entry_processor_holder.h b/modules/platforms/cpp/core/include/ignite/impl/cache/cache_entry_processor_holder.h
index decbaa9..a821407 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/cache/cache_entry_processor_holder.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/cache/cache_entry_processor_holder.h
@@ -31,22 +31,25 @@ namespace ignite
             /**
              * Mutable Cache entry state.
              */
-            enum MutableCacheEntryState
+            struct MutableCacheEntryState
             {
-                /** No changes have been committed to entry. */
-                ENTRY_STATE_INTACT = 0,
+                enum Type
+                {
+                    /** No changes have been committed to entry. */
+                    INTACT = 0,
 
-                /** Value of the entry has been changed. */
-                ENTRY_STATE_VALUE_SET = 1,
+                    /** Value of the entry has been changed. */
+                    VALUE_SET = 1,
 
-                /** Entry has been removed from cache. */
-                ENTRY_STATE_VALUE_REMOVED = 2,
+                    /** Entry has been removed from cache. */
+                    VALUE_REMOVED = 2,
 
-                /** Error occured. Represented in portable form. */
-                ENTRY_STATE_ERR_PORTABLE = 3,
+                    /** Error occured. Represented in binary form. */
+                    ERR_BINARY = 3,
 
-                /** Error occured. Represented in string form. */
-                ENTRY_STATE_ERR_STRING = 4
+                    /** Error occured. Represented in string form. */
+                    ERR_STRING = 4
+                };
             };
 
             /**
@@ -59,17 +62,17 @@ namespace ignite
              * @return Cache entry state.
              */
             template<typename V>
-            MutableCacheEntryState GetMutableCacheEntryState(const V& valueBefore, bool existsBefore,
-                                                             const V& valueAfter, bool existsAfter)
+            MutableCacheEntryState::Type GetMutableCacheEntryState(const V& valueBefore, bool existsBefore,
+                                                                   const V& valueAfter, bool existsAfter)
             {
                 if ((!existsBefore && existsAfter) ||
                     (existsBefore && existsAfter && !(valueBefore == valueAfter)))
-                    return ENTRY_STATE_VALUE_SET;
+                    return MutableCacheEntryState::VALUE_SET;
 
                 if (existsBefore && !existsAfter)
-                    return ENTRY_STATE_VALUE_REMOVED;
+                    return MutableCacheEntryState::VALUE_REMOVED;
 
-                return ENTRY_STATE_INTACT;
+                return MutableCacheEntryState::INTACT;
             }
 
             /**
@@ -147,7 +150,7 @@ namespace ignite
                  * @return Result of the processing.
                  */
                 template<typename R, typename K, typename V>
-                R Process(const K& key, V& value, bool exists, MutableCacheEntryState &state)
+                R Process(const K& key, V& value, bool exists, MutableCacheEntryState::Type &state)
                 {
                     typedef ignite::cache::MutableCacheEntry<K, V> Entry;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/ignite_binding_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/ignite_binding_impl.h b/modules/platforms/cpp/core/include/ignite/impl/ignite_binding_impl.h
index 7b20c50..a99855a 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/ignite_binding_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/ignite_binding_impl.h
@@ -43,13 +43,16 @@ namespace ignite
             typedef int64_t(Callback)(binary::BinaryReaderImpl&, binary::BinaryWriterImpl&, IgniteEnvironment&);
 
         public:
-            enum CallbackType
+            struct CallbackType
             {
-                CACHE_ENTRY_PROCESSOR_APPLY = 1,
+                enum Type
+                {
+                    CACHE_ENTRY_PROCESSOR_APPLY = 1,
 
-                CACHE_ENTRY_FILTER_CREATE = 2,
+                    CACHE_ENTRY_FILTER_CREATE = 2,
 
-                CACHE_ENTRY_FILTER_APPLY = 3,
+                    CACHE_ENTRY_FILTER_APPLY = 3,
+                };
             };
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
index 0d32561..2040c74 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
@@ -36,16 +36,19 @@ namespace ignite
                 /**
                  * Operation result.
                  */
-                enum OperationResult
+                struct OperationResult
                 {
-                    /** Null. */
-                    ResultNull = 0,
+                    enum Type
+                    {
+                        /** Null. */
+                        R_NULL = 0,
 
-                    /** Success. */
-                    ResultSuccess = 1,
+                        /** Success. */
+                        R_SUCCESS = 1,
 
-                    /** Error. */
-                    ResultError = -1
+                        /** Error. */
+                        R_ERROR = -1
+                    };
                 };
 
                 /**
@@ -65,7 +68,7 @@ namespace ignite
                  * Internal out operation.
                  *
                  * @param opType Operation type.
-                 * @param outOp Input.
+                 * @param inOp Input.
                  * @param err Error.
                  * @return Result.
                  */
@@ -129,7 +132,7 @@ namespace ignite
                  * @param err Error.
                  * @return Operation result.
                  */
-                OperationResult InStreamOutLong(int32_t opType, InteropMemory& outInMem, IgniteError& err);
+                OperationResult::Type InStreamOutLong(int32_t opType, InteropMemory& outInMem, IgniteError& err);
 
                 /**
                 * Internal out-in operation.

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/transactions/transaction_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/transactions/transaction_impl.h b/modules/platforms/cpp/core/include/ignite/impl/transactions/transaction_impl.h
index 6889c62..959a6de 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/transactions/transaction_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/transactions/transaction_impl.h
@@ -128,7 +128,7 @@ namespace ignite
                  * @param err Error.
                  * @return Current state.
                  */
-                TransactionState GetState(IgniteError& err);
+                TransactionState::Type GetState(IgniteError& err);
 
                 /**
                  * Get concurrency.
@@ -206,7 +206,7 @@ namespace ignite
                 int32_t txSize;
 
                 /** Transaction state. */
-                TransactionState state;
+                TransactionState::Type state;
 
                 /** Closed flag. */
                 bool closed;

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/impl/transactions/transactions_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/transactions/transactions_impl.h b/modules/platforms/cpp/core/include/ignite/impl/transactions/transactions_impl.h
index 651c64f..ba754c5 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/transactions/transactions_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/transactions/transactions_impl.h
@@ -72,7 +72,7 @@ namespace ignite
                  * @param err Error.
                  * @return Resulting state.
                  */
-                TransactionState TxCommit(int64_t id, IgniteError& err);
+                TransactionState::Type TxCommit(int64_t id, IgniteError& err);
 
                 /**
                  * Rollback Transaction.
@@ -81,7 +81,7 @@ namespace ignite
                  * @param err Error.
                  * @return Resulting state.
                  */
-                TransactionState TxRollback(int64_t id, IgniteError& err);
+                TransactionState::Type TxRollback(int64_t id, IgniteError& err);
 
                 /**
                  * Close Transaction.
@@ -90,7 +90,7 @@ namespace ignite
                  * @param err Error.
                  * @return Resulting state.
                  */
-                TransactionState TxClose(int64_t id, IgniteError& err);
+                TransactionState::Type TxClose(int64_t id, IgniteError& err);
 
                 /**
                  * Make transaction into rollback-only.
@@ -110,7 +110,7 @@ namespace ignite
                  * @param id Transaction ID.
                  * @return Resulting state.
                  */
-                TransactionState TxState(int64_t id, IgniteError& err);
+                TransactionState::Type TxState(int64_t id, IgniteError& err);
 
                 /**
                  * Get metrics.
@@ -127,7 +127,7 @@ namespace ignite
                  * @param state Integer constant state.
                  * @return TransactionState constant.
                  */
-                TransactionState ToTransactionState(int state);
+                TransactionState::Type ToTransactionState(int state);
 
                 IGNITE_NO_COPY_ASSIGNMENT(TransactionsImpl)
             };

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transaction.h b/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
index b51a42c..b42a253 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
@@ -202,7 +202,7 @@ namespace ignite
              *
              * @throw IgniteError class instance in case of failure.
              */
-            TransactionState GetState();
+            TransactionState::Type GetState();
 
             /**
              * Get current state.
@@ -214,7 +214,7 @@ namespace ignite
              * @param err Error.
              * @return Transaction state.
              */
-            TransactionState GetState(IgniteError& err);
+            TransactionState::Type GetState(IgniteError& err);
 
             /**
              * Get concurrency.
@@ -223,9 +223,9 @@ namespace ignite
              *
              * @return Concurrency.
              */
-            TransactionConcurrency GetConcurrency() const
+            TransactionConcurrency::Type GetConcurrency() const
             {
-                return static_cast<TransactionConcurrency>(impl.Get()->GetConcurrency());
+                return static_cast<TransactionConcurrency::Type>(impl.Get()->GetConcurrency());
             }
 
             /**
@@ -235,9 +235,9 @@ namespace ignite
              *
              * @return Isolation.
              */
-            TransactionIsolation GetIsolation() const
+            TransactionIsolation::Type GetIsolation() const
             {
-                return static_cast<TransactionIsolation>(impl.Get()->GetIsolation());
+                return static_cast<TransactionIsolation::Type>(impl.Get()->GetIsolation());
             }
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h b/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
index 8b25d3a..069574f 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
@@ -30,113 +30,122 @@ namespace ignite
         /**
          * Transaction concurrency control model.
          */
-        enum TransactionConcurrency
+        struct TransactionConcurrency
         {
-            /**
-             * Optimistic concurrency model. In this mode all cache operations
-             * are not distributed to other nodes until Transaction::Commit()
-             * is called. In this mode one @c 'PREPARE' message will be sent to
-             * participating cache nodes to start acquiring per-transaction
-             * locks, and once all nodes reply @c 'OK', a one-way @c 'COMMIT'
-             * message is sent without waiting for reply.
-             *
-             * Note that in this mode, optimistic failures are only possible in
-             * conjunction with ::IGNITE_TX_ISOLATION_SERIALIZABLE isolation 
-             * level. In all other cases, optimistic transactions will never
-             * fail optimistically and will always be identically ordered on all
-             * participating grid nodes.
-             */
-            IGNITE_TX_CONCURRENCY_OPTIMISTIC = 0,
-
-            /**
-             * Pessimistic concurrency model. In this mode a lock is acquired
-             * on all cache operations with exception of read operations in
-             * ::IGNITE_TX_ISOLATION_READ_COMMITTED mode. All optional filters
-             * passed into cache operations will be evaluated after successful
-             * lock acquisition. Whenever Transaction::Commit() is called, a
-             * single one-way @c 'COMMIT' message is sent to participating cache
-             * nodes without waiting for reply. Note that there is no reason for
-             * distributed @c 'PREPARE' step, as all locks have been already
-             * acquired.
-             */
-            IGNITE_TX_CONCURRENCY_PESSIMISTIC = 1
+            enum Type
+            {
+                /**
+                 * Optimistic concurrency model. In this mode all cache operations
+                 * are not distributed to other nodes until Transaction::Commit()
+                 * is called. In this mode one @c 'PREPARE' message will be sent to
+                 * participating cache nodes to start acquiring per-transaction
+                 * locks, and once all nodes reply @c 'OK', a one-way @c 'COMMIT'
+                 * message is sent without waiting for reply.
+                 *
+                 * Note that in this mode, optimistic failures are only possible in
+                 * conjunction with ::IGNITE_TX_ISOLATION_SERIALIZABLE isolation 
+                 * level. In all other cases, optimistic transactions will never
+                 * fail optimistically and will always be identically ordered on all
+                 * participating grid nodes.
+                 */
+                OPTIMISTIC = 0,
+
+                /**
+                 * Pessimistic concurrency model. In this mode a lock is acquired
+                 * on all cache operations with exception of read operations in
+                 * ::IGNITE_TX_ISOLATION_READ_COMMITTED mode. All optional filters
+                 * passed into cache operations will be evaluated after successful
+                 * lock acquisition. Whenever Transaction::Commit() is called, a
+                 * single one-way @c 'COMMIT' message is sent to participating cache
+                 * nodes without waiting for reply. Note that there is no reason for
+                 * distributed @c 'PREPARE' step, as all locks have been already
+                 * acquired.
+                 */
+                PESSIMISTIC = 1
+            };
         };
 
         /**
          * Defines different cache transaction isolation levels.
          */
-        enum TransactionIsolation
+        struct TransactionIsolation
         {
-            /**
-             * Read committed isolation level. This isolation level means that
-             * always a committed value will be provided for read operations.
-             * With this isolation level values are always read from cache
-             * global memory or persistent store every time a value is accessed.
-             * In other words, if the same key is accessed more than once within
-             * the same transaction, it may have different value every time
-             * since global cache memory may be updated concurrently by other
-             * threads.
-             */
-            IGNITE_TX_ISOLATION_READ_COMMITTED = 0,
-
-            /**
-             * Repeatable read isolation level. This isolation level means that
-             * if a value was read once within transaction, then all consecutive
-             * reads will provide the same in-transaction value. With this
-             * isolation level accessed values are stored within in-transaction
-             * memory, so consecutive access to the same key within the same
-             * transaction will always return the value that was previously read
-             * or updated within this transaction. If concurrency is
-             * ::IGNITE_TX_CONCURRENCY_PESSIMISTIC, then a lock on the key will
-             * be acquired prior to accessing the value.
-             */
-            IGNITE_TX_ISOLATION_REPEATABLE_READ = 1,
-
-            /**
-             * Serializable isolation level. This isolation level means that all
-             * transactions occur in a completely isolated fashion, as if all
-             * transactions in the system had executed serially, one after the
-             * other. Read access with this level happens the same way as with
-             * ::IGNITE_TX_ISOLATION_REPEATABLE_READ level. However, in
-             * ::IGNITE_TX_CONCURRENCY_OPTIMISTIC mode, if some transactions
-             * cannot be serially isolated from each other, then one winner will
-             * be picked and the other transactions in conflict will result in
-             * IgniteError being thrown.
-             */
-            IGNITE_TX_ISOLATION_SERIALIZABLE = 2
+            enum Type
+            {
+                /**
+                 * Read committed isolation level. This isolation level means that
+                 * always a committed value will be provided for read operations.
+                 * With this isolation level values are always read from cache
+                 * global memory or persistent store every time a value is accessed.
+                 * In other words, if the same key is accessed more than once within
+                 * the same transaction, it may have different value every time
+                 * since global cache memory may be updated concurrently by other
+                 * threads.
+                 */
+                READ_COMMITTED = 0,
+
+                /**
+                 * Repeatable read isolation level. This isolation level means that
+                 * if a value was read once within transaction, then all consecutive
+                 * reads will provide the same in-transaction value. With this
+                 * isolation level accessed values are stored within in-transaction
+                 * memory, so consecutive access to the same key within the same
+                 * transaction will always return the value that was previously read
+                 * or updated within this transaction. If concurrency is
+                 * ::IGNITE_TX_CONCURRENCY_PESSIMISTIC, then a lock on the key will
+                 * be acquired prior to accessing the value.
+                 */
+                REPEATABLE_READ = 1,
+
+                /**
+                 * Serializable isolation level. This isolation level means that all
+                 * transactions occur in a completely isolated fashion, as if all
+                 * transactions in the system had executed serially, one after the
+                 * other. Read access with this level happens the same way as with
+                 * ::IGNITE_TX_ISOLATION_REPEATABLE_READ level. However, in
+                 * ::IGNITE_TX_CONCURRENCY_OPTIMISTIC mode, if some transactions
+                 * cannot be serially isolated from each other, then one winner will
+                 * be picked and the other transactions in conflict will result in
+                 * IgniteError being thrown.
+                 */
+                SERIALIZABLE = 2
+            };
         };
 
         /**
          * Cache transaction state.
          */
-        enum TransactionState
+        struct TransactionState
         {
-            /** %Transaction started. */
-            IGNITE_TX_STATE_ACTIVE,
+            enum Type
+            {
+                /** %Transaction started. */
+                ACTIVE,
 
-            /** %Transaction validating. */
-            IGNITE_TX_STATE_PREPARING,
+                /** %Transaction validating. */
+                PREPARING,
 
-            /** %Transaction validation succeeded. */
-            IGNITE_TX_STATE_PREPARED,
+                /** %Transaction validation succeeded. */
+                PREPARED,
 
-            /** %Transaction is marked for rollback. */
-            IGNITE_TX_STATE_MARKED_ROLLBACK,
+                /** %Transaction is marked for rollback. */
+                MARKED_ROLLBACK,
 
-            /** %Transaction commit started (validating finished). */
-            IGNITE_TX_STATE_COMMITTING,
+                /** %Transaction commit started (validating finished). */
+                COMMITTING,
 
-            /** %Transaction commit succeeded. */
-            IGNITE_TX_STATE_COMMITTED,
+                /** %Transaction commit succeeded. */
+                COMMITTED,
 
-            /** %Transaction rollback started (validation failed). */
-            IGNITE_TX_STATE_ROLLING_BACK,
+                /** %Transaction rollback started (validation failed). */
+                ROLLING_BACK,
 
-            /** %Transaction rollback succeeded. */
-            IGNITE_TX_STATE_ROLLED_BACK,
+                /** %Transaction rollback succeeded. */
+                ROLLED_BACK,
 
-            /** %Transaction rollback failed or is otherwise unknown state. */
-            IGNITE_TX_STATE_UNKNOWN
+                /** %Transaction rollback failed or is otherwise unknown state. */
+                UNKNOWN
+            };
         };
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transactions.h b/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
index 98282bd..579dcd2 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
@@ -108,8 +108,8 @@ namespace ignite
              * @param isolation Isolation.
              * @return New transaction instance.
              */
-            Transaction TxStart(TransactionConcurrency concurrency,
-                TransactionIsolation isolation);
+            Transaction TxStart(TransactionConcurrency::Type concurrency,
+                TransactionIsolation::Type isolation);
 
             /**
              * Starts new transaction with the specified concurrency and
@@ -120,8 +120,8 @@ namespace ignite
              * @param err Error.
              * @return New transaction instance.
              */
-            Transaction TxStart(TransactionConcurrency concurrency,
-                TransactionIsolation isolation, IgniteError& err);
+            Transaction TxStart(TransactionConcurrency::Type concurrency,
+                TransactionIsolation::Type isolation, IgniteError& err);
 
             /**
              * Starts transaction with specified isolation, concurrency,
@@ -134,8 +134,8 @@ namespace ignite
              *     (may be approximate).
              * @return New transaction instance.
              */
-            Transaction TxStart(TransactionConcurrency concurrency,
-                TransactionIsolation isolation, int64_t timeout,
+            Transaction TxStart(TransactionConcurrency::Type concurrency,
+                TransactionIsolation::Type isolation, int64_t timeout,
                 int32_t txSize);
 
             /**
@@ -149,8 +149,8 @@ namespace ignite
              * @param err Error.
              * @return New transaction instance.
              */
-            Transaction TxStart(TransactionConcurrency concurrency,
-                TransactionIsolation isolation, int64_t timeout,
+            Transaction TxStart(TransactionConcurrency::Type concurrency,
+                TransactionIsolation::Type isolation, int64_t timeout,
                 int32_t txSize, IgniteError& err);
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/binary/binary_type_updater_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/binary/binary_type_updater_impl.cpp b/modules/platforms/cpp/core/src/impl/binary/binary_type_updater_impl.cpp
index 73c96fd..36c42a1 100644
--- a/modules/platforms/cpp/core/src/impl/binary/binary_type_updater_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/binary/binary_type_updater_impl.cpp
@@ -36,13 +36,16 @@ namespace ignite
     {
         namespace binary
         {
-            enum Operation
+            struct Operation
             {
-                /** Operation: metadata get. */
-                OP_GET_META = 1,
+                enum Type
+                {
+                    /** Operation: metadata get. */
+                    GET_META = 1,
 
-                /** Operation: metadata update. */
-                OP_PUT_META = 3
+                    /** Operation: metadata update. */
+                    PUT_META = 3
+                };
             };
 
             BinaryTypeUpdaterImpl::BinaryTypeUpdaterImpl(IgniteEnvironment& env, jobject javaRef) :
@@ -97,7 +100,7 @@ namespace ignite
 
                 out.Synchronize();
 
-                long long res = env.Context()->TargetInStreamOutLong(javaRef, OP_PUT_META, mem.Get()->PointerLong(), &jniErr);
+                long long res = env.Context()->TargetInStreamOutLong(javaRef, Operation::PUT_META, mem.Get()->PointerLong(), &jniErr);
 
                 IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
@@ -118,7 +121,7 @@ namespace ignite
 
                 out.Synchronize();
 
-                env.Context()->TargetInStreamOutStream(javaRef, OP_GET_META,
+                env.Context()->TargetInStreamOutStream(javaRef, Operation::GET_META,
                     outMem.Get()->PointerLong(), inMem.Get()->PointerLong(), &jniErr);
 
                 IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/cache/query/continuous/continuous_query_handle_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cache/query/continuous/continuous_query_handle_impl.cpp b/modules/platforms/cpp/core/src/impl/cache/query/continuous/continuous_query_handle_impl.cpp
index b15183b..f98d674 100644
--- a/modules/platforms/cpp/core/src/impl/cache/query/continuous/continuous_query_handle_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cache/query/continuous/continuous_query_handle_impl.cpp
@@ -33,11 +33,14 @@ namespace ignite
             {
                 namespace continuous
                 {
-                    enum Command
+                    struct Command
                     {
-                        GET_INITIAL_QUERY = 0,
+                        enum Type
+                        {
+                            GET_INITIAL_QUERY = 0,
 
-                        CLOSE = 1
+                            CLOSE = 1
+                        };
                     };
 
                     ContinuousQueryHandleImpl::ContinuousQueryHandleImpl(SP_IgniteEnvironment env, int64_t handle, jobject javaRef) :
@@ -52,7 +55,7 @@ namespace ignite
 
                     ContinuousQueryHandleImpl::~ContinuousQueryHandleImpl()
                     {
-                        env.Get()->Context()->TargetInLongOutLong(javaRef, CLOSE, 0);
+                        env.Get()->Context()->TargetInLongOutLong(javaRef, Command::CLOSE, 0);
 
                         JniContext::Release(javaRef);
 
@@ -73,7 +76,7 @@ namespace ignite
 
                         JniErrorInfo jniErr;
 
-                        jobject res = env.Get()->Context()->TargetOutObject(javaRef, GET_INITIAL_QUERY, &jniErr);
+                        jobject res = env.Get()->Context()->TargetOutObject(javaRef, Command::GET_INITIAL_QUERY, &jniErr);
 
                         IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp b/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
index d30c321..1bddeac 100644
--- a/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
@@ -26,9 +26,12 @@ namespace ignite
     {
         namespace cluster
         {
-            enum Command
+            struct Command
             {
-                FOR_SERVERS = 23
+                enum Type
+                {
+                    FOR_SERVERS = 23
+                };
             };
 
             ClusterGroupImpl::ClusterGroupImpl(SP_IgniteEnvironment env, jobject javaRef) :
@@ -46,7 +49,7 @@ namespace ignite
             {
                 JniErrorInfo jniErr;
 
-                jobject res = InOpObject(FOR_SERVERS, err);
+                jobject res = InOpObject(Command::FOR_SERVERS, err);
 
                 if (jniErr.code != java::IGNITE_JNI_ERR_SUCCESS)
                     return SP_ClusterGroupImpl();

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
index 8457bbb..2231003 100644
--- a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
+++ b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
@@ -42,16 +42,19 @@ namespace ignite
         /**
          * Callback codes.
          */
-        enum CallbackOp
+        struct OperationCallback
         {
-            CACHE_INVOKE = 8,
-            CONTINUOUS_QUERY_LISTENER_APPLY = 18,
-            CONTINUOUS_QUERY_FILTER_CREATE = 19,
-            CONTINUOUS_QUERY_FILTER_APPLY = 20,
-            CONTINUOUS_QUERY_FILTER_RELEASE = 21,
-            REALLOC = 36,
-            ON_START = 49,
-            ON_STOP = 50 
+            enum Type
+            {
+                CACHE_INVOKE = 8,
+                CONTINUOUS_QUERY_LISTENER_APPLY = 18,
+                CONTINUOUS_QUERY_FILTER_CREATE = 19,
+                CONTINUOUS_QUERY_FILTER_APPLY = 20,
+                CONTINUOUS_QUERY_FILTER_RELEASE = 21,
+                REALLOC = 36,
+                ON_START = 49,
+                ON_STOP = 50 
+            };
         };
 
         /**
@@ -68,14 +71,14 @@ namespace ignite
 
             switch (type)
             {
-                case ON_STOP:
+                case OperationCallback::ON_STOP:
                 {
                     delete env;
 
                     break;
                 }
 
-                case CONTINUOUS_QUERY_LISTENER_APPLY:
+                case OperationCallback::CONTINUOUS_QUERY_LISTENER_APPLY:
                 {
                     SharedPointer<InteropMemory> mem = env->Get()->GetMemory(val);
 
@@ -84,7 +87,7 @@ namespace ignite
                     break;
                 }
 
-                case CONTINUOUS_QUERY_FILTER_CREATE:
+                case OperationCallback::CONTINUOUS_QUERY_FILTER_CREATE:
                 {
                     SharedPointer<InteropMemory> mem = env->Get()->GetMemory(val);
 
@@ -93,7 +96,7 @@ namespace ignite
                     break;
                 }
 
-                case CONTINUOUS_QUERY_FILTER_APPLY:
+                case OperationCallback::CONTINUOUS_QUERY_FILTER_APPLY:
                 {
                     SharedPointer<InteropMemory> mem = env->Get()->GetMemory(val);
 
@@ -102,13 +105,13 @@ namespace ignite
                     break;
                 }
 
-                case CONTINUOUS_QUERY_FILTER_RELEASE:
+                case OperationCallback::CONTINUOUS_QUERY_FILTER_RELEASE:
                 {
                     // No-op.
                     break;
                 }
 
-                case CACHE_INVOKE:
+                case OperationCallback::CACHE_INVOKE:
                 {
                     SharedPointer<InteropMemory> mem = env->Get()->GetMemory(val);
 
@@ -143,14 +146,14 @@ namespace ignite
 
             switch (type)
             {
-                case ON_START:
+                case OperationCallback::ON_START:
                 {
                     env->Get()->OnStartCallback(val1, reinterpret_cast<jobject>(arg));
 
                     break;
                 }
 
-                case REALLOC:
+                case OperationCallback::REALLOC:
                 {
                     SharedPointer<InteropMemory> mem = env->Get()->GetMemory(val1);
 
@@ -363,7 +366,7 @@ namespace ignite
             bool invoked = false;
 
             int64_t res = binding.Get()->InvokeCallback(invoked,
-                IgniteBindingImpl::CACHE_ENTRY_FILTER_CREATE, filterId, reader, writer);
+                IgniteBindingImpl::CallbackType::CACHE_ENTRY_FILTER_CREATE, filterId, reader, writer);
 
             if (!invoked)
             {
@@ -424,7 +427,8 @@ namespace ignite
 
             bool invoked = false;
 
-            binding.Get()->InvokeCallback(invoked, IgniteBindingImpl::CACHE_ENTRY_PROCESSOR_APPLY, procId, reader, writer);
+            binding.Get()->InvokeCallback(invoked,
+                IgniteBindingImpl::CallbackType::CACHE_ENTRY_PROCESSOR_APPLY, procId, reader, writer);
 
             if (!invoked)
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp b/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
index 3904dfa..24dbb25 100644
--- a/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
@@ -186,18 +186,18 @@ namespace ignite
 
                     IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                    if (jniErr.code == IGNITE_JNI_ERR_SUCCESS && res == ResultSuccess)
+                    if (jniErr.code == IGNITE_JNI_ERR_SUCCESS && res == OperationResult::R_SUCCESS)
                         ReadFrom(outInMem.Get(), outOp);
-                    else if (res == ResultNull)
+                    else if (res == OperationResult::R_NULL)
                         outOp.SetNull();
-                    else if (res == ResultError)
+                    else if (res == OperationResult::R_ERROR)
                         ReadError(outInMem.Get(), err);
                     else
                         assert(false);
                 }
             }
 
-            InteropTarget::OperationResult InteropTarget::InStreamOutLong(int32_t opType,
+            InteropTarget::OperationResult::Type InteropTarget::InStreamOutLong(int32_t opType,
                 InteropMemory& outInMem, IgniteError& err)
             {
                 JniErrorInfo jniErr;
@@ -210,10 +210,10 @@ namespace ignite
 
                     IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                    return static_cast<OperationResult>(res);
+                    return static_cast<OperationResult::Type>(res);
                 }
 
-                return ResultError;
+                return OperationResult::R_ERROR;
             }
 
             int64_t InteropTarget::OutInOpLong(int32_t opType, int64_t val, IgniteError& err)

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/transactions/transaction_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/transactions/transaction_impl.cpp b/modules/platforms/cpp/core/src/impl/transactions/transaction_impl.cpp
index 63b3b6b..852b7d7 100644
--- a/modules/platforms/cpp/core/src/impl/transactions/transaction_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/transactions/transaction_impl.cpp
@@ -37,7 +37,7 @@ namespace ignite
                 isolation(isolation),
                 timeout(timeout),
                 txSize(txSize),
-                state(IGNITE_TX_STATE_UNKNOWN),
+                state(TransactionState::UNKNOWN),
                 closed(false)
             {
                 // No-op.
@@ -97,7 +97,7 @@ namespace ignite
                     return;
                 }
 
-                TransactionState newState = txs.Get()->TxCommit(id, err);
+                TransactionState::Type newState = txs.Get()->TxCommit(id, err);
 
                 if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                 {
@@ -118,7 +118,7 @@ namespace ignite
                     return;
                 }
 
-                TransactionState newState = txs.Get()->TxRollback(id, err);
+                TransactionState::Type newState = txs.Get()->TxRollback(id, err);
 
                 if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                 {
@@ -139,7 +139,7 @@ namespace ignite
                     return;
                 }
 
-                TransactionState newState = txs.Get()->TxClose(id, err);
+                TransactionState::Type newState = txs.Get()->TxClose(id, err);
 
                 if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                 {
@@ -165,14 +165,14 @@ namespace ignite
 
             bool TransactionImpl::IsRollbackOnly(IgniteError& err)
             {
-                TransactionState state0 = GetState(err);
+                TransactionState::Type state0 = GetState(err);
 
-                return state0 == IGNITE_TX_STATE_MARKED_ROLLBACK ||
-                       state0 == IGNITE_TX_STATE_ROLLING_BACK ||
-                       state0 == IGNITE_TX_STATE_ROLLED_BACK;
+                return state0 == TransactionState::MARKED_ROLLBACK ||
+                       state0 == TransactionState::ROLLING_BACK ||
+                       state0 == TransactionState::ROLLED_BACK;
             }
 
-            TransactionState TransactionImpl::GetState(IgniteError& err)
+            TransactionState::Type TransactionImpl::GetState(IgniteError& err)
             {
                 common::concurrent::CsLockGuard guard(accessLock);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/impl/transactions/transactions_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/transactions/transactions_impl.cpp b/modules/platforms/cpp/core/src/impl/transactions/transactions_impl.cpp
index 79f58c5..133b375 100644
--- a/modules/platforms/cpp/core/src/impl/transactions/transactions_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/transactions/transactions_impl.cpp
@@ -30,24 +30,34 @@ namespace ignite
             /**
              * Transaction opertion.
              */
-            enum Operation
+            struct Operation
             {
-                /** Get metrics. */
-                OP_METRICS = 2,
-                /** Start tx. */
-                OP_START = 3,
-                /** Commit. */
-                OP_COMMIT = 4,
-                /** Rollback. */
-                OP_ROLLBACK = 5,
-                /** Close tx. */
-                OP_CLOSE = 6,
-                /** Get tx state. */
-                OP_STATE = 7,
-                /** Set rollback-only mode. */
-                OP_SET_ROLLBACK_ONLY = 8,
-                /** Reset metrics. */
-                OP_RESET_METRICS = 11,
+                enum Type
+                {
+                    /** Get metrics. */
+                    METRICS = 2,
+
+                    /** Start tx. */
+                    START = 3,
+
+                    /** Commit. */
+                    COMMIT = 4,
+
+                    /** Rollback. */
+                    ROLLBACK = 5,
+
+                    /** Close tx. */
+                    CLOSE = 6,
+
+                    /** Get tx state. */
+                    STATE = 7,
+
+                    /** Set rollback-only mode. */
+                    SET_ROLLBACK_ONLY = 8,
+
+                    /** Reset metrics. */
+                    RESET_METRICS = 11,
+                };
             };
 
             TransactionsImpl::TransactionsImpl(SP_IgniteEnvironment env, jobject javaRef) :
@@ -148,34 +158,34 @@ namespace ignite
                 InTransactionStartOperation inOp(concurrency, isolation, timeout, txSize);
                 OutTransactionStartOperation outOp;
 
-                OutInOp(OP_START, inOp, outOp, err);
+                OutInOp(Operation::START, inOp, outOp, err);
 
                 return outOp.Get();
             }
 
-            TransactionsImpl::TransactionState TransactionsImpl::TxCommit(int64_t id, IgniteError& err)
+            TransactionState::Type TransactionsImpl::TxCommit(int64_t id, IgniteError& err)
             {
                 JniErrorInfo jniErr;
 
-                int state = static_cast<int>(OutInOpLong(OP_COMMIT, id, err));
+                int state = static_cast<int>(OutInOpLong(Operation::COMMIT, id, err));
 
                 return ToTransactionState(state);
             }
 
-            TransactionsImpl::TransactionState TransactionsImpl::TxRollback(int64_t id, IgniteError& err)
+            TransactionState::Type TransactionsImpl::TxRollback(int64_t id, IgniteError& err)
             {
                 JniErrorInfo jniErr;
 
-                int state = static_cast<int>(OutInOpLong(OP_ROLLBACK, id, err));
+                int state = static_cast<int>(OutInOpLong(Operation::ROLLBACK, id, err));
 
                 return ToTransactionState(state);
             }
 
-            TransactionsImpl::TransactionState TransactionsImpl::TxClose(int64_t id, IgniteError& err)
+            TransactionState::Type TransactionsImpl::TxClose(int64_t id, IgniteError& err)
             {
                 JniErrorInfo jniErr;
 
-                int state = static_cast<int>(OutInOpLong(OP_CLOSE, id, err));
+                int state = static_cast<int>(OutInOpLong(Operation::CLOSE, id, err));
 
                 return ToTransactionState(state);
             }
@@ -184,16 +194,16 @@ namespace ignite
             {
                 JniErrorInfo jniErr;
 
-                bool rollbackOnly = OutInOpLong(OP_SET_ROLLBACK_ONLY, id, err) == 1;
+                bool rollbackOnly = OutInOpLong(Operation::SET_ROLLBACK_ONLY, id, err) == 1;
 
                 return rollbackOnly;
             }
 
-            TransactionsImpl::TransactionState TransactionsImpl::TxState(int64_t id, IgniteError& err)
+            TransactionState::Type TransactionsImpl::TxState(int64_t id, IgniteError& err)
             {
                 JniErrorInfo jniErr;
 
-                int state = static_cast<int>(OutInOpLong(OP_STATE, id, err));
+                int state = static_cast<int>(OutInOpLong(Operation::STATE, id, err));
 
                 return ToTransactionState(state);
             }
@@ -248,32 +258,32 @@ namespace ignite
             {
                 OutTransactionMetricsOperation op;
 
-                InOp(OP_METRICS, op, err);
+                InOp(Operation::METRICS, op, err);
 
                 if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                     return op.Get();
 
-                return ignite::transactions::TransactionMetrics();
+                return TransactionMetrics();
             }
 
-            TransactionsImpl::TransactionState TransactionsImpl::ToTransactionState(int state)
+            TransactionState::Type TransactionsImpl::ToTransactionState(int state)
             {
                 using namespace ignite::transactions;
                 switch (state)
                 {
-                    case IGNITE_TX_STATE_ACTIVE:
-                    case IGNITE_TX_STATE_PREPARING:
-                    case IGNITE_TX_STATE_PREPARED:
-                    case IGNITE_TX_STATE_MARKED_ROLLBACK:
-                    case IGNITE_TX_STATE_COMMITTING:
-                    case IGNITE_TX_STATE_COMMITTED:
-                    case IGNITE_TX_STATE_ROLLING_BACK:
-                    case IGNITE_TX_STATE_ROLLED_BACK:
-                    case IGNITE_TX_STATE_UNKNOWN:
-                        return static_cast<TransactionState>(state);
+                    case TransactionState::ACTIVE:
+                    case TransactionState::PREPARING:
+                    case TransactionState::PREPARED:
+                    case TransactionState::MARKED_ROLLBACK:
+                    case TransactionState::COMMITTING:
+                    case TransactionState::COMMITTED:
+                    case TransactionState::ROLLING_BACK:
+                    case TransactionState::ROLLED_BACK:
+                    case TransactionState::UNKNOWN:
+                        return static_cast<TransactionState::Type>(state);
 
                     default:
-                        return IGNITE_TX_STATE_UNKNOWN;
+                        return TransactionState::UNKNOWN;
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/transactions/transaction.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/transactions/transaction.cpp b/modules/platforms/cpp/core/src/transactions/transaction.cpp
index 59e2d4a..469fea9 100644
--- a/modules/platforms/cpp/core/src/transactions/transaction.cpp
+++ b/modules/platforms/cpp/core/src/transactions/transaction.cpp
@@ -172,18 +172,18 @@ namespace ignite
             return false;
         }
 
-        TransactionState Transaction::GetState()
+        TransactionState::Type Transaction::GetState()
         {
             IgniteError err;
 
-            TransactionState res = GetState(err);
+            TransactionState::Type res = GetState(err);
 
             IgniteError::ThrowIfNeeded(err);
 
             return res;
         }
 
-        TransactionState Transaction::GetState(IgniteError& err)
+        TransactionState::Type Transaction::GetState(IgniteError& err)
         {
             err = IgniteError();
 
@@ -197,7 +197,7 @@ namespace ignite
                     "Instance is not usable (did you check for error?).");
             }
 
-            return IGNITE_TX_STATE_UNKNOWN;
+            return TransactionState::UNKNOWN;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core/src/transactions/transactions.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/transactions/transactions.cpp b/modules/platforms/cpp/core/src/transactions/transactions.cpp
index 081f97a..4c1ea70 100644
--- a/modules/platforms/cpp/core/src/transactions/transactions.cpp
+++ b/modules/platforms/cpp/core/src/transactions/transactions.cpp
@@ -66,12 +66,12 @@ namespace ignite
 
         Transaction Transactions::TxStart(IgniteError& err)
         {
-            return TxStart(IGNITE_TX_CONCURRENCY_PESSIMISTIC,
-                IGNITE_TX_ISOLATION_READ_COMMITTED, 0, 0, err);
+            return TxStart(TransactionConcurrency::PESSIMISTIC,
+                TransactionIsolation::READ_COMMITTED, 0, 0, err);
         }
 
-        Transaction Transactions::TxStart(TransactionConcurrency concurrency,
-            TransactionIsolation isolation)
+        Transaction Transactions::TxStart(TransactionConcurrency::Type concurrency,
+            TransactionIsolation::Type isolation)
         {
             IgniteError err;
 
@@ -82,14 +82,14 @@ namespace ignite
             return tx;
         }
 
-        Transaction Transactions::TxStart(TransactionConcurrency concurrency,
-            TransactionIsolation isolation, IgniteError& err)
+        Transaction Transactions::TxStart(TransactionConcurrency::Type concurrency,
+            TransactionIsolation::Type isolation, IgniteError& err)
         {
             return TxStart(concurrency, isolation, 0, 0, err);
         }
 
-        Transaction Transactions::TxStart(TransactionConcurrency concurrency,
-            TransactionIsolation isolation, int64_t timeout, int32_t txSize)
+        Transaction Transactions::TxStart(TransactionConcurrency::Type concurrency,
+            TransactionIsolation::Type isolation, int64_t timeout, int32_t txSize)
         {
             IgniteError err;
 
@@ -101,8 +101,8 @@ namespace ignite
             return tx;
         }
 
-        Transaction Transactions::TxStart(TransactionConcurrency concurrency,
-            TransactionIsolation isolation, int64_t timeout, int32_t txSize,
+        Transaction Transactions::TxStart(TransactionConcurrency::Type concurrency,
+            TransactionIsolation::Type isolation, int64_t timeout, int32_t txSize,
             IgniteError& err)
         {
             err = IgniteError();


[7/8] ignite git commit: IGNITE-3581: Moved enums to separate structs for Core

Posted by is...@apache.org.
IGNITE-3581: Moved enums to separate structs for Core


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/53f93681
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/53f93681
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/53f93681

Branch: refs/heads/ignite-3581
Commit: 53f9368119db82045e093a3d4e2514c8bd2e9c1c
Parents: 76485fc
Author: Igor Sapego <is...@gridgain.com>
Authored: Tue Apr 11 13:42:23 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Thu Apr 13 14:40:02 2017 +0300

----------------------------------------------------------------------
 .../include/ignite/binary/binary_consts.h       |  86 ++++-----
 .../include/ignite/binary/binary_containers.h   |  12 +-
 .../include/ignite/binary/binary_raw_reader.h   |   6 +-
 .../include/ignite/binary/binary_raw_writer.h   |  16 +-
 .../include/ignite/binary/binary_reader.h       |   6 +-
 .../include/ignite/binary/binary_writer.h       |  13 +-
 .../ignite/impl/binary/binary_reader_impl.h     |  31 ++--
 .../include/ignite/impl/binary/binary_schema.h  |  19 +-
 .../ignite/impl/binary/binary_writer_impl.h     |  18 +-
 .../cpp/binary/src/binary/binary_raw_reader.cpp |   2 +-
 .../cpp/binary/src/binary/binary_reader.cpp     |   2 +-
 .../src/impl/binary/binary_reader_impl.cpp      |  50 ++---
 .../binary/src/impl/binary/binary_schema.cpp    |  17 +-
 .../src/impl/binary/binary_writer_impl.cpp      |  14 +-
 .../src/binary_reader_writer_raw_test.cpp       |  34 ++--
 .../core-test/src/binary_reader_writer_test.cpp |  96 +++++-----
 .../cpp/core-test/src/cache_store_test.cpp      |   6 +-
 .../platforms/cpp/core-test/src/cache_test.cpp  |  62 +++----
 .../cpp/core-test/src/transactions_test.cpp     |  76 ++++----
 .../cpp/core/include/ignite/cache/cache.h       |  12 +-
 .../core/include/ignite/cache/cache_peek_mode.h |  67 +++----
 .../cpp/core/include/ignite/ignite_binding.h    |   4 +-
 .../cpp/core/include/ignite/impl/bindings.h     |   4 +-
 .../impl/cache/cache_entry_processor_holder.h   |  37 ++--
 .../include/ignite/impl/ignite_binding_impl.h   |  11 +-
 .../ignite/impl/interop/interop_target.h        |  21 ++-
 .../ignite/impl/transactions/transaction_impl.h |   4 +-
 .../impl/transactions/transactions_impl.h       |  10 +-
 .../include/ignite/transactions/transaction.h   |  12 +-
 .../ignite/transactions/transaction_consts.h    | 181 ++++++++++---------
 .../include/ignite/transactions/transactions.h  |  16 +-
 .../impl/binary/binary_type_updater_impl.cpp    |  17 +-
 .../continuous/continuous_query_handle_impl.cpp |  13 +-
 .../src/impl/cluster/cluster_group_impl.cpp     |   9 +-
 .../cpp/core/src/impl/ignite_environment.cpp    |  42 +++--
 .../core/src/impl/interop/interop_target.cpp    |  12 +-
 .../src/impl/transactions/transaction_impl.cpp  |  18 +-
 .../src/impl/transactions/transactions_impl.cpp |  92 +++++-----
 .../cpp/core/src/transactions/transaction.cpp   |   8 +-
 .../cpp/core/src/transactions/transactions.cpp  |  20 +-
 40 files changed, 613 insertions(+), 563 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
index 8f3245a..f076e6a 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
@@ -23,8 +23,6 @@
 #ifndef _IGNITE_BINARY_BINARY_CONSTS
 #define _IGNITE_BINARY_BINARY_CONSTS
 
-#include <ignite/common/common.h>
-
 namespace ignite 
 {
     namespace binary 
@@ -32,53 +30,59 @@ namespace ignite
         /**
          * Binary collection types.
          */
-        enum CollectionType 
+        struct CollectionType 
         {
-            /** 
-             * Undefined. Maps to ArrayList in Java.
-             */
-            IGNITE_COLLECTION_UNDEFINED = 0,
+            enum Type
+            {
+                /**
+                 * Undefined. Maps to ArrayList in Java.
+                 */
+                UNDEFINED = 0,
+
+                /** 
+                 * Array list. Maps to ArrayList in Java.
+                 */
+                ARRAY_LIST = 1,
+
+                /**
+                 * Linked list. Maps to LinkedList in Java.
+                 */
+                LINKED_LIST = 2,
 
-            /** 
-             * Array list. Maps to ArrayList in Java.
-             */
-            IGNITE_COLLECTION_ARRAY_LIST = 1,
-            
-            /**
-             * Linked list. Maps to LinkedList in Java.
-             */
-            IGNITE_COLLECTION_LINKED_LIST = 2,
-            
-            /**
-             * Hash set. Maps to HashSet in Java.
-             */
-            IGNITE_COLLECTION_HASH_SET = 3,
-            
-            /**
-             * Linked hash set. Maps to LinkedHashSet in Java.
-             */
-            IGNITE_COLLECTION_LINKED_HASH_SET = 4
+                /**
+                 * Hash set. Maps to HashSet in Java.
+                 */
+                HASH_SET = 3,
+
+                /**
+                 * Linked hash set. Maps to LinkedHashSet in Java.
+                 */
+                LINKED_HASH_SET = 4
+            };
         };
 
         /**
          * Binary map types.
          */
-        enum MapType 
+        struct MapType 
         {
-            /**
-             * Undefined. Maps to HashMap in Java.
-             */
-            IGNITE_MAP_UNDEFINED = 0,
-            
-            /**
-             * Hash map. Maps to HashMap in Java.
-             */
-            IGNITE_MAP_HASH_MAP = 1,
-            
-            /**
-             * Linked hash map. Maps to LinkedHashMap in Java.
-             */
-            IGNITE_MAP_LINKED_HASH_MAP = 2
+            enum Type
+            {
+                /**
+                 * Undefined. Maps to HashMap in Java.
+                 */
+                UNDEFINED = 0,
+
+                /**
+                 * Hash map. Maps to HashMap in Java.
+                 */
+                HASH_MAP = 1,
+
+                /**
+                 * Linked hash map. Maps to LinkedHashMap in Java.
+                 */
+                LINKED_HASH_MAP = 2
+            };
         };
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
index fb77b44..72e98a5 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
@@ -478,7 +478,7 @@ namespace ignite
              * @param size Collection size.
              */
             BinaryCollectionReader(impl::binary::BinaryReaderImpl* impl, int32_t id, 
-                const CollectionType type,  int32_t size) : impl(impl), id(id), type(type), size(size)
+                const CollectionType::Type type,  int32_t size) : impl(impl), id(id), type(type), size(size)
             {
                 // No-op.
             }
@@ -511,7 +511,7 @@ namespace ignite
              * @return Collection type. See CollectionType for the list of
              *     available values and their description.
              */
-            CollectionType GetType()
+            CollectionType::Type GetType()
             {
                 return type;
             }
@@ -543,7 +543,7 @@ namespace ignite
             const int32_t id;     
             
             /** Collection type. */
-            const CollectionType type;  
+            const CollectionType::Type type;  
 
             /** Size. */
             const int32_t size;                              
@@ -570,7 +570,7 @@ namespace ignite
              * @param type Map type.
              * @param size Map size.
             */
-            BinaryMapReader(impl::binary::BinaryReaderImpl* impl, int32_t id, MapType type,
+            BinaryMapReader(impl::binary::BinaryReaderImpl* impl, int32_t id, MapType::Type type,
                 int32_t size) : impl(impl), id(id), type(type), size(size)
             {
                 // No-op.
@@ -607,7 +607,7 @@ namespace ignite
              * @return Map type. See MapType for the list of available values
              *     and their description.
              */
-            MapType GetType()
+            MapType::Type GetType()
             {
                 return type;
             }
@@ -639,7 +639,7 @@ namespace ignite
             const int32_t id;     
 
             /** Map type. */
-            const MapType type;
+            const MapType::Type type;
 
             /** Size. */
             const int32_t size;

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
index d110078..c06cb91 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
@@ -357,7 +357,7 @@ namespace ignite
             template<typename T>
             BinaryCollectionReader<T> ReadCollection()
             {
-                CollectionType typ;
+                CollectionType::Type typ;
                 int32_t size;
 
                 int32_t id = impl->ReadCollection(&typ, &size);
@@ -385,7 +385,7 @@ namespace ignite
             template<typename K, typename V>
             BinaryMapReader<K, V> ReadMap()
             {
-                MapType typ;
+                MapType::Type typ;
                 int32_t size;
 
                 int32_t id = impl->ReadMap(&typ, &size);
@@ -398,7 +398,7 @@ namespace ignite
              *
              * @return Collection type.
              */
-            CollectionType ReadCollectionType();
+            CollectionType::Type ReadCollectionType();
 
             /**
              * Read type of the collection.

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
index a43c957..81e34b0 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
@@ -302,17 +302,17 @@ namespace ignite
             template<typename T>
             BinaryCollectionWriter<T> WriteCollection()
             {
-                return WriteCollection<T>(IGNITE_COLLECTION_UNDEFINED);
+                return WriteCollection<T>(CollectionType::UNDEFINED);
             }
 
             /**
              * Start collection write.
              *
-             * @param type Collection type.
+             * @param typ Collection type.
              * @return Collection writer.
              */
             template<typename T>
-            BinaryCollectionWriter<T> WriteCollection(CollectionType typ)
+            BinaryCollectionWriter<T> WriteCollection(CollectionType::Type typ)
             {
                 int32_t id = impl->WriteCollection(typ);
 
@@ -324,12 +324,11 @@ namespace ignite
              *
              * @param first Iterator pointing to the beginning of the interval.
              * @param last Iterator pointing to the end of the interval.
-             * @param typ Collection type.
              */
             template<typename InputIterator>
             void WriteCollection(InputIterator first, InputIterator last)
             {
-                impl->WriteCollection(first, last, IGNITE_COLLECTION_UNDEFINED);
+                impl->WriteCollection(first, last, CollectionType::UNDEFINED);
             }
 
             /**
@@ -340,7 +339,7 @@ namespace ignite
              * @param typ Collection type.
              */
             template<typename InputIterator>
-            void WriteCollection(InputIterator first, InputIterator last, CollectionType typ)
+            void WriteCollection(InputIterator first, InputIterator last, CollectionType::Type typ)
             {
                 impl->WriteCollection(first, last, typ);
             }
@@ -348,13 +347,12 @@ namespace ignite
             /**
              * Start map write.
              *
-             * @param typ Map type.
              * @return Map writer.
              */
             template<typename K, typename V>
             BinaryMapWriter<K, V> WriteMap()
             {
-                return WriteMap<K, V>(IGNITE_MAP_UNDEFINED);
+                return WriteMap<K, V>(MapType::UNDEFINED);
             }
 
             /**
@@ -364,7 +362,7 @@ namespace ignite
              * @return Map writer.
              */
             template<typename K, typename V>
-            BinaryMapWriter<K, V> WriteMap(MapType typ)
+            BinaryMapWriter<K, V> WriteMap(MapType::Type typ)
             {
                 int32_t id = impl->WriteMap(typ);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
index e07ec14..7103fec 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
@@ -385,7 +385,7 @@ namespace ignite
             template<typename T>
             BinaryCollectionReader<T> ReadCollection(const char* fieldName)
             {
-                CollectionType typ;
+                CollectionType::Type typ;
                 int32_t size;
 
                 int32_t id = impl->ReadCollection(fieldName, &typ, &size);
@@ -415,7 +415,7 @@ namespace ignite
             template<typename K, typename V>
             BinaryMapReader<K, V> ReadMap(const char* fieldName)
             {
-                MapType typ;
+                MapType::Type typ;
                 int32_t size;
 
                 int32_t id = impl->ReadMap(fieldName, &typ, &size);
@@ -429,7 +429,7 @@ namespace ignite
              * @param fieldName Field name.
              * @return Collection type.
              */
-            CollectionType ReadCollectionType(const char* fieldName);
+            CollectionType::Type ReadCollectionType(const char* fieldName);
 
             /**
              * Read type of the collection.

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
index f8e7de3..1489494 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
@@ -330,7 +330,7 @@ namespace ignite
             template<typename T>
             BinaryCollectionWriter<T> WriteCollection(const char* fieldName)
             {
-                return WriteCollection<T>(fieldName, IGNITE_COLLECTION_UNDEFINED);
+                return WriteCollection<T>(fieldName, CollectionType::UNDEFINED);
             }
 
             /**
@@ -341,7 +341,7 @@ namespace ignite
              * @return Collection writer.
              */
             template<typename T>
-            BinaryCollectionWriter<T> WriteCollection(const char* fieldName, ignite::binary::CollectionType typ)
+            BinaryCollectionWriter<T> WriteCollection(const char* fieldName, CollectionType::Type typ)
             {
                 int32_t id = impl->WriteCollection(fieldName, typ);
 
@@ -358,7 +358,7 @@ namespace ignite
             template<typename InputIterator>
             void WriteCollection(const char* fieldName, InputIterator first, InputIterator last)
             {
-                WriteCollection(fieldName, first, last, IGNITE_COLLECTION_UNDEFINED);
+                WriteCollection(fieldName, first, last, CollectionType::UNDEFINED);
             }
 
             /**
@@ -370,7 +370,7 @@ namespace ignite
              * @param typ Collection type.
              */
             template<typename InputIterator>
-            void WriteCollection(const char* fieldName, InputIterator first, InputIterator last, CollectionType typ)
+            void WriteCollection(const char* fieldName, InputIterator first, InputIterator last, CollectionType::Type typ)
             {
                 impl->WriteCollection(fieldName, first, last, typ);
             }
@@ -379,13 +379,12 @@ namespace ignite
              * Start map write.
              *
              * @param fieldName Field name.
-             * @param typ Map type.
              * @return Map writer.
              */
             template<typename K, typename V>
             BinaryMapWriter<K, V> WriteMap(const char* fieldName)
             {
-                return WriteMap<K, V>(fieldName, IGNITE_MAP_UNDEFINED);
+                return WriteMap<K, V>(fieldName, MapType::UNDEFINED);
             }
 
             /**
@@ -396,7 +395,7 @@ namespace ignite
              * @return Map writer.
              */
             template<typename K, typename V>
-            BinaryMapWriter<K, V> WriteMap(const char* fieldName, ignite::binary::MapType typ)
+            BinaryMapWriter<K, V> WriteMap(const char* fieldName, MapType::Type typ)
             {
                 int32_t id = impl->WriteMap(fieldName, typ);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
index 6d66416..5621c0d 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
@@ -55,7 +55,7 @@ namespace ignite
                  * @param pos Object position in the stream.
                  * @param usrType user type flag.
                  * @param typeId Type ID.
-                 * @param hashcode Hash code.
+                 * @param hashCode Hash code.
                  * @param len Length in bytes.
                  * @param rawOff Raw data offset.
                  * @param footerBegin Footer beginning absolute position in stream.
@@ -63,7 +63,7 @@ namespace ignite
                  */
                 BinaryReaderImpl(interop::InteropInputStream* stream, BinaryIdResolver* idRslvr,
                     int32_t pos, bool usrType, int32_t typeId, int32_t hashCode, int32_t len, int32_t rawOff,
-                    int32_t footerBegin, int32_t footerEnd, BinaryOffsetType schemaType);
+                    int32_t footerBegin, int32_t footerEnd, BinaryOffsetType::Type schemaType);
 
                 /**
                  * Constructor used to construct light-weight reader allowing only raw operations 
@@ -632,7 +632,7 @@ namespace ignite
                  * @param size Collection size.
                  * @return Read session ID.
                  */
-                int32_t ReadCollection(ignite::binary::CollectionType* typ, int32_t* size);
+                int32_t ReadCollection(ignite::binary::CollectionType::Type* typ, int32_t* size);
 
                 /**
                  * Start collection read.
@@ -642,7 +642,8 @@ namespace ignite
                  * @param size Collection size.
                  * @return Read session ID.
                  */
-                int32_t ReadCollection(const char* fieldName, ignite::binary::CollectionType* typ, int32_t* size);
+                int32_t ReadCollection(const char* fieldName,
+                    ignite::binary::CollectionType::Type* typ, int32_t* size);
 
                 /**
                  * Read values and insert them to specified position.
@@ -713,7 +714,7 @@ namespace ignite
                  * @param size Map size.
                  * @return Read session ID.
                  */
-                int32_t ReadMap(ignite::binary::MapType* typ, int32_t* size);
+                int32_t ReadMap(ignite::binary::MapType::Type* typ, int32_t* size);
 
                 /**
                  * Start map read.
@@ -723,14 +724,14 @@ namespace ignite
                  * @param size Map size.
                  * @return Read session ID.
                  */
-                int32_t ReadMap(const char* fieldName, ignite::binary::MapType* typ, int32_t* size);
+                int32_t ReadMap(const char* fieldName, ignite::binary::MapType::Type* typ, int32_t* size);
 
                 /**
                  * Read type of the collection.
                  *
                  * @return Collection type.
                  */
-                ignite::binary::CollectionType ReadCollectionType();
+                ignite::binary::CollectionType::Type ReadCollectionType();
 
                 /**
                  * Read type of the collection.
@@ -738,7 +739,7 @@ namespace ignite
                  * @param fieldName Field name.
                  * @return Collection type.
                  */
-                ignite::binary::CollectionType ReadCollectionType(const char* fieldName);
+                ignite::binary::CollectionType::Type ReadCollectionType(const char* fieldName);
 
                 /**
                  * Read size of the collection.
@@ -950,14 +951,14 @@ namespace ignite
                             else
                                 footerBegin = pos + len;
 
-                            BinaryOffsetType schemaType;
+                            BinaryOffsetType::Type schemaType;
 
                             if (flags & IGNITE_BINARY_FLAG_OFFSET_ONE_BYTE)
-                                schemaType = OFFSET_TYPE_ONE_BYTE;
+                                schemaType = BinaryOffsetType::ONE_BYTE;
                             else if (flags & IGNITE_BINARY_FLAG_OFFSET_TWO_BYTES)
-                                schemaType = OFFSET_TYPE_TWO_BYTES;
+                                schemaType = BinaryOffsetType::TWO_BYTES;
                             else
-                                schemaType = OFFSET_TYPE_FOUR_BYTES;
+                                schemaType = BinaryOffsetType::FOUR_BYTES;
 
                             int32_t footerEnd;
 
@@ -1066,7 +1067,7 @@ namespace ignite
                 int32_t footerEnd;
 
                 /** Object schema type. */
-                BinaryOffsetType schemaType;
+                BinaryOffsetType::Type schemaType;
 
                 IGNITE_NO_COPY_ASSIGNMENT(BinaryReaderImpl)
                     
@@ -1351,7 +1352,7 @@ namespace ignite
                 /**
                  * Check whether session ID matches.
                  *
-                 * @param ses Expected session ID.
+                 * @param expSes Expected session ID.
                  */
                 void CheckSession(int32_t expSes) const;
 
@@ -1386,7 +1387,7 @@ namespace ignite
                  *
                  * @return Collection type.
                  */
-                ignite::binary::CollectionType ReadCollectionTypeUnprotected();
+                ignite::binary::CollectionType::Type ReadCollectionTypeUnprotected();
 
                 /**
                  * Read size of the collection. Do not preserve stream position.

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_schema.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_schema.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_schema.h
index c42adef..50429c9 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_schema.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_schema.h
@@ -38,16 +38,19 @@ namespace ignite
             /**
              * Schema size variants.
              */
-            enum BinaryOffsetType
+            struct BinaryOffsetType
             {
-                /** Means all field offsets can be fit in one byte. */
-                OFFSET_TYPE_ONE_BYTE,
+                enum Type
+                {
+                    /** Means all field offsets can be fit in one byte. */
+                    ONE_BYTE,
 
-                /** Means all field offsets can be fit in two bytes. */
-                OFFSET_TYPE_TWO_BYTES,
+                    /** Means all field offsets can be fit in two bytes. */
+                    TWO_BYTES,
 
-                /** Means field offsets should be stored in four bytes. */
-                OFFSET_TYPE_FOUR_BYTES
+                    /** Means field offsets should be stored in four bytes. */
+                    FOUR_BYTES
+                };
             };
 
             /**
@@ -108,7 +111,7 @@ namespace ignite
                  *
                  * @return Type of schema.
                  */
-                BinaryOffsetType GetType() const;
+                BinaryOffsetType::Type GetType() const;
 
             private:
                 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
index e7dafb2..5d38e93 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
@@ -531,7 +531,7 @@ namespace ignite
                  * @param typ Collection type.
                  * @return Session ID.
                  */
-                int32_t WriteCollection(ignite::binary::CollectionType typ);
+                int32_t WriteCollection(ignite::binary::CollectionType::Type typ);
 
                 /**
                  * Start collection write.
@@ -540,7 +540,7 @@ namespace ignite
                  * @param typ Collection type.
                  * @return Session ID.
                  */
-                int32_t WriteCollection(const char* fieldName, ignite::binary::CollectionType typ);
+                int32_t WriteCollection(const char* fieldName, ignite::binary::CollectionType::Type typ);
 
                 /**
                  * Write values in interval [first, last).
@@ -550,7 +550,7 @@ namespace ignite
                  * @param typ Collection type.
                  */
                 template<typename InputIterator>
-                void WriteCollection(InputIterator first, InputIterator last, ignite::binary::CollectionType typ)
+                void WriteCollection(InputIterator first, InputIterator last, ignite::binary::CollectionType::Type typ)
                 {
                     StartContainerSession(true);
 
@@ -567,7 +567,7 @@ namespace ignite
                  */
                 template<typename InputIterator>
                 void WriteCollection(const char* fieldName, InputIterator first, InputIterator last,
-                    ignite::binary::CollectionType typ)
+                    ignite::binary::CollectionType::Type typ)
                 {
                     StartContainerSession(false);
 
@@ -582,7 +582,7 @@ namespace ignite
                  * @param typ Map type.
                  * @return Session ID.
                  */
-                int32_t WriteMap(ignite::binary::MapType typ);
+                int32_t WriteMap(ignite::binary::MapType::Type typ);
 
                 /**
                  * Start map write.
@@ -591,7 +591,7 @@ namespace ignite
                  * @param typ Map type.
                  * @return Session ID.
                  */
-                int32_t WriteMap(const char* fieldName, ignite::binary::MapType typ);
+                int32_t WriteMap(const char* fieldName, ignite::binary::MapType::Type typ);
 
                 /**
                  * Write collection element.
@@ -755,10 +755,10 @@ namespace ignite
                  *
                  * @return Stream.
                  */
-                impl::interop::InteropOutputStream* GetStream();
+                interop::InteropOutputStream* GetStream();
             private:
                 /** Underlying stream. */
-                ignite::impl::interop::InteropOutputStream* stream; 
+                interop::InteropOutputStream* stream; 
                 
                 /** ID resolver. */
                 BinaryIdResolver* idRslvr;
@@ -916,7 +916,7 @@ namespace ignite
                  */
                 template<typename InputIterator>
                 void WriteCollectionWithinSession(InputIterator first, InputIterator last,
-                    ignite::binary::CollectionType typ)
+                    ignite::binary::CollectionType::Type typ)
                 {
                     stream->WriteInt8(IGNITE_TYPE_COLLECTION);
                     stream->Position(stream->Position() + 4);

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/src/binary/binary_raw_reader.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/binary/binary_raw_reader.cpp b/modules/platforms/cpp/binary/src/binary/binary_raw_reader.cpp
index 9c1d6d9..f751685 100644
--- a/modules/platforms/cpp/binary/src/binary/binary_raw_reader.cpp
+++ b/modules/platforms/cpp/binary/src/binary/binary_raw_reader.cpp
@@ -163,7 +163,7 @@ namespace ignite
             return BinaryStringArrayReader(impl, id, size);
         }
 
-        CollectionType BinaryRawReader::ReadCollectionType()
+        CollectionType::Type BinaryRawReader::ReadCollectionType()
         {
             return impl->ReadCollectionType();
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/src/binary/binary_reader.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/binary/binary_reader.cpp b/modules/platforms/cpp/binary/src/binary/binary_reader.cpp
index f9fa72e..0ba82e6 100644
--- a/modules/platforms/cpp/binary/src/binary/binary_reader.cpp
+++ b/modules/platforms/cpp/binary/src/binary/binary_reader.cpp
@@ -163,7 +163,7 @@ namespace ignite
             return BinaryStringArrayReader(impl, id, size);
         }
 
-        CollectionType BinaryReader::ReadCollectionType(const char* fieldName)
+        CollectionType::Type BinaryReader::ReadCollectionType(const char* fieldName)
         {
             return impl->ReadCollectionType(fieldName);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
index 1c4104b..c6bb4f3 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
@@ -37,7 +37,7 @@ namespace ignite
         {
             BinaryReaderImpl::BinaryReaderImpl(InteropInputStream* stream, BinaryIdResolver* idRslvr,
                 int32_t pos, bool usrType, int32_t typeId, int32_t hashCode, int32_t len, int32_t rawOff,
-                int32_t footerBegin, int32_t footerEnd, BinaryOffsetType schemaType) :
+                int32_t footerBegin, int32_t footerEnd, BinaryOffsetType::Type schemaType) :
                 stream(stream), idRslvr(idRslvr), pos(pos), usrType(usrType), typeId(typeId), 
                 hashCode(hashCode), len(len), rawOff(rawOff), rawMode(false), elemIdGen(0), elemId(0),
                 elemCnt(-1), elemRead(0), footerBegin(footerBegin), footerEnd(footerEnd), schemaType(schemaType)
@@ -48,7 +48,7 @@ namespace ignite
             BinaryReaderImpl::BinaryReaderImpl(InteropInputStream* stream) :
                 stream(stream), idRslvr(NULL), pos(0), usrType(false), typeId(0), hashCode(0), len(0),
                 rawOff(0), rawMode(true), elemIdGen(0), elemId(0), elemCnt(-1), elemRead(0), footerBegin(-1),
-                footerEnd(-1), schemaType(OFFSET_TYPE_FOUR_BYTES)
+                footerEnd(-1), schemaType(BinaryOffsetType::FOUR_BYTES)
             {
                 // No-op.
             }
@@ -556,19 +556,19 @@ namespace ignite
                 return StartContainerSession(false, IGNITE_TYPE_ARRAY, size);
             }
 
-            int32_t BinaryReaderImpl::ReadCollection(CollectionType* typ, int32_t* size)
+            int32_t BinaryReaderImpl::ReadCollection(CollectionType::Type* typ, int32_t* size)
             {
                 int32_t id = StartContainerSession(true, IGNITE_TYPE_COLLECTION, size);
 
                 if (*size == -1)
-                    *typ = IGNITE_COLLECTION_UNDEFINED;
+                    *typ = CollectionType::UNDEFINED;
                 else
-                    *typ = static_cast<CollectionType>(stream->ReadInt8());
+                    *typ = static_cast<CollectionType::Type>(stream->ReadInt8());
 
                 return id;
             }
 
-            int32_t BinaryReaderImpl::ReadCollection(const char* fieldName, CollectionType* typ, int32_t* size)
+            int32_t BinaryReaderImpl::ReadCollection(const char* fieldName, CollectionType::Type* typ, int32_t* size)
             {
                 CheckRawMode(false);
                 CheckSingleMode(true);
@@ -578,7 +578,7 @@ namespace ignite
 
                 if (fieldPos <= 0)
                 {
-                    *typ = IGNITE_COLLECTION_UNDEFINED;
+                    *typ = CollectionType::UNDEFINED;
                     *size = -1;
 
                     return ++elemIdGen;
@@ -589,26 +589,26 @@ namespace ignite
                 int32_t id = StartContainerSession(false, IGNITE_TYPE_COLLECTION, size);
 
                 if (*size == -1)
-                    *typ = IGNITE_COLLECTION_UNDEFINED;
+                    *typ = CollectionType::UNDEFINED;
                 else
-                    *typ = static_cast<CollectionType>(stream->ReadInt8());
+                    *typ = static_cast<CollectionType::Type>(stream->ReadInt8());
 
                 return id;
             }
 
-            int32_t BinaryReaderImpl::ReadMap(MapType* typ, int32_t* size)
+            int32_t BinaryReaderImpl::ReadMap(MapType::Type* typ, int32_t* size)
             {
                 int32_t id = StartContainerSession(true, IGNITE_TYPE_MAP, size);
 
                 if (*size == -1)
-                    *typ = IGNITE_MAP_UNDEFINED;
+                    *typ = MapType::UNDEFINED;
                 else
-                    *typ = static_cast<MapType>(stream->ReadInt8());
+                    *typ = static_cast<MapType::Type>(stream->ReadInt8());
 
                 return id;
             }
 
-            int32_t BinaryReaderImpl::ReadMap(const char* fieldName, MapType* typ, int32_t* size)
+            int32_t BinaryReaderImpl::ReadMap(const char* fieldName, MapType::Type* typ, int32_t* size)
             {
                 CheckRawMode(false);
                 CheckSingleMode(true);
@@ -618,7 +618,7 @@ namespace ignite
 
                 if (fieldPos <= 0)
                 {
-                    *typ = IGNITE_MAP_UNDEFINED;
+                    *typ = MapType::UNDEFINED;
                     *size = -1;
 
                     return ++elemIdGen;
@@ -629,32 +629,32 @@ namespace ignite
                 int32_t id = StartContainerSession(false, IGNITE_TYPE_MAP, size);
 
                 if (*size == -1)
-                    *typ = IGNITE_MAP_UNDEFINED;
+                    *typ = MapType::UNDEFINED;
                 else
-                    *typ = static_cast<MapType>(stream->ReadInt8());
+                    *typ = static_cast<MapType::Type>(stream->ReadInt8());
 
                 return id;
             }
 
-            CollectionType BinaryReaderImpl::ReadCollectionTypeUnprotected()
+            CollectionType::Type BinaryReaderImpl::ReadCollectionTypeUnprotected()
             {
                 int32_t size = ReadCollectionSizeUnprotected();
                 if (size == -1)
-                    return IGNITE_COLLECTION_UNDEFINED;
+                    return CollectionType::UNDEFINED;
 
-                CollectionType typ = static_cast<CollectionType>(stream->ReadInt8());
+                CollectionType::Type typ = static_cast<CollectionType::Type>(stream->ReadInt8());
 
                 return typ;
             }
 
-            CollectionType BinaryReaderImpl::ReadCollectionType()
+            CollectionType::Type BinaryReaderImpl::ReadCollectionType()
             {
                 InteropStreamPositionGuard<InteropInputStream> positionGuard(*stream);
                 
                 return ReadCollectionTypeUnprotected();
             }
 
-            CollectionType BinaryReaderImpl::ReadCollectionType(const char* fieldName)
+            CollectionType::Type BinaryReaderImpl::ReadCollectionType(const char* fieldName)
             {
                 CheckRawMode(false);
                 CheckSingleMode(true);
@@ -665,7 +665,7 @@ namespace ignite
                 int32_t fieldPos = FindField(fieldId);
 
                 if (fieldPos <= 0)
-                    return IGNITE_COLLECTION_UNDEFINED;
+                    return CollectionType::UNDEFINED;
 
                 stream->Position(fieldPos);
 
@@ -892,7 +892,7 @@ namespace ignite
 
                 switch (schemaType)
                 {
-                    case OFFSET_TYPE_ONE_BYTE:
+                    case BinaryOffsetType::ONE_BYTE:
                     {
                         for (int32_t schemaPos = footerBegin; schemaPos < footerEnd; schemaPos += 5)
                         {
@@ -904,7 +904,7 @@ namespace ignite
                         break;
                     }
 
-                    case OFFSET_TYPE_TWO_BYTES:
+                    case BinaryOffsetType::TWO_BYTES:
                     {
                         for (int32_t schemaPos = footerBegin; schemaPos < footerEnd; schemaPos += 6)
                         {
@@ -916,7 +916,7 @@ namespace ignite
                         break;
                     }
 
-                    case OFFSET_TYPE_FOUR_BYTES:
+                    case BinaryOffsetType::FOUR_BYTES:
                     {
                         for (int32_t schemaPos = footerBegin; schemaPos < footerEnd; schemaPos += 8)
                         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/src/impl/binary/binary_schema.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_schema.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_schema.cpp
index 0b8025a..736b43c 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_schema.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_schema.cpp
@@ -70,7 +70,7 @@ namespace ignite
             {
                 switch (GetType())
                 {
-                    case OFFSET_TYPE_ONE_BYTE:
+                    case BinaryOffsetType::ONE_BYTE:
                     {
                         for (FieldContainer::const_iterator i = fieldsInfo->begin(); i != fieldsInfo->end(); ++i)
                         {
@@ -80,7 +80,7 @@ namespace ignite
                         break;
                     }
 
-                    case OFFSET_TYPE_TWO_BYTES:
+                    case BinaryOffsetType::TWO_BYTES:
                     {
                         for (FieldContainer::const_iterator i = fieldsInfo->begin(); i != fieldsInfo->end(); ++i)
                         {
@@ -90,7 +90,7 @@ namespace ignite
                         break;
                     }
 
-                    case OFFSET_TYPE_FOUR_BYTES:
+                    case BinaryOffsetType::FOUR_BYTES:
                     {
                         for (FieldContainer::const_iterator i = fieldsInfo->begin(); i != fieldsInfo->end(); ++i)
                         {
@@ -119,16 +119,17 @@ namespace ignite
                 fieldsInfo->clear();
             }
 
-            BinaryOffsetType BinarySchema::GetType() const
+            BinaryOffsetType::Type BinarySchema::GetType() const
             {
                 int32_t maxOffset = fieldsInfo->back().offset;
 
                 if (maxOffset < 0x100)
-                    return OFFSET_TYPE_ONE_BYTE;
-                else if (maxOffset < 0x10000)
-                    return OFFSET_TYPE_TWO_BYTES;
+                    return BinaryOffsetType::ONE_BYTE;
 
-                return OFFSET_TYPE_FOUR_BYTES;
+                if (maxOffset < 0x10000)
+                    return BinaryOffsetType::TWO_BYTES;
+
+                return BinaryOffsetType::FOUR_BYTES;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
index 15e1ab9..f93f0d3 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
@@ -560,7 +560,7 @@ namespace ignite
                 return elemId;
             }
 
-            int32_t BinaryWriterImpl::WriteCollection(CollectionType typ)
+            int32_t BinaryWriterImpl::WriteCollection(CollectionType::Type typ)
             {
                 StartContainerSession(true);
 
@@ -571,7 +571,7 @@ namespace ignite
                 return elemId;
             }
 
-            int32_t BinaryWriterImpl::WriteCollection(const char* fieldName, CollectionType typ)
+            int32_t BinaryWriterImpl::WriteCollection(const char* fieldName, CollectionType::Type typ)
             {
                 StartContainerSession(false);
                 
@@ -584,7 +584,7 @@ namespace ignite
                 return elemId;
             }
 
-            int32_t BinaryWriterImpl::WriteMap(ignite::binary::MapType typ)
+            int32_t BinaryWriterImpl::WriteMap(ignite::binary::MapType::Type typ)
             {
                 StartContainerSession(true);
 
@@ -595,7 +595,7 @@ namespace ignite
                 return elemId;
             }
 
-            int32_t BinaryWriterImpl::WriteMap(const char* fieldName, ignite::binary::MapType typ)
+            int32_t BinaryWriterImpl::WriteMap(const char* fieldName, ignite::binary::MapType::Type typ)
             {
                 StartContainerSession(false);
 
@@ -785,7 +785,7 @@ namespace ignite
                 else
                 {
                     int32_t schemaId = schema.GetId();
-                    BinaryOffsetType schemaType = schema.GetType();
+                    BinaryOffsetType::Type schemaType = schema.GetType();
 
                     WriteAndClearSchema();
 
@@ -796,9 +796,9 @@ namespace ignite
 
                     flags |= IGNITE_BINARY_FLAG_HAS_SCHEMA;
 
-                    if (schemaType == OFFSET_TYPE_ONE_BYTE)
+                    if (schemaType == BinaryOffsetType::ONE_BYTE)
                         flags |= IGNITE_BINARY_FLAG_OFFSET_ONE_BYTE;
-                    else if (schemaType == OFFSET_TYPE_TWO_BYTES)
+                    else if (schemaType == BinaryOffsetType::TWO_BYTES)
                         flags |= IGNITE_BINARY_FLAG_OFFSET_TWO_BYTES;
 
                     stream->WriteInt16(start + IGNITE_OFFSET_FLAGS, flags);

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp b/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
index 14d64b0..53e584f 100644
--- a/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
@@ -221,7 +221,7 @@ void CheckRawReadsRestricted(BinaryRawReader& reader)
     BOOST_CHECK_EXCEPTION((reader.ReadMap<int8_t, int8_t>()), IgniteError, IsBinaryError);
 }
 
-void CheckRawCollectionEmpty(CollectionType* colType)
+void CheckRawCollectionEmpty(CollectionType::Type* colType)
 {
     InteropUnpooledMemory mem(1024);
 
@@ -253,7 +253,7 @@ void CheckRawCollectionEmpty(CollectionType* colType)
     if (colType)
         BOOST_REQUIRE(colReader.GetType() == *colType);
     else
-        BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+        BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
 
     BOOST_REQUIRE(colReader.GetSize() == 0);
     BOOST_REQUIRE(!colReader.HasNext());
@@ -264,7 +264,7 @@ void CheckRawCollectionEmpty(CollectionType* colType)
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
 
-void CheckRawCollection(CollectionType* colType)
+void CheckRawCollection(CollectionType::Type* colType)
 {
     BinaryInner writeVal1 = BinaryInner(1);
     BinaryInner writeVal2 = BinaryInner(0);
@@ -306,7 +306,7 @@ void CheckRawCollection(CollectionType* colType)
     if (colType)
         BOOST_REQUIRE(colReader.GetType() == *colType);
     else
-        BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+        BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
 
     BOOST_REQUIRE(colReader.GetSize() == 3);
     BOOST_REQUIRE(!colReader.IsNull());
@@ -327,7 +327,7 @@ void CheckRawCollection(CollectionType* colType)
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
 
-void CheckRawCollectionIterators(CollectionType* colType)
+void CheckRawCollectionIterators(CollectionType::Type* colType)
 {
     typedef std::vector<BinaryInner> BinaryInnerVector;
     
@@ -361,7 +361,7 @@ void CheckRawCollectionIterators(CollectionType* colType)
     if (colType)
         BOOST_REQUIRE(rawReader.ReadCollectionType() == *colType);
     else
-        BOOST_REQUIRE(rawReader.ReadCollectionType() == IGNITE_COLLECTION_UNDEFINED);
+        BOOST_REQUIRE(rawReader.ReadCollectionType() == CollectionType::UNDEFINED);
 
     BinaryInnerVector readValues(collectionSize);
     
@@ -376,7 +376,7 @@ void CheckRawCollectionIterators(CollectionType* colType)
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
 
-void CheckRawMapEmpty(MapType* mapType)
+void CheckRawMapEmpty(MapType::Type* mapType)
 {
     InteropUnpooledMemory mem(1024);
 
@@ -408,7 +408,7 @@ void CheckRawMapEmpty(MapType* mapType)
     if (mapType)
         BOOST_REQUIRE(mapReader.GetType() == *mapType);
     else
-        BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+        BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
 
     BOOST_REQUIRE(mapReader.GetSize() == 0);
     BOOST_REQUIRE(!mapReader.HasNext());
@@ -421,7 +421,7 @@ void CheckRawMapEmpty(MapType* mapType)
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
 
-void CheckRawMap(MapType* mapType)
+void CheckRawMap(MapType::Type* mapType)
 {
     BinaryInner writeVal1 = BinaryInner(1);
     BinaryInner writeVal2 = BinaryInner(0);
@@ -463,7 +463,7 @@ void CheckRawMap(MapType* mapType)
     if (mapType)
         BOOST_REQUIRE(mapReader.GetType() == *mapType);
     else
-        BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+        BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
 
     BOOST_REQUIRE(mapReader.GetSize() == 3);
     BOOST_REQUIRE(!mapReader.IsNull());
@@ -1157,7 +1157,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
 
     BinaryCollectionReader<BinaryInner> colReader = rawReader.ReadCollection<BinaryInner>();
 
-    BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+    BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
     BOOST_REQUIRE(colReader.GetSize() == -1);
     BOOST_REQUIRE(!colReader.HasNext());
     BOOST_REQUIRE(colReader.IsNull()); 
@@ -1174,7 +1174,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionEmpty)
 
 BOOST_AUTO_TEST_CASE(TestCollectionEmptyTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckRawCollectionEmpty(&typ);
 }
@@ -1186,7 +1186,7 @@ BOOST_AUTO_TEST_CASE(TestCollection)
 
 BOOST_AUTO_TEST_CASE(TestCollectionTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckRawCollection(&typ);
 }
@@ -1198,7 +1198,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionIterators)
 
 BOOST_AUTO_TEST_CASE(TestCollectionIteratorsTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckRawCollectionIterators(&typ);
 }
@@ -1222,7 +1222,7 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
 
     BinaryMapReader<int8_t, BinaryInner> mapReader = rawReader.ReadMap<int8_t, BinaryInner>();
 
-    BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+    BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
     BOOST_REQUIRE(mapReader.GetSize() == -1);
     BOOST_REQUIRE(!mapReader.HasNext());
     BOOST_REQUIRE(mapReader.IsNull());
@@ -1241,7 +1241,7 @@ BOOST_AUTO_TEST_CASE(TestMapEmpty)
 
 BOOST_AUTO_TEST_CASE(TestMapEmptyTyped)
 {
-    MapType typ = IGNITE_MAP_LINKED_HASH_MAP;
+    MapType::Type typ = MapType::LINKED_HASH_MAP;
 
     CheckRawMapEmpty(&typ);
 }
@@ -1253,7 +1253,7 @@ BOOST_AUTO_TEST_CASE(TestMap)
 
 BOOST_AUTO_TEST_CASE(TestMapTyped)
 {
-    MapType typ = IGNITE_MAP_LINKED_HASH_MAP;
+    MapType::Type typ = MapType::LINKED_HASH_MAP;
 
     CheckRawMap(&typ);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp b/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
index 7802d15..f494cb0 100644
--- a/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
@@ -61,7 +61,7 @@ void CheckPrimitive(T val)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     BOOST_CHECK_EXCEPTION(Read<T>(reader, NULL), IgniteError, IsBinaryError);
@@ -116,7 +116,7 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
         int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
         int32_t footerEnd = footerBegin + 5;
 
-        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
         BinaryReader reader(&readerImpl);
 
         in.Position(IGNITE_DFLT_HDR_LEN);
@@ -149,7 +149,7 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
         int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
         int32_t footerEnd = footerBegin + 5;
 
-        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
         BinaryReader reader(&readerImpl);
 
         in.Position(IGNITE_DFLT_HDR_LEN);
@@ -186,7 +186,7 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
         int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
         int32_t footerEnd = footerBegin + 5;
 
-        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
         BinaryReader reader(&readerImpl);
 
         in.Position(IGNITE_DFLT_HDR_LEN);
@@ -226,7 +226,7 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
         int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
         int32_t footerEnd = footerBegin + 5;
 
-        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+        BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
         BinaryReader reader(&readerImpl);
 
         in.Position(IGNITE_DFLT_HDR_LEN);
@@ -301,7 +301,7 @@ void CheckReadsRestricted(BinaryReader& reader)
     BOOST_CHECK_EXCEPTION((reader.ReadMap<int8_t, int8_t>("field")), IgniteError, IsBinaryError);
 }
 
-void CheckCollectionEmpty(CollectionType* colType)
+void CheckCollectionEmpty(CollectionType::Type* colType)
 {
     TemplatedBinaryIdResolver<BinaryDummy> idRslvr;
 
@@ -335,7 +335,7 @@ void CheckCollectionEmpty(CollectionType* colType)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -345,7 +345,7 @@ void CheckCollectionEmpty(CollectionType* colType)
     if (colType)
         BOOST_REQUIRE(colReader.GetType() == *colType);
     else
-        BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+        BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
 
     BOOST_REQUIRE(colReader.GetSize() == 0);
     BOOST_REQUIRE(!colReader.HasNext());
@@ -356,7 +356,7 @@ void CheckCollectionEmpty(CollectionType* colType)
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
 
-void CheckCollection(CollectionType* colType)
+void CheckCollection(CollectionType::Type* colType)
 {
     BinaryInner writeVal1 = BinaryInner(1);
     BinaryInner writeVal2 = BinaryInner(0);
@@ -398,7 +398,7 @@ void CheckCollection(CollectionType* colType)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -410,7 +410,7 @@ void CheckCollection(CollectionType* colType)
     if (colType)
         BOOST_REQUIRE(colReader.GetType() == *colType);
     else
-        BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+        BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
 
     BOOST_REQUIRE(colReader.GetSize() == 3);
     BOOST_REQUIRE(!colReader.IsNull());
@@ -431,7 +431,7 @@ void CheckCollection(CollectionType* colType)
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
 
-void CheckCollectionIterators(CollectionType* colType)
+void CheckCollectionIterators(CollectionType::Type* colType)
 {
     typedef std::vector<BinaryInner> BinaryInnerVector;
     BinaryInnerVector writeValues;
@@ -466,14 +466,14 @@ void CheckCollectionIterators(CollectionType* colType)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
 
     BOOST_REQUIRE(reader.ReadCollectionSize("field1") == writeValues.size());
 
-    CollectionType expectedCollectionType = colType ? *colType : IGNITE_COLLECTION_UNDEFINED;
+    CollectionType::Type expectedCollectionType = colType ? *colType : CollectionType::UNDEFINED;
     BOOST_REQUIRE(reader.ReadCollectionType("field1") == expectedCollectionType);
 
     BinaryInnerVector readValues;
@@ -490,7 +490,7 @@ void CheckCollectionIterators(CollectionType* colType)
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
 
-void CheckMapEmpty(MapType* mapType)
+void CheckMapEmpty(MapType::Type* mapType)
 {
     TemplatedBinaryIdResolver<BinaryDummy> idRslvr;
 
@@ -524,7 +524,7 @@ void CheckMapEmpty(MapType* mapType)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -534,7 +534,7 @@ void CheckMapEmpty(MapType* mapType)
     if (mapType)
         BOOST_REQUIRE(mapReader.GetType() == *mapType);
     else
-        BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+        BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
 
     BOOST_REQUIRE(mapReader.GetSize() == 0);
     BOOST_REQUIRE(!mapReader.HasNext());
@@ -547,7 +547,7 @@ void CheckMapEmpty(MapType* mapType)
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
 
-void CheckMap(MapType* mapType)
+void CheckMap(MapType::Type* mapType)
 {
     BinaryInner writeVal1 = BinaryInner(1);
     BinaryInner writeVal2 = BinaryInner(0);
@@ -589,7 +589,7 @@ void CheckMap(MapType* mapType)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -601,7 +601,7 @@ void CheckMap(MapType* mapType)
     if (mapType)
         BOOST_REQUIRE(mapReader.GetType() == *mapType);
     else
-        BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+        BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
 
     BOOST_REQUIRE(mapReader.GetSize() == 3);
     BOOST_REQUIRE(!mapReader.IsNull());
@@ -801,7 +801,7 @@ BOOST_AUTO_TEST_CASE(TestGuidNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
     
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -839,7 +839,7 @@ BOOST_AUTO_TEST_CASE(TestDateNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
     
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -877,7 +877,7 @@ BOOST_AUTO_TEST_CASE(TestTimeNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -915,7 +915,7 @@ BOOST_AUTO_TEST_CASE(TestTimestampNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -964,7 +964,7 @@ BOOST_AUTO_TEST_CASE(TestString) {
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 5;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1023,7 +1023,7 @@ BOOST_AUTO_TEST_CASE(TestStringArrayNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1079,7 +1079,7 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1146,7 +1146,7 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1241,7 +1241,7 @@ BOOST_AUTO_TEST_CASE(TestObject)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 3;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN); 
@@ -1285,7 +1285,7 @@ BOOST_AUTO_TEST_CASE(TestNestedObject)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 3;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1327,7 +1327,7 @@ BOOST_AUTO_TEST_CASE(TestArrayNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1376,7 +1376,7 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1433,7 +1433,7 @@ BOOST_AUTO_TEST_CASE(TestArray)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1485,14 +1485,14 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
 
     BinaryCollectionReader<BinaryInner> colReader = reader.ReadCollection<BinaryInner>("field1");
 
-    BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
+    BOOST_REQUIRE(colReader.GetType() == CollectionType::UNDEFINED);
     BOOST_REQUIRE(colReader.GetSize() == -1);
     BOOST_REQUIRE(!colReader.HasNext());
     BOOST_REQUIRE(colReader.IsNull());
@@ -1509,7 +1509,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionEmpty)
 
 BOOST_AUTO_TEST_CASE(TestCollectionEmptyTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckCollectionEmpty(&typ);
 }
@@ -1521,7 +1521,7 @@ BOOST_AUTO_TEST_CASE(TestCollection)
 
 BOOST_AUTO_TEST_CASE(testCollectionTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckCollection(&typ);
 }
@@ -1533,7 +1533,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionIterators)
 
 BOOST_AUTO_TEST_CASE(TestCollectionIteratorsTyped)
 {
-    CollectionType typ = IGNITE_COLLECTION_LINKED_HASH_SET;
+    CollectionType::Type typ = CollectionType::LINKED_HASH_SET;
 
     CheckCollectionIterators(&typ);
 }
@@ -1562,14 +1562,14 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 5 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
 
     BinaryMapReader<int8_t, BinaryInner> mapReader = reader.ReadMap<int8_t, BinaryInner>("field1");
 
-    BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
+    BOOST_REQUIRE(mapReader.GetType() == MapType::UNDEFINED);
     BOOST_REQUIRE(mapReader.GetSize() == -1);
     BOOST_REQUIRE(!mapReader.HasNext());
     BOOST_REQUIRE(mapReader.IsNull());
@@ -1588,7 +1588,7 @@ BOOST_AUTO_TEST_CASE(TestMapEmpty)
 
 BOOST_AUTO_TEST_CASE(TestMapEmptyTyped)
 {
-    MapType typ = IGNITE_MAP_LINKED_HASH_MAP;
+    MapType::Type typ = MapType::LINKED_HASH_MAP;
 
     CheckMapEmpty(&typ);
 }
@@ -1600,7 +1600,7 @@ BOOST_AUTO_TEST_CASE(TestMap)
 
 BOOST_AUTO_TEST_CASE(TestMapTyped)
 {
-    MapType typ = IGNITE_MAP_LINKED_HASH_MAP;
+    MapType::Type typ = MapType::LINKED_HASH_MAP;
 
     CheckMap(&typ);
 }
@@ -1634,7 +1634,7 @@ BOOST_AUTO_TEST_CASE(TestRawMode)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 1000, footerBegin, footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 1000, footerBegin, footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
     BinaryReader reader(&readerImpl);
     
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1702,7 +1702,7 @@ BOOST_AUTO_TEST_CASE(TestFieldSeek)
 
     BinaryReaderImpl readerImpl(&in, &idRslvr, pos, usrType, 
                                   typeId, hashCode, len, rawOff, 
-                                  footerBegin, footerEnd, OFFSET_TYPE_ONE_BYTE);
+                                  footerBegin, footerEnd, BinaryOffsetType::ONE_BYTE);
 
     BinaryReader reader(&readerImpl);
 
@@ -1824,7 +1824,7 @@ BOOST_AUTO_TEST_CASE(TestSchemaOffset2ByteFields)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 6 * fieldsNum;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_TWO_BYTES);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::TWO_BYTES);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1869,7 +1869,7 @@ BOOST_AUTO_TEST_CASE(TestSchemaOffset4ByteFields)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 8 * fieldsNum;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_FOUR_BYTES);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::FOUR_BYTES);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1909,7 +1909,7 @@ BOOST_AUTO_TEST_CASE(TestSchemaOffset2ByteArray)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 6 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_TWO_BYTES);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::TWO_BYTES);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);
@@ -1943,7 +1943,7 @@ BOOST_AUTO_TEST_CASE(TestSchemaOffset4ByteArray)
     int32_t footerBegin = in.ReadInt32(IGNITE_OFFSET_SCHEMA_OR_RAW_OFF);
     int32_t footerEnd = footerBegin + 8 * 2;
 
-    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, OFFSET_TYPE_FOUR_BYTES);
+    BinaryReaderImpl readerImpl(&in, &idRslvr, 0, true, idRslvr.GetTypeId(), 0, 100, 100, footerBegin, footerEnd, BinaryOffsetType::FOUR_BYTES);
     BinaryReader reader(&readerImpl);
 
     in.Position(IGNITE_DFLT_HDR_LEN);

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core-test/src/cache_store_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_store_test.cpp b/modules/platforms/cpp/core-test/src/cache_store_test.cpp
index f1b4630..b6bfefb 100644
--- a/modules/platforms/cpp/core-test/src/cache_store_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_store_test.cpp
@@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE(LoadCacheSingleNodeNoPredicate)
 
     BOOST_CHECK(!cache.IsEmpty());
 
-    BOOST_CHECK_EQUAL(cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY), entriesNum);
+    BOOST_CHECK_EQUAL(cache.Size(cache::CachePeekMode::PRIMARY), entriesNum);
 
     std::string val42 = cache.Get(42);
 
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE(LoadCacheSeveralNodesNoPredicate)
 
     BOOST_CHECK(!cache.IsEmpty());
 
-    BOOST_CHECK_EQUAL(cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY), entriesNum);
+    BOOST_CHECK_EQUAL(cache.Size(cache::CachePeekMode::PRIMARY), entriesNum);
 
     std::string val42 = cache.Get(42);
 
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE(LocalLoadCacheSingleNodeNoPredicate)
 
     BOOST_CHECK(!cache.IsEmpty());
 
-    BOOST_CHECK_EQUAL(cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY), entriesNum);
+    BOOST_CHECK_EQUAL(cache.Size(cache::CachePeekMode::PRIMARY), entriesNum);
 
     std::string val42 = cache.Get(42);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/53f93681/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_test.cpp b/modules/platforms/cpp/core-test/src/cache_test.cpp
index 99e0f1b..d3f73be 100644
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@ -119,13 +119,13 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeys)
     cache.Put(2, 2);
     cache.Put(3, 3);
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    int size = cache.Size(cache::CachePeekMode::PRIMARY);
 
     BOOST_REQUIRE(3 == size);
 
     cache.RemoveAll();
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    size = cache.Size(cache::CachePeekMode::ALL);
 
     BOOST_REQUIRE(0 == size);
 
@@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeys)
 
     cache.RemoveAll(keySet);
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::CachePeekMode::PRIMARY);
 
     BOOST_REQUIRE(1 == size);
 }
@@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterVector)
 {
     cache::Cache<int, int> cache = Cache();
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    int size = cache.Size(cache::CachePeekMode::ALL);
 
     BOOST_REQUIRE(0 == size);
 
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterVector)
 
     cache.RemoveAll(keySet.begin(), keySet.end());
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::CachePeekMode::PRIMARY);
 
     BOOST_REQUIRE(1 == size);
 }
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterArray)
 {
     cache::Cache<int, int> cache = Cache();
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    int size = cache.Size(cache::CachePeekMode::ALL);
 
     BOOST_REQUIRE(0 == size);
 
@@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterArray)
 
     cache.RemoveAll(keys, keys + 4);
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::CachePeekMode::PRIMARY);
 
     BOOST_REQUIRE(1 == size);
 }
@@ -455,11 +455,11 @@ BOOST_AUTO_TEST_CASE(TestLocalClear)
 
     cache.Put(0, 2);
 
-    BOOST_REQUIRE(2 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(2 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
 
     cache.LocalClear(0);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAll)
@@ -473,13 +473,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAll)
 
     std::set<int> keySet(keys, keys + 2);
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 
     cache.LocalClearAll(keySet);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAllIterList)
@@ -493,13 +493,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAllIterList)
 
     std::list<int> keySet(keys, keys + 2);
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 
     cache.LocalClearAll(keySet.begin(), keySet.end());
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAllIterArray)
@@ -511,13 +511,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAllIterArray)
 
     int keys[] = { 0, 1 };
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 
     cache.LocalClearAll(keys, keys + 2);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::CachePeekMode::PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::PRIMARY));
 }
 
 BOOST_AUTO_TEST_CASE(TestSizes)
@@ -531,7 +531,7 @@ BOOST_AUTO_TEST_CASE(TestSizes)
 
     BOOST_REQUIRE(2 <= cache.Size());
 
-    BOOST_REQUIRE(1 <= cache.LocalSize(cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(1 <= cache.LocalSize(cache::CachePeekMode::PRIMARY));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalEvict)
@@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(TestLocalEvict)
 
     cache.Put(1, 5);
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     int keys[] = { 0, 1 };
 
@@ -548,11 +548,11 @@ BOOST_AUTO_TEST_CASE(TestLocalEvict)
 
     cache.LocalEvict(keySet);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     BOOST_REQUIRE(5 == cache.Get(1));
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalEvictIterSet)
@@ -561,7 +561,7 @@ BOOST_AUTO_TEST_CASE(TestLocalEvictIterSet)
 
     cache.Put(1, 5);
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     int keys[] = { 0, 1 };
 
@@ -569,11 +569,11 @@ BOOST_AUTO_TEST_CASE(TestLocalEvictIterSet)
 
     cache.LocalEvict(keySet.begin(), keySet.end());
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     BOOST_REQUIRE(5 == cache.Get(1));
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalEvictIterArray)
@@ -582,17 +582,17 @@ BOOST_AUTO_TEST_CASE(TestLocalEvictIterArray)
 
     cache.Put(1, 5);
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     int keys[] = { 0, 1 };
 
     cache.LocalEvict(keys, keys + 2);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 
     BOOST_REQUIRE(5 == cache.Get(1));
 
-    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::CachePeekMode::ONHEAP));
 }
 
 BOOST_AUTO_TEST_CASE(TestBinary)


[5/8] ignite git commit: IGNITE-3581: Implemented for enums from ODBC

Posted by is...@apache.org.
IGNITE-3581: Implemented for enums from ODBC


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5c4b7b03
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5c4b7b03
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5c4b7b03

Branch: refs/heads/ignite-3581
Commit: 5c4b7b03d400d511b97865d433c211206df19a0f
Parents: 53f9368
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Apr 12 17:19:01 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Thu Apr 13 14:40:02 2017 +0300

----------------------------------------------------------------------
 .../src/application_data_buffer_test.cpp        |  94 ++---
 .../platforms/cpp/odbc-test/src/column_test.cpp |  56 +--
 .../cpp/odbc-test/src/connection_info_test.cpp  |  72 ++--
 .../platforms/cpp/odbc-test/src/row_test.cpp    |  16 +-
 .../ignite/odbc/app/application_data_buffer.h   |   6 +-
 .../cpp/odbc/include/ignite/odbc/column.h       |   2 +-
 .../cpp/odbc/include/ignite/odbc/common_types.h | 350 +++++++++--------
 .../ignite/odbc/config/connection_info.h        |   2 +-
 .../cpp/odbc/include/ignite/odbc/connection.h   |  18 +-
 .../ignite/odbc/diagnostic/diagnosable.h        |   4 +-
 .../odbc/diagnostic/diagnosable_adapter.h       |   8 +-
 .../ignite/odbc/diagnostic/diagnostic_record.h  |   4 +-
 .../odbc/diagnostic/diagnostic_record_storage.h |   8 +-
 .../cpp/odbc/include/ignite/odbc/environment.h  |  10 +-
 .../cpp/odbc/include/ignite/odbc/message.h      |  56 +--
 .../ignite/odbc/query/column_metadata_query.h   |  10 +-
 .../odbc/include/ignite/odbc/query/data_query.h |  23 +-
 .../ignite/odbc/query/foreign_keys_query.h      |   8 +-
 .../ignite/odbc/query/primary_keys_query.h      |   8 +-
 .../cpp/odbc/include/ignite/odbc/query/query.h  |  32 +-
 .../ignite/odbc/query/special_columns_query.h   |   8 +-
 .../ignite/odbc/query/table_metadata_query.h    |  10 +-
 .../include/ignite/odbc/query/type_info_query.h |   8 +-
 .../cpp/odbc/include/ignite/odbc/row.h          |   2 +-
 .../cpp/odbc/include/ignite/odbc/statement.h    |  52 +--
 .../odbc/system/ui/dsn_configuration_window.h   |  35 +-
 .../cpp/odbc/include/ignite/odbc/type_traits.h  |  91 ++---
 .../ignite/odbc/system/ui/custom_window.h       |  12 +-
 .../odbc/os/win/src/system/ui/custom_window.cpp |   4 +-
 .../src/system/ui/dsn_configuration_window.cpp  |  42 +-
 .../cpp/odbc/os/win/src/system_dsn.cpp          |   2 +-
 .../odbc/src/app/application_data_buffer.cpp    | 386 +++++++++----------
 .../platforms/cpp/odbc/src/app/parameter.cpp    |   6 +-
 modules/platforms/cpp/odbc/src/column.cpp       |  14 +-
 modules/platforms/cpp/odbc/src/common_types.cpp |  54 +--
 .../cpp/odbc/src/config/connection_info.cpp     |  12 +-
 modules/platforms/cpp/odbc/src/connection.cpp   |  74 ++--
 .../odbc/src/diagnostic/diagnosable_adapter.cpp |   4 +-
 .../odbc/src/diagnostic/diagnostic_record.cpp   |  46 +--
 .../diagnostic/diagnostic_record_storage.cpp    |  78 ++--
 modules/platforms/cpp/odbc/src/environment.cpp  |  62 +--
 modules/platforms/cpp/odbc/src/odbc.cpp         |  20 +-
 .../odbc/src/query/column_metadata_query.cpp    | 123 +++---
 .../platforms/cpp/odbc/src/query/data_query.cpp | 102 ++---
 .../cpp/odbc/src/query/foreign_keys_query.cpp   |  26 +-
 .../cpp/odbc/src/query/primary_keys_query.cpp   |  71 ++--
 .../odbc/src/query/special_columns_query.cpp    |  26 +-
 .../cpp/odbc/src/query/table_metadata_query.cpp |  81 ++--
 .../cpp/odbc/src/query/type_info_query.cpp      | 231 +++++------
 modules/platforms/cpp/odbc/src/row.cpp          |   4 +-
 modules/platforms/cpp/odbc/src/statement.cpp    | 258 ++++++-------
 modules/platforms/cpp/odbc/src/type_traits.cpp  |  46 +--
 52 files changed, 1410 insertions(+), 1367 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
index cca1dad..4454066 100644
--- a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(TestPutIntToString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     appBuf.PutInt8(12);
     BOOST_CHECK(!strcmp(buffer, "12"));
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(TestPutFloatToString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     appBuf.PutFloat(12.42f);
     BOOST_CHECK(!strcmp(buffer, "12.42"));
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(TestPutGuidToString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     ignite::Guid guid(0x1da1ef8f39ff4d62ULL, 0x8b72e8e9f3371801ULL);
 
@@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE(TestPutBinaryToString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     uint8_t binary[] = { 0x21, 0x84, 0xF4, 0xDC, 0x01, 0x00, 0xFF, 0xF0 };
 
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     std::string testString("Test string");
 
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToWstring)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_WCHAR, buffer, sizeof(buffer), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_WCHAR, buffer, sizeof(buffer), &reslen, &offset);
 
     std::string testString("Test string");
 
@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToLong)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, &offset);
 
     appBuf.PutString("424242424");
     BOOST_CHECK(numBuf == 424242424L);
@@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToTiny)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_TINYINT, &numBuf, sizeof(numBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_TINYINT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
     appBuf.PutString("12");
     BOOST_CHECK(numBuf == 12);
@@ -196,7 +196,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToFloat)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
     appBuf.PutString("12.21");
     BOOST_CHECK_CLOSE_FRACTION(numBuf, 12.21, FLOAT_PRECISION);
@@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(TestPutIntToFloat)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
     appBuf.PutInt8(5);
     BOOST_CHECK_CLOSE_FRACTION(numBuf, 5.0, FLOAT_PRECISION);
@@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(TestPutFloatToShort)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_SHORT, &numBuf, sizeof(numBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_SHORT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
     appBuf.PutDouble(5.42);
     BOOST_CHECK(numBuf == 5);
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToDouble)
     double numBuf;
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &numBuf, sizeof(numBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_DOUBLE, &numBuf, sizeof(numBuf), &reslen, 0);
 
     common::Decimal decimal;
 
@@ -287,7 +287,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToLong)
     long numBuf;
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, 0);
 
     common::Decimal decimal;
 
@@ -314,7 +314,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToString)
     char strBuf[64];
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
 
     common::Decimal decimal;
 
@@ -341,7 +341,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToNumeric)
     SQL_NUMERIC_STRUCT buf;
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_NUMERIC, &buf, sizeof(buf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_NUMERIC, &buf, sizeof(buf), &reslen, 0);
 
     common::Decimal decimal;
 
@@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToString)
     char strBuf[64] = { 0 };
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
 
     Date date = common::MakeDateGmt(1999, 2, 22);
 
@@ -409,7 +409,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToDate)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Date date = common::MakeDateGmt(1984, 5, 27);
 
@@ -429,7 +429,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToTimestamp)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Date date = common::MakeDateGmt(1984, 5, 27);
 
@@ -449,7 +449,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimeToString)
     char strBuf[64] = { 0 };
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
 
     Time time = common::MakeTimeGmt(7, 15, 0);
 
@@ -466,7 +466,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimeToTime)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Time time = common::MakeTimeGmt(23, 51, 1);
 
@@ -482,7 +482,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToString)
     char strBuf[64] = { 0 };
     SqlLen reslen = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
 
     Timestamp date = common::MakeTimestampGmt(2018, 11, 1, 17, 45, 59);
 
@@ -499,7 +499,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToDate)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp ts = common::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
 
@@ -518,7 +518,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToTime)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp ts = common::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
 
@@ -537,7 +537,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToTimestamp)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp ts = common::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
 
@@ -557,7 +557,7 @@ BOOST_AUTO_TEST_CASE(TestGetGuidFromString)
     char buffer[] = "1da1ef8f-39ff-4d62-8b72-e8e9f3371801";
     SqlLen reslen = sizeof(buffer) - 1;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer) - 1, &reslen, 0);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, buffer, sizeof(buffer) - 1, &reslen, 0);
 
     ignite::Guid guid = appBuf.GetGuid();
 
@@ -570,7 +570,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromLong)
     SqlLen reslen = sizeof(numBuf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_LONG, &numBuf, reslen, &reslen, &offset);
 
     std::string res = appBuf.GetString(32);
 
@@ -589,7 +589,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromDouble)
     SqlLen reslen = sizeof(numBuf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &numBuf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_DOUBLE, &numBuf, reslen, &reslen, &offset);
 
     std::string res = appBuf.GetString(32);
 
@@ -608,7 +608,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromString)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf, reslen, &reslen, &offset);
 
     std::string res = appBuf.GetString(reslen);
 
@@ -621,7 +621,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromUshort)
     SqlLen reslen = sizeof(numBuf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT, &numBuf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_UNSIGNED_SHORT, &numBuf, reslen, &reslen, &offset);
 
     float resFloat = appBuf.GetFloat();
 
@@ -638,7 +638,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromString)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf, reslen, &reslen, &offset);
 
     float resFloat = appBuf.GetFloat();
 
@@ -655,7 +655,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromFloat)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_FLOAT, &buf, reslen, &reslen, &offset);
 
     float resFloat = appBuf.GetFloat();
 
@@ -672,7 +672,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromDouble)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_DOUBLE, &buf, reslen, &reslen, &offset);
 
     float resFloat = appBuf.GetFloat();
 
@@ -689,7 +689,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromString)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf, reslen, &reslen, &offset);
 
     int64_t resInt64 = appBuf.GetInt64();
 
@@ -714,7 +714,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromFloat)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_FLOAT, &buf, reslen, &reslen, &offset);
 
     int64_t resInt64 = appBuf.GetInt64();
 
@@ -739,7 +739,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromDouble)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_DOUBLE, &buf, reslen, &reslen, &offset);
 
     int64_t resInt64 = appBuf.GetInt64();
 
@@ -764,7 +764,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromBigint)
     SqlLen reslen = sizeof(buf);
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT, &buf, reslen, &reslen, &offset);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_UNSIGNED_BIGINT, &buf, reslen, &reslen, &offset);
 
     int64_t resInt64 = appBuf.GetInt64();
 
@@ -799,7 +799,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntWithOffset)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_UNSIGNED_BIGINT, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
 
     int64_t val = appBuf.GetInt64();
 
@@ -834,7 +834,7 @@ BOOST_AUTO_TEST_CASE(TestSetStringWithOffset)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
 
     appBuf.PutString("Hello Ignite!");
 
@@ -869,7 +869,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromString)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
 
     Date date = appBuf.GetDate();
 
@@ -895,7 +895,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimeFromString)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
 
     Time time = appBuf.GetTime();
 
@@ -921,7 +921,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromString)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp date = appBuf.GetTimestamp();
 
@@ -952,7 +952,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromDate)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Date date = appBuf.GetDate();
 
@@ -983,7 +983,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromDate)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp ts = appBuf.GetTimestamp();
 
@@ -1014,7 +1014,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromTime)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIME, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Time time = appBuf.GetTime();
 
@@ -1049,7 +1049,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromTimestamp)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Timestamp ts = appBuf.GetTimestamp();
 
@@ -1085,7 +1085,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromTimestamp)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Date date = appBuf.GetDate();
 
@@ -1120,7 +1120,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimeFromTimestamp)
     int offset = 0;
     int* offsetPtr = &offset;
 
-    ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
+    ApplicationDataBuffer appBuf(OdbcNativeType::AI_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
     Time time = appBuf.GetTime();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc-test/src/column_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/column_test.cpp b/modules/platforms/cpp/odbc-test/src/column_test.cpp
index 66d0214..adc40c4 100644
--- a/modules/platforms/cpp/odbc-test/src/column_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/column_test.cpp
@@ -68,9 +68,9 @@ BOOST_AUTO_TEST_CASE(TestColumnShort)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_SIGNED_SHORT, &shortBuf, sizeof(shortBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_SIGNED_SHORT, &shortBuf, sizeof(shortBuf), &reslen, &offset);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(TestColumnShort)
 
     BOOST_REQUIRE(shortBuf == data);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -116,9 +116,9 @@ BOOST_AUTO_TEST_CASE(TestColumnString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(TestColumnString)
 
     BOOST_REQUIRE(std::string(strBuf) == data);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -166,9 +166,9 @@ BOOST_AUTO_TEST_CASE(TestColumnStringSeveral)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf[0], strBuf.size(), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_CHAR, &strBuf[0], strBuf.size(), &reslen, &offset);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -178,7 +178,7 @@ BOOST_AUTO_TEST_CASE(TestColumnStringSeveral)
 
     res.append(strBuf.c_str());
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE(TestColumnStringSeveral)
 
     res.append(strBuf.c_str());
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -198,7 +198,7 @@ BOOST_AUTO_TEST_CASE(TestColumnStringSeveral)
 
     res.append(strBuf.c_str());
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -248,9 +248,9 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
 
-    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column1.IsValid());
 
@@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
 
     BOOST_REQUIRE(std::string(strBuf) == data1);
 
-    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column1.IsValid());
 
@@ -268,7 +268,7 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
 
     BOOST_REQUIRE(column1.GetUnreadDataLength() == 0);
 
-    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column2.IsValid());
 
@@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
 
     BOOST_REQUIRE(std::string(strBuf) == data2);
 
-    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column2.IsValid());
 
@@ -314,9 +314,9 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArray)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_BINARY, &buf[0], buf.size(), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_BINARY, &buf[0], buf.size(), &reslen, &offset);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -326,7 +326,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArray)
 
     BOOST_REQUIRE_EQUAL_COLLECTIONS(buf.begin(), buf.end(), data.begin(), data.end());
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -364,9 +364,9 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayHalfBuffer)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_BINARY, &buf[0], buf.size(), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_BINARY, &buf[0], buf.size(), &reslen, &offset);
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -378,7 +378,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayHalfBuffer)
     result.reserve(data.size());
     std::copy(buf.begin(), buf.end(), std::back_inserter(result));
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -388,7 +388,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayHalfBuffer)
     
     std::copy(buf.begin(), buf.end(), std::back_inserter(result));
 
-    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column.IsValid());
 
@@ -437,9 +437,9 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayTwoColumns)
     SqlLen reslen = 0;
     int* offset = 0;
 
-    ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_BINARY, &buf, sizeof(buf), &reslen, &offset);
+    ApplicationDataBuffer appBuf(type_traits::OdbcNativeType::AI_BINARY, &buf, sizeof(buf), &reslen, &offset);
 
-    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column1.IsValid());
 
@@ -449,7 +449,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayTwoColumns)
 
     BOOST_REQUIRE_EQUAL_COLLECTIONS(buf, buf + reslen, data1.begin(), data1.end());
 
-    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column1.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column1.IsValid());
 
@@ -457,7 +457,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayTwoColumns)
 
     BOOST_REQUIRE(column1.GetUnreadDataLength() == 0);
 
-    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(column2.IsValid());
 
@@ -467,7 +467,7 @@ BOOST_AUTO_TEST_CASE(TestColumnByteArrayTwoColumns)
 
     BOOST_REQUIRE_EQUAL_COLLECTIONS(buf, buf + reslen, data2.begin(), data2.end());
 
-    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SQL_RESULT_NO_DATA);
+    BOOST_REQUIRE(column2.ReadToBuffer(reader, appBuf) == SqlResult::AI_NO_DATA);
 
     BOOST_REQUIRE(column2.IsValid());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc-test/src/connection_info_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/connection_info_test.cpp b/modules/platforms/cpp/odbc-test/src/connection_info_test.cpp
index dd8d1f6..c2fe4f8 100644
--- a/modules/platforms/cpp/odbc-test/src/connection_info_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/connection_info_test.cpp
@@ -38,181 +38,181 @@ BOOST_AUTO_TEST_CASE(TestConnectionInfoSupportedInfo)
 
     ConnectionInfo info;
 
-    SqlResult result;
+    SqlResult::Type result;
 
 #ifdef SQL_DRIVER_NAME
     result = info.GetInfo(SQL_DRIVER_NAME, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DRIVER_NAME
 
 #ifdef SQL_DBMS_NAME
     result = info.GetInfo(SQL_DBMS_NAME, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DBMS_NAME
 
 #ifdef SQL_DRIVER_ODBC_VER
     result = info.GetInfo(SQL_DRIVER_ODBC_VER, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DRIVER_ODBC_VER
 
 #ifdef SQL_DBMS_VER
     result = info.GetInfo(SQL_DBMS_VER, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DBMS_VER
 
 #ifdef SQL_DRIVER_VER
     result = info.GetInfo(SQL_DRIVER_VER, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DRIVER_VER
 
 #ifdef SQL_COLUMN_ALIAS
     result = info.GetInfo(SQL_COLUMN_ALIAS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_COLUMN_ALIAS
 
 #ifdef SQL_IDENTIFIER_QUOTE_CHAR
     result = info.GetInfo(SQL_IDENTIFIER_QUOTE_CHAR, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_IDENTIFIER_QUOTE_CHAR
 
 #ifdef SQL_CATALOG_NAME_SEPARATOR
     result = info.GetInfo(SQL_CATALOG_NAME_SEPARATOR, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CATALOG_NAME_SEPARATOR
 
 #ifdef SQL_SPECIAL_CHARACTERS
     result = info.GetInfo(SQL_SPECIAL_CHARACTERS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_SPECIAL_CHARACTERS
 
 #ifdef SQL_CATALOG_TERM
     result = info.GetInfo(SQL_CATALOG_TERM, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CATALOG_TERM
 
 #ifdef SQL_TABLE_TERM
     result = info.GetInfo(SQL_TABLE_TERM, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_TABLE_TERM
 
 #ifdef SQL_SCHEMA_TERM
     result = info.GetInfo(SQL_SCHEMA_TERM, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_SCHEMA_TERM
 
 #ifdef SQL_ASYNC_DBC_FUNCTIONS
     result = info.GetInfo(SQL_ASYNC_DBC_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_ASYNC_DBC_FUNCTIONS
 
 #ifdef SQL_GETDATA_EXTENSIONS
     result = info.GetInfo(SQL_GETDATA_EXTENSIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_GETDATA_EXTENSIONS
 
 #ifdef SQL_ODBC_INTERFACE_CONFORMANCE
     result = info.GetInfo(SQL_ODBC_INTERFACE_CONFORMANCE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_ODBC_INTERFACE_CONFORMANCE
 
 #ifdef SQL_SQL_CONFORMANCE
     result = info.GetInfo(SQL_SQL_CONFORMANCE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_SQL_CONFORMANCE
 
 #ifdef SQL_CATALOG_USAGE
     result = info.GetInfo(SQL_CATALOG_USAGE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CATALOG_USAGE
 
 #ifdef SQL_SCHEMA_USAGE
     result = info.GetInfo(SQL_SCHEMA_USAGE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_SCHEMA_USAGE
 
 #ifdef SQL_MAX_IDENTIFIER_LEN
     result = info.GetInfo(SQL_MAX_IDENTIFIER_LEN, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_MAX_IDENTIFIER_LEN
 
 #ifdef SQL_AGGREGATE_FUNCTIONS
     result = info.GetInfo(SQL_AGGREGATE_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_AGGREGATE_FUNCTIONS
 
 #ifdef SQL_AGGREGATE_FUNCTIONS
     result = info.GetInfo(SQL_NUMERIC_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_AGGREGATE_FUNCTIONS
 
 #ifdef SQL_STRING_FUNCTIONS
     result = info.GetInfo(SQL_STRING_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_STRING_FUNCTIONS
 
 #ifdef SQL_TIMEDATE_FUNCTIONS
     result = info.GetInfo(SQL_TIMEDATE_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_TIMEDATE_FUNCTIONS
 
 #ifdef SQL_TIMEDATE_ADD_INTERVALS
     result = info.GetInfo(SQL_TIMEDATE_ADD_INTERVALS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_TIMEDATE_ADD_INTERVALS
 
 #ifdef SQL_TIMEDATE_DIFF_INTERVALS
     result = info.GetInfo(SQL_TIMEDATE_DIFF_INTERVALS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_TIMEDATE_DIFF_INTERVALS
 
 #ifdef SQL_DATETIME_LITERALS
     result = info.GetInfo(SQL_DATETIME_LITERALS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_DATETIME_LITERALS
 
 #ifdef SQL_SYSTEM_FUNCTIONS
     result = info.GetInfo(SQL_SYSTEM_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_SYSTEM_FUNCTIONS
 
 #ifdef SQL_CONVERT_FUNCTIONS
     result = info.GetInfo(SQL_CONVERT_FUNCTIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CONVERT_FUNCTIONS
 
 #ifdef SQL_OJ_CAPABILITIES
     result = info.GetInfo(SQL_OJ_CAPABILITIES, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_OJ_CAPABILITIES
 
 #ifdef SQL_POS_OPERATIONS
     result = info.GetInfo(SQL_POS_OPERATIONS, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_POS_OPERATIONS
 
 #ifdef SQL_MAX_CONCURRENT_ACTIVITIES
     result = info.GetInfo(SQL_MAX_CONCURRENT_ACTIVITIES, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_MAX_CONCURRENT_ACTIVITIES
 
 #ifdef SQL_CURSOR_COMMIT_BEHAVIOR
     result = info.GetInfo(SQL_CURSOR_COMMIT_BEHAVIOR, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CURSOR_COMMIT_BEHAVIOR
 
 #ifdef SQL_CURSOR_ROLLBACK_BEHAVIOR
     result = info.GetInfo(SQL_CURSOR_ROLLBACK_BEHAVIOR, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_CURSOR_ROLLBACK_BEHAVIOR
 
 #ifdef SQL_TXN_CAPABLE
     result = info.GetInfo(SQL_TXN_CAPABLE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_TXN_CAPABLE
 
 #ifdef SQL_QUOTED_IDENTIFIER_CASE
     result = info.GetInfo(SQL_QUOTED_IDENTIFIER_CASE, buffer, sizeof(buffer), &reslen);
-    BOOST_REQUIRE(result == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(result == SqlResult::AI_SUCCESS);
 #endif //SQL_QUOTED_IDENTIFIER_CASE
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc-test/src/row_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/row_test.cpp b/modules/platforms/cpp/odbc-test/src/row_test.cpp
index f38e9c5..c692291 100644
--- a/modules/platforms/cpp/odbc-test/src/row_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/row_test.cpp
@@ -84,20 +84,20 @@ void CheckRowData(Row& row, size_t rowIdx)
     char bitBuf;
     int* offset = 0;
 
-    ApplicationDataBuffer appLongBuf(type_traits::IGNITE_ODBC_C_TYPE_SIGNED_LONG, &longBuf, sizeof(longBuf), &reslen, &offset);
-    ApplicationDataBuffer appStrBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
-    ApplicationDataBuffer appGuidBuf(type_traits::IGNITE_ODBC_C_TYPE_GUID, &guidBuf, sizeof(guidBuf), &reslen, &offset);
-    ApplicationDataBuffer appBitBuf(type_traits::IGNITE_ODBC_C_TYPE_BIT, &bitBuf, sizeof(bitBuf), &reslen, &offset);
+    ApplicationDataBuffer appLongBuf(type_traits::OdbcNativeType::AI_SIGNED_LONG, &longBuf, sizeof(longBuf), &reslen, &offset);
+    ApplicationDataBuffer appStrBuf(type_traits::OdbcNativeType::AI_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
+    ApplicationDataBuffer appGuidBuf(type_traits::OdbcNativeType::AI_GUID, &guidBuf, sizeof(guidBuf), &reslen, &offset);
+    ApplicationDataBuffer appBitBuf(type_traits::OdbcNativeType::AI_BIT, &bitBuf, sizeof(bitBuf), &reslen, &offset);
 
     // Checking size.
     BOOST_REQUIRE(row.GetSize() == 4);
 
     // Checking 1st column.
-    BOOST_REQUIRE(row.ReadColumnToBuffer(1, appLongBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(row.ReadColumnToBuffer(1, appLongBuf) == SqlResult::AI_SUCCESS);
     BOOST_REQUIRE(longBuf == rowIdx * 10);
 
     // Checking 2nd column.
-    BOOST_REQUIRE(row.ReadColumnToBuffer(2, appStrBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(row.ReadColumnToBuffer(2, appStrBuf) == SqlResult::AI_SUCCESS);
 
     std::string strReal(strBuf, static_cast<size_t>(reslen));
     std::string strExpected(GetStrColumnValue(rowIdx));
@@ -105,7 +105,7 @@ void CheckRowData(Row& row, size_t rowIdx)
     BOOST_REQUIRE(strReal == strExpected);
 
     // Checking 3rd column.
-    BOOST_REQUIRE(row.ReadColumnToBuffer(3, appGuidBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(row.ReadColumnToBuffer(3, appGuidBuf) == SqlResult::AI_SUCCESS);
 
     BOOST_REQUIRE(guidBuf.Data1 == 0x2b218f63UL);
     BOOST_REQUIRE(guidBuf.Data2 == 0x642aU);
@@ -121,7 +121,7 @@ void CheckRowData(Row& row, size_t rowIdx)
     BOOST_REQUIRE(guidBuf.Data4[7] == 0x98 + rowIdx);
 
     // Checking 4th column.
-    BOOST_REQUIRE(row.ReadColumnToBuffer(4, appBitBuf) == SQL_RESULT_SUCCESS);
+    BOOST_REQUIRE(row.ReadColumnToBuffer(4, appBitBuf) == SqlResult::AI_SUCCESS);
     BOOST_REQUIRE(bitBuf == rowIdx % 2);
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h b/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
index 31c2709..24461c2 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
@@ -57,7 +57,7 @@ namespace ignite
                  * @param reslen Resulting data length.
                  * @param offset Pointer to buffer and reslen offset pointer.
                  */
-                ApplicationDataBuffer(type_traits::IgniteSqlType type, void* buffer,
+                ApplicationDataBuffer(type_traits::OdbcNativeType::Type type, void* buffer,
                     SqlLen buflen, SqlLen* reslen, int** offset = 0);
 
                 /**
@@ -341,7 +341,7 @@ namespace ignite
                  *
                  * @return Buffer type.
                  */
-                type_traits::IgniteSqlType GetType() const
+                type_traits::OdbcNativeType::Type GetType() const
                 {
                     return type;
                 }
@@ -413,7 +413,7 @@ namespace ignite
                 T* ApplyOffset(T* ptr) const;
 
                 /** Underlying data type. */
-                type_traits::IgniteSqlType type;
+                type_traits::OdbcNativeType::Type type;
 
                 /** Buffer pointer. */
                 void* buffer;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/column.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/column.h b/modules/platforms/cpp/odbc/include/ignite/odbc/column.h
index 1297279..a8b8863 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/column.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/column.h
@@ -82,7 +82,7 @@ namespace ignite
              * @param dataBuf Application data buffer.
              * @return Operation result.
              */
-            SqlResult ReadToBuffer(ignite::impl::binary::BinaryReaderImpl& reader,
+            SqlResult::Type ReadToBuffer(ignite::impl::binary::BinaryReaderImpl& reader,
                 app::ApplicationDataBuffer& dataBuf);
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h b/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
index 5d8901d..0a3b02f 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
@@ -21,10 +21,6 @@
 #include <stdint.h>
 #include "system/odbc_constants.h"
 
-#include <ignite/odbc/system/odbc_constants.h>
-
-#include <ignite/odbc/system/odbc_constants.h>
-
 namespace ignite
 {
     namespace odbc
@@ -35,206 +31,218 @@ namespace ignite
         /**
          * SQL result.
          */
-        enum SqlResult
+        struct SqlResult
         {
-            /** Success. */
-            SQL_RESULT_SUCCESS,
+            enum Type
+            {
+                /** Success. */
+                AI_SUCCESS,
 
-            /** Success with info. */
-            SQL_RESULT_SUCCESS_WITH_INFO,
+                /** Success with info. */
+                AI_SUCCESS_WITH_INFO,
 
-            /** Error. */
-            SQL_RESULT_ERROR,
+                /** Error. */
+                AI_ERROR,
 
-            /** No more data. */
-            SQL_RESULT_NO_DATA,
+                /** No more data. */
+                AI_NO_DATA,
 
-            /** No more data. */
-            SQL_RESULT_NEED_DATA
+                /** No more data. */
+                AI_NEED_DATA
+            };
         };
 
         /**
          * Provides detailed information about the cause of a warning or error.
          */
-        enum SqlState
+        struct SqlState
         {
-            /** Undefined state. Internal, should never be exposed to user. */
-            SQL_STATE_UNKNOWN,
-
-            /** Output data has been truncated. */
-            SQL_STATE_01004_DATA_TRUNCATED,
-
-            /** Invalid connection string attribute. */
-            SQL_STATE_01S00_INVALID_CONNECTION_STRING_ATTRIBUTE,
-
-            /** Error in row. */
-            SQL_STATE_01S01_ERROR_IN_ROW,
-
-            /**
-             * The driver did not support the specified value and
-             * substituted a similar value.
-             */
-            SQL_STATE_01S02_OPTION_VALUE_CHANGED,
-
-            /** String data, length mismatch. */
-            SQL_STATE_22026_DATA_LENGTH_MISMATCH,
-
-            /** Invalid cursor state. */
-            SQL_STATE_24000_INVALID_CURSOR_STATE,
-
-            /** Invalid descriptor index. */
-            SQL_STATE_07009_INVALID_DESCRIPTOR_INDEX,
-
-            /**
-             * The driver was unable to establish a connection with the data
-             * source.
-             */
-            SQL_STATE_08001_CANNOT_CONNECT,
-
-            /**
-             * The specified ConnectionHandle had already been used
-             * to establish a connection with a data source, and the connection
-             * was still open.
-             */
-            SQL_STATE_08002_ALREADY_CONNECTED,
-
-            /** The connection specified was not open. */
-            SQL_STATE_08003_NOT_CONNECTED,
-
-            /**
-             * An error occurred for which there was no specific SQLSTATE
-             * and for which no implementation-specific SQLSTATE was defined.
-             */
-            SQL_STATE_HY000_GENERAL_ERROR,
-
-            /**
-             * The driver was unable to allocate memory for the specified
-             * handle.
-             */
-            SQL_STATE_HY001_MEMORY_ALLOCATION,
-
-            /**
-             * The argument TargetType was neither a valid data type
-             * nor SQL_C_DEFAULT
-             */
-            SQL_STATE_HY003_INVALID_APPLICATION_BUFFER_TYPE,
-
-            /** Invalid use of null pointer. */
-            SQL_STATE_HY009_INVALID_USE_OF_NULL_POINTER,
-
-            /** Function sequence error. */
-            SQL_STATE_HY010_SEQUENCE_ERROR,
-
-            /**
-             * Invalid string or buffer length
-             */
-            SQL_STATE_HY090_INVALID_STRING_OR_BUFFER_LENGTH,
-
-            /**
-             * Option type was out of range.
-             */
-            SQL_STATE_HY092_OPTION_TYPE_OUT_OF_RANGE,
-
-            /** Column type out of range. */
-            SQL_STATE_HY097_COLUMN_TYPE_OUT_OF_RANGE,
-
-            /** The value specified for the argument InputOutputType was invalid. */
-            SQL_STATE_HY105_INVALID_PARAMETER_TYPE,
-
-            /** The value specified for the argument FetchOrientation was invalid. */
-            SQL_STATE_HY106_FETCH_TYPE_OUT_OF_RANGE,
-
-            /**
-             * The driver does not support the feature of ODBC behavior that
-             * the application requested.
-             */
-            SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
-
-            /**
-             * The connection timeout period expired before the data source
-             * responded to the request.
-             */
-            SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT,
-
-            /**
-             * Driver does not support this function.
-             */
-            SQL_STATE_IM001_FUNCTION_NOT_SUPPORTED
+            enum Type
+            {
+                /** Undefined state. Internal, should never be exposed to user. */
+                UNKNOWN,
+
+                /** Output data has been truncated. */
+                S01004_DATA_TRUNCATED,
+
+                /** Invalid connection string attribute. */
+                S01S00_INVALID_CONNECTION_STRING_ATTRIBUTE,
+
+                /** Error in row. */
+                S01S01_ERROR_IN_ROW,
+
+                /**
+                 * The driver did not support the specified value and
+                 * substituted a similar value.
+                 */
+                S01S02_OPTION_VALUE_CHANGED,
+
+                /** String data, length mismatch. */
+                S22026_DATA_LENGTH_MISMATCH,
+
+                /** Invalid cursor state. */
+                S24000_INVALID_CURSOR_STATE,
+
+                /** Invalid descriptor index. */
+                S07009_INVALID_DESCRIPTOR_INDEX,
+
+                /**
+                 * The driver was unable to establish a connection with the data
+                 * source.
+                 */
+                S08001_CANNOT_CONNECT,
+
+                /**
+                 * The specified ConnectionHandle had already been used
+                 * to establish a connection with a data source, and the connection
+                 * was still open.
+                 */
+                S08002_ALREADY_CONNECTED,
+
+                /** The connection specified was not open. */
+                S08003_NOT_CONNECTED,
+
+                /**
+                 * An error occurred for which there was no specific SQLSTATE
+                 * and for which no implementation-specific SQLSTATE was defined.
+                 */
+                SHY000_GENERAL_ERROR,
+
+                /**
+                 * The driver was unable to allocate memory for the specified
+                 * handle.
+                 */
+                SHY001_MEMORY_ALLOCATION,
+
+                /**
+                 * The argument TargetType was neither a valid data type
+                 * nor SQL_C_DEFAULT
+                 */
+                SHY003_INVALID_APPLICATION_BUFFER_TYPE,
+
+                /** Invalid use of null pointer. */
+                SHY009_INVALID_USE_OF_NULL_POINTER,
+
+                /** Function sequence error. */
+                SHY010_SEQUENCE_ERROR,
+
+                /**
+                 * Invalid string or buffer length
+                 */
+                SHY090_INVALID_STRING_OR_BUFFER_LENGTH,
+
+                /**
+                 * Option type was out of range.
+                 */
+                SHY092_OPTION_TYPE_OUT_OF_RANGE,
+
+                /** Column type out of range. */
+                SHY097_COLUMN_TYPE_OUT_OF_RANGE,
+
+                /** The value specified for the argument InputOutputType was invalid. */
+                SHY105_INVALID_PARAMETER_TYPE,
+
+                /** The value specified for the argument FetchOrientation was invalid. */
+                SHY106_FETCH_TYPE_OUT_OF_RANGE,
+
+                /**
+                 * The driver does not support the feature of ODBC behavior that
+                 * the application requested.
+                 */
+                SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+
+                /**
+                 * The connection timeout period expired before the data source
+                 * responded to the request.
+                 */
+                SHYT01_CONNECTIOIN_TIMEOUT,
+
+                /**
+                 * Driver does not support this function.
+                 */
+                SIM001_FUNCTION_NOT_SUPPORTED
+            };
         };
 
         /**
          * Diagnostic field type.
          */
-        enum DiagnosticField
+        struct DiagnosticField
         {
-            /** Field type is unknown to the driver. */
-            IGNITE_SQL_DIAG_UNKNOWN,
+            enum Type
+            {
+                /** Field type is unknown to the driver. */
+                UNKNOWN,
 
-            /** Header record field: Count of rows in the cursor. */
-            IGNITE_SQL_DIAG_HEADER_CURSOR_ROW_COUNT,
+                /** Header record field: Count of rows in the cursor. */
+                HEADER_CURSOR_ROW_COUNT,
 
-            /**
-            * Header record field: String that describes the SQL statement
-            * that the underlying function executed.
-            */
-            IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION,
+                /**
+                 * Header record field: String that describes the SQL statement
+                 * that the underlying function executed.
+                 */
+                HEADER_DYNAMIC_FUNCTION,
 
-            /**
-            * Header record field: Numeric code that describes the SQL
-            * statement that was executed by the underlying function.
-            */
-            IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION_CODE,
+                /**
+                 * Header record field: Numeric code that describes the SQL
+                 * statement that was executed by the underlying function.
+                 */
+                HEADER_DYNAMIC_FUNCTION_CODE,
 
-            /** Header record field: Number of status records. */
-            IGNITE_SQL_DIAG_HEADER_NUMBER,
+                /** Header record field: Number of status records. */
+                HEADER_NUMBER,
 
-            /** Header record field: Last operation return code. */
-            IGNITE_SQL_DIAG_HEADER_RETURNCODE,
+                /** Header record field: Last operation return code. */
+                HEADER_RETURNCODE,
 
-            /** Header record field: Row count. */
-            IGNITE_SQL_DIAG_HEADER_ROW_COUNT,
+                /** Header record field: Row count. */
+                HEADER_ROW_COUNT,
 
-            /** Status record field: Class origin. */
-            IGNITE_SQL_DIAG_STATUS_CLASS_ORIGIN,
+                /** Status record field: Class origin. */
+                STATUS_CLASS_ORIGIN,
 
-            /** Status record field: Column number. */
-            IGNITE_SQL_DIAG_STATUS_COLUMN_NUMBER,
+                /** Status record field: Column number. */
+                STATUS_COLUMN_NUMBER,
 
-            /** Status record field: Connection name. */
-            IGNITE_SQL_DIAG_STATUS_CONNECTION_NAME,
+                /** Status record field: Connection name. */
+                STATUS_CONNECTION_NAME,
 
-            /** Status record field: Message text. */
-            IGNITE_SQL_DIAG_STATUS_MESSAGE_TEXT,
+                /** Status record field: Message text. */
+                STATUS_MESSAGE_TEXT,
 
-            /** Status record field: Native result code. */
-            IGNITE_SQL_DIAG_STATUS_NATIVE,
+                /** Status record field: Native result code. */
+                STATUS_NATIVE,
 
-            /** Status record field: Row number. */
-            IGNITE_SQL_DIAG_STATUS_ROW_NUMBER,
+                /** Status record field: Row number. */
+                STATUS_ROW_NUMBER,
 
-            /** Status record field: Server name. */
-            IGNITE_SQL_DIAG_STATUS_SERVER_NAME,
+                /** Status record field: Server name. */
+                STATUS_SERVER_NAME,
 
-            /** Status record field: SQLSTATE. */
-            IGNITE_SQL_DIAG_STATUS_SQLSTATE,
+                /** Status record field: SQLSTATE. */
+                STATUS_SQLSTATE,
 
-            /** Status record field: Subclass origin. */
-            IGNITE_SQL_DIAG_STATUS_SUBCLASS_ORIGIN
+                /** Status record field: Subclass origin. */
+                STATUS_SUBCLASS_ORIGIN
+            };
         };
 
         /**
          * Environment attribute.
          */
-        enum EnvironmentAttribute
+        struct EnvironmentAttribute
         {
-            /** ODBC attribute is unknown to the driver. */
-            IGNITE_SQL_ENV_ATTR_UNKNOWN,
+            enum Type
+            {
+                /** ODBC attribute is unknown to the driver. */
+                UNKNOWN,
 
-            /** ODBC version. */
-            IGNITE_SQL_ENV_ATTR_ODBC_VERSION,
+                /** ODBC version. */
+                ODBC_VERSION,
 
-            /** Null-termination of strings. */
-            IGNITE_SQL_ENV_ATTR_OUTPUT_NTS
+                /** Null-termination of strings. */
+                OUTPUT_NTS
+            };
         };
 
         /**
@@ -243,23 +251,23 @@ namespace ignite
          * @param result Internal result type.
          * @return ODBC result type.
          */
-        int SqlResultToReturnCode(SqlResult result);
+        int SqlResultToReturnCode(SqlResult::Type result);
 
         /**
-         * Convert ODBC field type to internal DiagnosticField type value.
+         * Convert ODBC field type to internal DiagnosticField::Type type value.
          *
          * @param field ODBC field type.
-         * @return Internal DiagnosticField type value.
+         * @return Internal DiagnosticField::Type type value.
          */
-        DiagnosticField DiagnosticFieldToInternal(int16_t field);
+        DiagnosticField::Type DiagnosticFieldToInternal(int16_t field);
 
         /**
-         * Convert environment attribute to internal EnvironmentAttribute type value.
+         * Convert environment attribute to internal EnvironmentAttribute::Type type value.
          *
          * @param attr Environment attribute.
-         * @return Internal EnvironmentAttribute type value.
+         * @return Internal EnvironmentAttribute::Type type value.
          */
-        EnvironmentAttribute EnvironmentAttributeToInternal(int32_t attr);
+        EnvironmentAttribute::Type EnvironmentAttributeToInternal(int32_t attr);
 
 
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_info.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_info.h b/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_info.h
index d421952..c17d5ec 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_info.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_info.h
@@ -66,7 +66,7 @@ namespace ignite
                  * @param reslen Result value length pointer.
                  * @return True on success.
                  */
-                SqlResult GetInfo(InfoType type, void* buf, short buflen, short* reslen) const;
+                SqlResult::Type GetInfo(InfoType type, void* buf, short buflen, short* reslen) const;
 
             private:
                 IGNITE_NO_COPY_ASSIGNMENT(ConnectionInfo);

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h b/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
index acf82ba..c3f27a2 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
@@ -129,7 +129,7 @@ namespace ignite
              * @param columnNum Associated column number.
              * @return DiagnosticRecord associated with the instance.
              */
-            static diagnostic::DiagnosticRecord CreateStatusRecord(SqlState sqlState,
+            static diagnostic::DiagnosticRecord CreateStatusRecord(SqlState::Type sqlState,
                 const std::string& message, int32_t rowNum = 0, int32_t columnNum = 0);
 
             /**
@@ -172,7 +172,7 @@ namespace ignite
              * @param connectStr Connection string.
              * @return Operation result.
              */
-            SqlResult InternalEstablish(const std::string& connectStr);
+            SqlResult::Type InternalEstablish(const std::string& connectStr);
 
             /**
              * Establish connection to ODBC server.
@@ -181,7 +181,7 @@ namespace ignite
              * @param cfg Configuration.
              * @return Operation result.
              */
-            SqlResult InternalEstablish(const config::Configuration cfg);
+            SqlResult::Type InternalEstablish(const config::Configuration cfg);
 
             /**
              * Release established connection.
@@ -189,7 +189,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalRelease();
+            SqlResult::Type InternalRelease();
 
             /**
              * Get info of any type.
@@ -201,7 +201,7 @@ namespace ignite
              * @param reslen Result value length pointer.
              * @return Operation result.
              */
-            SqlResult InternalGetInfo(config::ConnectionInfo::InfoType type, void* buf, short buflen, short* reslen);
+            SqlResult::Type InternalGetInfo(config::ConnectionInfo::InfoType type, void* buf, short buflen, short* reslen);
 
             /**
              * Create statement associated with the connection.
@@ -210,7 +210,7 @@ namespace ignite
              * @param Pointer to valid instance on success and NULL on failure.
              * @return Operation result.
              */
-            SqlResult InternalCreateStatement(Statement*& statement);
+            SqlResult::Type InternalCreateStatement(Statement*& statement);
 
             /**
              * Perform transaction commit on all the associated connections.
@@ -218,7 +218,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalTransactionCommit();
+            SqlResult::Type InternalTransactionCommit();
 
             /**
              * Perform transaction rollback on all the associated connections.
@@ -226,7 +226,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalTransactionRollback();
+            SqlResult::Type InternalTransactionRollback();
 
             /**
              * Receive specified number of bytes.
@@ -251,7 +251,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult MakeRequestHandshake();
+            SqlResult::Type MakeRequestHandshake();
 
             /**
              * Constructor.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable.h b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable.h
index 6937fcc..4eb1a38 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable.h
@@ -62,7 +62,7 @@ namespace ignite
                  * @param rowNum Associated row number.
                  * @param columnNum Associated column number.
                  */
-                virtual void AddStatusRecord(SqlState sqlState, const std::string& message,
+                virtual void AddStatusRecord(SqlState::Type sqlState, const std::string& message,
                     int32_t rowNum, int32_t columnNum) = 0;
 
                 /**
@@ -71,7 +71,7 @@ namespace ignite
                  * @param sqlState SQL state.
                  * @param message Message.
                  */
-                virtual void AddStatusRecord(SqlState sqlState, const std::string& message) = 0;
+                virtual void AddStatusRecord(SqlState::Type sqlState, const std::string& message) = 0;
 
             protected:
                 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable_adapter.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable_adapter.h b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable_adapter.h
index 548eecd..45f47f0 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable_adapter.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnosable_adapter.h
@@ -22,12 +22,12 @@
 
 #define IGNITE_ODBC_API_CALL(...)                   \
         diagnosticRecords.Reset();                  \
-        SqlResult result = (__VA_ARGS__);           \
+        SqlResult::Type result = (__VA_ARGS__);     \
         diagnosticRecords.SetHeaderRecord(result)
 
 #define IGNITE_ODBC_API_CALL_ALWAYS_SUCCESS                     \
         diagnosticRecords.Reset();                              \
-        diagnosticRecords.SetHeaderRecord(SQL_RESULT_SUCCESS)
+        diagnosticRecords.SetHeaderRecord(SqlResult::AI_SUCCESS)
 
 namespace ignite
 {
@@ -79,7 +79,7 @@ namespace ignite
                  * @param rowNum Associated row number.
                  * @param columnNum Associated column number.
                  */
-                virtual void AddStatusRecord(SqlState sqlState, const std::string& message,
+                virtual void AddStatusRecord(SqlState::Type  sqlState, const std::string& message,
                     int32_t rowNum, int32_t columnNum);
 
                 /**
@@ -88,7 +88,7 @@ namespace ignite
                  * @param sqlState SQL state.
                  * @param message Message.
                  */
-                virtual void AddStatusRecord(SqlState sqlState, const std::string& message);
+                virtual void AddStatusRecord(SqlState::Type  sqlState, const std::string& message);
 
             protected:
                 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record.h b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record.h
index 80d5090..18cc93a 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record.h
@@ -53,7 +53,7 @@ namespace ignite
                  * @param rowNum Associated row number.
                  * @param columnNum Associated column number.
                  */
-                DiagnosticRecord(SqlState sqlState, const std::string& message,
+                DiagnosticRecord(SqlState::Type sqlState, const std::string& message,
                     const std::string& connectionName, const std::string& serverName,
                     int32_t rowNum = 0, int32_t columnNum = 0);
 
@@ -142,7 +142,7 @@ namespace ignite
 
             private:
                 /** SQL state diagnostic code. */
-                SqlState sqlState;
+                SqlState::Type sqlState;
 
                 /** An informational message on the error or warning. */
                 std::string message;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record_storage.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record_storage.h b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record_storage.h
index b45bb7d..9a816da 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record_storage.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/diagnostic/diagnostic_record_storage.h
@@ -64,7 +64,7 @@ namespace ignite
                  *
                  * @param retCode Operation return code.
                  */
-                void SetHeaderRecord(SqlResult result);
+                void SetHeaderRecord(SqlResult::Type result);
 
                 /**
                  * Add status record to diagnostic records.
@@ -83,7 +83,7 @@ namespace ignite
                  *
                  * @return Result of the last operation.
                  */
-                SqlResult GetOperaionResult() const;
+                SqlResult::Type GetOperaionResult() const;
 
                 /**
                  * Get return code of the last operation.
@@ -169,7 +169,7 @@ namespace ignite
                  * @param buffer Buffer to put data to.
                  * @return Operation result.
                  */
-                SqlResult GetField(int32_t recNum, DiagnosticField field, app::ApplicationDataBuffer& buffer) const;
+                SqlResult::Type GetField(int32_t recNum, DiagnosticField::Type field, app::ApplicationDataBuffer& buffer) const;
 
             private:
                 IGNITE_NO_COPY_ASSIGNMENT(DiagnosticRecordStorage);
@@ -196,7 +196,7 @@ namespace ignite
                  * Operation result. This field is mapped to "Return code" header
                  * record field.
                  */
-                SqlResult result;
+                SqlResult::Type result;
 
                 /**
                  * Header record field. The number of rows affected by an insert,

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/environment.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/environment.h b/modules/platforms/cpp/odbc/include/ignite/odbc/environment.h
index 0c8af64..3eeade6 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/environment.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/environment.h
@@ -86,7 +86,7 @@ namespace ignite
              * @return Pointer to valid instance on success or NULL on failure.
              * @return Operation result.
              */
-            SqlResult InternalCreateConnection(Connection*& connection);
+            SqlResult::Type InternalCreateConnection(Connection*& connection);
 
             /**
              * Perform transaction commit on all the associated connections.
@@ -94,7 +94,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalTransactionCommit();
+            SqlResult::Type InternalTransactionCommit();
 
             /**
              * Perform transaction rollback on all the associated connections.
@@ -102,7 +102,7 @@ namespace ignite
              *
              * @return Operation result.
              */
-            SqlResult InternalTransactionRollback();
+            SqlResult::Type InternalTransactionRollback();
 
             /**
              * Set attribute.
@@ -113,7 +113,7 @@ namespace ignite
              * @param len Value length if the attribute is of string type.
              * @return Operation result.
              */
-            SqlResult InternalSetAttribute(int32_t attr, void* value, int32_t len);
+            SqlResult::Type InternalSetAttribute(int32_t attr, void* value, int32_t len);
 
             /**
              * Get attribute.
@@ -123,7 +123,7 @@ namespace ignite
              * @param buffer Buffer to put value to.
              * @return Operation result.
              */
-            SqlResult InternalGetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer);
+            SqlResult::Type InternalGetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer);
 
             /** ODBC version. */
             int32_t odbcVersion;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/message.h b/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
index 7061fc9..60b2d9b 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
@@ -34,28 +34,34 @@ namespace ignite
 {
     namespace odbc
     {
-        enum RequestType
+        struct RequestType
         {
-            REQUEST_TYPE_HANDSHAKE = 1,
+            enum Type
+            {
+                HANDSHAKE = 1,
 
-            REQUEST_TYPE_EXECUTE_SQL_QUERY = 2,
+                EXECUTE_SQL_QUERY = 2,
 
-            REQUEST_TYPE_FETCH_SQL_QUERY = 3,
+                FETCH_SQL_QUERY = 3,
 
-            REQUEST_TYPE_CLOSE_SQL_QUERY = 4,
+                CLOSE_SQL_QUERY = 4,
 
-            REQUEST_TYPE_GET_COLUMNS_METADATA = 5,
+                GET_COLUMNS_METADATA = 5,
 
-            REQUEST_TYPE_GET_TABLES_METADATA = 6,
+                GET_TABLES_METADATA = 6,
 
-            REQUEST_TYPE_GET_PARAMS_METADATA = 7
+                GET_PARAMS_METADATA = 7
+            };
         };
 
-        enum ResponseStatus
+        struct ResponseStatus
         {
-            RESPONSE_STATUS_SUCCESS = 0,
+            enum Type
+            {
+                SUCCESS = 0,
 
-            RESPONSE_STATUS_FAILED = 1
+                FAILED = 1
+            };
         };
 
         /**
@@ -93,7 +99,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_HANDSHAKE);
+                writer.WriteInt8(RequestType::HANDSHAKE);
 
                 writer.WriteInt64(version);
 
@@ -148,7 +154,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_EXECUTE_SQL_QUERY);
+                writer.WriteInt8(RequestType::EXECUTE_SQL_QUERY);
                 utility::WriteString(writer, cache);
                 utility::WriteString(writer, sql);
 
@@ -213,7 +219,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_CLOSE_SQL_QUERY);
+                writer.WriteInt8(RequestType::CLOSE_SQL_QUERY);
                 writer.WriteInt64(queryId);
             }
 
@@ -255,7 +261,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_FETCH_SQL_QUERY);
+                writer.WriteInt8(RequestType::FETCH_SQL_QUERY);
                 writer.WriteInt64(queryId);
                 writer.WriteInt32(pageSize);
             }
@@ -303,7 +309,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_GET_COLUMNS_METADATA);
+                writer.WriteInt8(RequestType::GET_COLUMNS_METADATA);
                 
                 utility::WriteString(writer, schema);
                 utility::WriteString(writer, table);
@@ -359,7 +365,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_GET_TABLES_METADATA);
+                writer.WriteInt8(RequestType::GET_TABLES_METADATA);
 
                 utility::WriteString(writer, catalog);
                 utility::WriteString(writer, schema);
@@ -390,10 +396,8 @@ namespace ignite
             /**
              * Constructor.
              *
-             * @param catalog Catalog search pattern.
-             * @param schema Schema search pattern.
-             * @param table Table search pattern.
-             * @param tableTypes Table types search pattern.
+             * @param cacheName Cache name.
+             * @param sqlQuery SQL query itself.
              */
             QueryGetParamsMetaRequest(const std::string& cacheName, const std::string& sqlQuery) :
                 cacheName(cacheName),
@@ -416,7 +420,7 @@ namespace ignite
              */
             void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
-                writer.WriteInt8(REQUEST_TYPE_GET_PARAMS_METADATA);
+                writer.WriteInt8(RequestType::GET_PARAMS_METADATA);
 
                 utility::WriteString(writer, cacheName);
                 utility::WriteString(writer, sqlQuery);
@@ -431,7 +435,7 @@ namespace ignite
         };
 
         /**
-         * Query close response.
+         * General response.
          */
         class Response
         {
@@ -439,7 +443,7 @@ namespace ignite
             /**
              * Constructor.
              */
-            Response() : status(RESPONSE_STATUS_FAILED), error()
+            Response() : status(ResponseStatus::FAILED), error()
             {
                 // No-op.
             }
@@ -460,7 +464,7 @@ namespace ignite
             {
                 status = reader.ReadInt8();
 
-                if (status == RESPONSE_STATUS_SUCCESS)
+                if (status == ResponseStatus::SUCCESS)
                     ReadOnSuccess(reader);
                 else
                     utility::ReadString(reader, error);;
@@ -486,7 +490,7 @@ namespace ignite
 
         protected:
             /**
-             * Read data if response status is RESPONSE_STATUS_SUCCESS.
+             * Read data if response status is ResponseStatus::SUCCESS.
              */
             virtual void ReadOnSuccess(ignite::impl::binary::BinaryReaderImpl&)
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/column_metadata_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/column_metadata_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/column_metadata_query.h
index 85a9474..878a4be 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/column_metadata_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/column_metadata_query.h
@@ -59,7 +59,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -73,7 +73,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -82,14 +82,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.
@@ -113,7 +113,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                SqlResult MakeRequestGetColumnsMeta();
+                SqlResult::Type MakeRequestGetColumnsMeta();
 
                 /** Connection associated with the statement. */
                 Connection& connection;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/data_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/data_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/data_query.h
index 68bb877..ade8fb0 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/data_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/data_query.h
@@ -58,7 +58,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -73,7 +73,7 @@ namespace ignite
                  * @param columnBindings Application buffers to put data to.
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
                 
                 /**
                  * Get data of the specified column in the result set.
@@ -82,14 +82,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
-                 * @return True on success.
+                 * @return Result.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.
@@ -124,21 +124,28 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                SqlResult MakeRequestExecute();
+                SqlResult::Type MakeRequestExecute();
 
                 /**
                  * Make query close request.
                  *
                  * @return True on success.
                  */
-                SqlResult MakeRequestClose();
+                SqlResult::Type MakeRequestClose();
 
                 /**
                  * Make data fetch request and use response to set internal state.
                  *
                  * @return True on success.
                  */
-                SqlResult MakeRequestFetch();
+                SqlResult::Type MakeRequestFetch();
+                
+                /**
+                 * Close query.
+                 *
+                 * @return Result.
+                 */
+                SqlResult::Type InternalClose();
 
                 /** Connection associated with the statement. */
                 Connection& connection;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/include/ignite/odbc/query/foreign_keys_query.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/query/foreign_keys_query.h b/modules/platforms/cpp/odbc/include/ignite/odbc/query/foreign_keys_query.h
index 0fb1e5f..7d60728 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/query/foreign_keys_query.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/query/foreign_keys_query.h
@@ -60,7 +60,7 @@ namespace ignite
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Execute();
+                virtual SqlResult::Type Execute();
 
                 /**
                  * Get column metadata.
@@ -74,7 +74,7 @@ namespace ignite
                  *
                  * @return Operation result.
                  */
-                virtual SqlResult FetchNextRow(app::ColumnBindingMap& columnBindings);
+                virtual SqlResult::Type FetchNextRow(app::ColumnBindingMap& columnBindings);
 
                 /**
                  * Get data of the specified column in the result set.
@@ -83,14 +83,14 @@ namespace ignite
                  * @param buffer Buffer to put column data to.
                  * @return Operation result.
                  */
-                virtual SqlResult GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
+                virtual SqlResult::Type GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer);
 
                 /**
                  * Close query.
                  *
                  * @return True on success.
                  */
-                virtual SqlResult Close();
+                virtual SqlResult::Type Close();
 
                 /**
                  * Check if data is available.


[3/8] ignite git commit: IGNITE-3581: Implemented for enums from ODBC

Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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/5c4b7b03/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:

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record_storage.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record_storage.cpp b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record_storage.cpp
index c075567..4b90e44 100644
--- a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record_storage.cpp
+++ b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record_storage.cpp
@@ -30,7 +30,7 @@ namespace ignite
                 rowCount(0),
                 dynamicFunction(),
                 dynamicFunctionCode(0),
-                result(SQL_RESULT_SUCCESS),
+                result(SqlResult::AI_SUCCESS),
                 rowsAffected(0)
             {
                 // No-op.
@@ -41,7 +41,7 @@ namespace ignite
                 // No-op.
             }
 
-            void DiagnosticRecordStorage::SetHeaderRecord(SqlResult result)
+            void DiagnosticRecordStorage::SetHeaderRecord(SqlResult::Type result)
             {
                 rowCount = 0;
                 dynamicFunction.clear();
@@ -57,12 +57,12 @@ namespace ignite
 
             void DiagnosticRecordStorage::Reset()
             {
-                SetHeaderRecord(SQL_RESULT_ERROR);
+                SetHeaderRecord(SqlResult::AI_ERROR);
 
                 statusRecords.clear();
             }
 
-            SqlResult DiagnosticRecordStorage::GetOperaionResult() const
+            SqlResult::Type DiagnosticRecordStorage::GetOperaionResult() const
             {
                 return result;
             }
@@ -122,55 +122,55 @@ namespace ignite
 
             bool DiagnosticRecordStorage::IsSuccessful() const
             {
-                return result == SQL_RESULT_SUCCESS || 
-                       result == SQL_RESULT_SUCCESS_WITH_INFO;
+                return result == SqlResult::AI_SUCCESS || 
+                       result == SqlResult::AI_SUCCESS_WITH_INFO;
             }
 
-            SqlResult DiagnosticRecordStorage::GetField(int32_t recNum, DiagnosticField field, app::ApplicationDataBuffer& buffer) const
+            SqlResult::Type DiagnosticRecordStorage::GetField(int32_t recNum, DiagnosticField::Type field, app::ApplicationDataBuffer& buffer) const
             {
                 // Header record.
                 switch (field)
                 {
-                    case IGNITE_SQL_DIAG_HEADER_CURSOR_ROW_COUNT:
+                    case DiagnosticField::HEADER_CURSOR_ROW_COUNT:
                     {
                         buffer.PutInt64(GetRowCount());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION:
+                    case DiagnosticField::HEADER_DYNAMIC_FUNCTION:
                     {
                         buffer.PutString(GetDynamicFunction());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_HEADER_DYNAMIC_FUNCTION_CODE:
+                    case DiagnosticField::HEADER_DYNAMIC_FUNCTION_CODE:
                     {
                         buffer.PutInt32(GetDynamicFunctionCode());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_HEADER_NUMBER:
+                    case DiagnosticField::HEADER_NUMBER:
                     {
                         buffer.PutInt32(GetStatusRecordsNumber());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_HEADER_RETURNCODE:
+                    case DiagnosticField::HEADER_RETURNCODE:
                     {
                         buffer.PutInt32(GetReturnCode());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_HEADER_ROW_COUNT:
+                    case DiagnosticField::HEADER_ROW_COUNT:
                     {
                         buffer.PutInt64(GetRowsAffected());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
                     default:
@@ -178,81 +178,81 @@ namespace ignite
                 }
 
                 if (recNum < 1 || static_cast<size_t>(recNum) > statusRecords.size())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 // Status record.
                 const DiagnosticRecord& record = GetStatusRecord(recNum);
 
                 switch (field)
                 {
-                    case IGNITE_SQL_DIAG_STATUS_CLASS_ORIGIN:
+                    case DiagnosticField::STATUS_CLASS_ORIGIN:
                     {
                         buffer.PutString(record.GetClassOrigin());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_COLUMN_NUMBER:
+                    case DiagnosticField::STATUS_COLUMN_NUMBER:
                     {
                         buffer.PutInt32(record.GetColumnNumber());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_CONNECTION_NAME:
+                    case DiagnosticField::STATUS_CONNECTION_NAME:
                     {
                         buffer.PutString(record.GetConnectionName());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_MESSAGE_TEXT:
+                    case DiagnosticField::STATUS_MESSAGE_TEXT:
                     {
                         buffer.PutString(record.GetMessageText());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_NATIVE:
+                    case DiagnosticField::STATUS_NATIVE:
                     {
                         buffer.PutInt32(0);
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_ROW_NUMBER:
+                    case DiagnosticField::STATUS_ROW_NUMBER:
                     {
                         buffer.PutInt64(record.GetRowNumber());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_SERVER_NAME:
+                    case DiagnosticField::STATUS_SERVER_NAME:
                     {
                         buffer.PutString(record.GetServerName());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_SQLSTATE:
+                    case DiagnosticField::STATUS_SQLSTATE:
                     {
                         buffer.PutString(record.GetSqlState());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
-                    case IGNITE_SQL_DIAG_STATUS_SUBCLASS_ORIGIN:
+                    case DiagnosticField::STATUS_SUBCLASS_ORIGIN:
                     {
                         buffer.PutString(record.GetSubclassOrigin());
 
-                        return SQL_RESULT_SUCCESS;
+                        return SqlResult::AI_SUCCESS;
                     }
 
                     default:
                         break;
                 }
 
-                return SQL_RESULT_ERROR;
+                return SqlResult::AI_ERROR;
             }
 
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/environment.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/environment.cpp b/modules/platforms/cpp/odbc/src/environment.cpp
index 3928295..6182fa2 100644
--- a/modules/platforms/cpp/odbc/src/environment.cpp
+++ b/modules/platforms/cpp/odbc/src/environment.cpp
@@ -43,18 +43,18 @@ namespace ignite
             return connection;
         }
 
-        SqlResult Environment::InternalCreateConnection(Connection*& connection)
+        SqlResult::Type Environment::InternalCreateConnection(Connection*& connection)
         {
             connection = new Connection;
 
             if (!connection)
             {
-                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 Environment::TransactionCommit()
@@ -62,9 +62,9 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalTransactionCommit());
         }
 
-        SqlResult Environment::InternalTransactionCommit()
+        SqlResult::Type Environment::InternalTransactionCommit()
         {
-            return SQL_RESULT_SUCCESS;
+            return SqlResult::AI_SUCCESS;
         }
 
         void Environment::TransactionRollback()
@@ -72,12 +72,12 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalTransactionRollback());
         }
 
-        SqlResult Environment::InternalTransactionRollback()
+        SqlResult::Type Environment::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;
         }
 
         void Environment::SetAttribute(int32_t attr, void* value, int32_t len)
@@ -85,51 +85,51 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalSetAttribute(attr, value, len));
         }
 
-        SqlResult Environment::InternalSetAttribute(int32_t attr, void* value, int32_t len)
+        SqlResult::Type Environment::InternalSetAttribute(int32_t attr, void* value, int32_t len)
         {
-            EnvironmentAttribute attribute = EnvironmentAttributeToInternal(attr);
+            EnvironmentAttribute::Type attribute = EnvironmentAttributeToInternal(attr);
 
             switch (attribute)
             {
-                case IGNITE_SQL_ENV_ATTR_ODBC_VERSION:
+                case EnvironmentAttribute::ODBC_VERSION:
                 {
                     int32_t version = static_cast<int32_t>(reinterpret_cast<intptr_t>(value));
 
                     if (version != odbcVersion)
                     {
-                        AddStatusRecord(SQL_STATE_01S02_OPTION_VALUE_CHANGED,
+                        AddStatusRecord(SqlState::S01S02_OPTION_VALUE_CHANGED,
                             "ODBC version is not supported.");
 
-                        return SQL_RESULT_SUCCESS_WITH_INFO;
+                        return SqlResult::AI_SUCCESS_WITH_INFO;
                     }
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
-                case IGNITE_SQL_ENV_ATTR_OUTPUT_NTS:
+                case EnvironmentAttribute::OUTPUT_NTS:
                 {
                     int32_t nts = static_cast<int32_t>(reinterpret_cast<intptr_t>(value));
 
                     if (nts != odbcNts)
                     {
-                        AddStatusRecord(SQL_STATE_01S02_OPTION_VALUE_CHANGED,
+                        AddStatusRecord(SqlState::S01S02_OPTION_VALUE_CHANGED,
                             "Only null-termination of strings is supported.");
 
-                        return SQL_RESULT_SUCCESS_WITH_INFO;
+                        return SqlResult::AI_SUCCESS_WITH_INFO;
                     }
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
-                case IGNITE_SQL_ENV_ATTR_UNKNOWN:
+                case EnvironmentAttribute::UNKNOWN:
                 default:
                     break;
             }
 
-            AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+            AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                 "Attribute is not supported.");
 
-            return SQL_RESULT_ERROR;
+            return SqlResult::AI_ERROR;
         }
 
         void Environment::GetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer)
@@ -137,35 +137,35 @@ namespace ignite
             IGNITE_ODBC_API_CALL(InternalGetAttribute(attr, buffer));
         }
 
-        SqlResult Environment::InternalGetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer)
+        SqlResult::Type Environment::InternalGetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer)
         {
-            EnvironmentAttribute attribute = EnvironmentAttributeToInternal(attr);
+            EnvironmentAttribute::Type attribute = EnvironmentAttributeToInternal(attr);
 
             switch (attribute)
             {
-                case IGNITE_SQL_ENV_ATTR_ODBC_VERSION:
+                case EnvironmentAttribute::ODBC_VERSION:
                 {
                     buffer.PutInt32(odbcVersion);
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
-                case IGNITE_SQL_ENV_ATTR_OUTPUT_NTS:
+                case EnvironmentAttribute::OUTPUT_NTS:
                 {
                     buffer.PutInt32(odbcNts);
 
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
                 }
 
-                case IGNITE_SQL_ENV_ATTR_UNKNOWN:
+                case EnvironmentAttribute::UNKNOWN:
                 default:
                     break;
             }
 
-            AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
+            AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
                 "Attribute is not supported.");
 
-            return SQL_RESULT_ERROR;
+            return SqlResult::AI_ERROR;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/odbc.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/odbc.cpp b/modules/platforms/cpp/odbc/src/odbc.cpp
index 542e64c..ed5e362 100644
--- a/modules/platforms/cpp/odbc/src/odbc.cpp
+++ b/modules/platforms/cpp/odbc/src/odbc.cpp
@@ -85,7 +85,7 @@ namespace ignite
                     *result = 0;
 
                 connection->GetDiagnosticRecords().Reset();
-                connection->AddStatusRecord(odbc::SQL_STATE_IM001_FUNCTION_NOT_SUPPORTED,
+                connection->AddStatusRecord(odbc::SqlState::SIM001_FUNCTION_NOT_SUPPORTED,
                                             "The HandleType argument was SQL_HANDLE_DESC, and "
                                             "the driver does not support allocating a descriptor handle");
 
@@ -919,11 +919,11 @@ namespace ignite
         LOG_MSG("SQLGetDiagField called: " << recNum);
 
         SqlLen outResLen;
-        ApplicationDataBuffer outBuffer(IGNITE_ODBC_C_TYPE_DEFAULT, buffer, bufferLen, &outResLen);
+        ApplicationDataBuffer outBuffer(OdbcNativeType::AI_DEFAULT, buffer, bufferLen, &outResLen);
 
-        SqlResult result;
+        SqlResult::Type result;
 
-        DiagnosticField field = DiagnosticFieldToInternal(diagId);
+        DiagnosticField::Type field = DiagnosticFieldToInternal(diagId);
 
         switch (handleType)
         {
@@ -940,12 +940,12 @@ namespace ignite
 
             default:
             {
-                result = SQL_RESULT_NO_DATA;
+                result = SqlResult::AI_NO_DATA;
                 break;
             }
         }
 
-        if (resLen && result == SQL_RESULT_SUCCESS)
+        if (resLen && result == SqlResult::AI_SUCCESS)
             *resLen = static_cast<SQLSMALLINT>(outResLen);
 
         return SqlResultToReturnCode(result);
@@ -1000,7 +1000,7 @@ namespace ignite
             *nativeError = 0;
 
         SqlLen outResLen;
-        ApplicationDataBuffer outBuffer(IGNITE_ODBC_C_TYPE_CHAR, msgBuffer, msgBufferLen, &outResLen);
+        ApplicationDataBuffer outBuffer(OdbcNativeType::AI_CHAR, msgBuffer, msgBufferLen, &outResLen);
 
         outBuffer.PutString(record.GetMessageText());
 
@@ -1100,7 +1100,7 @@ namespace ignite
         if (!statement)
             return SQL_INVALID_HANDLE;
 
-        IgniteSqlType driverType = ToDriverType(targetType);
+        OdbcNativeType::Type driverType = ToDriverType(targetType);
 
         ApplicationDataBuffer dataBuffer(driverType, targetValue, bufferLength, strLengthOrIndicator);
 
@@ -1147,7 +1147,7 @@ namespace ignite
             return SQL_INVALID_HANDLE;
 
         SqlLen outResLen;
-        ApplicationDataBuffer outBuffer(IGNITE_ODBC_C_TYPE_DEFAULT, valueBuf,
+        ApplicationDataBuffer outBuffer(OdbcNativeType::AI_DEFAULT, valueBuf,
             static_cast<int32_t>(valueBufLen), &outResLen);
 
         environment->GetAttribute(attr, outBuffer);
@@ -1295,7 +1295,7 @@ namespace ignite
             *error = 0;
 
         SqlLen outResLen;
-        ApplicationDataBuffer outBuffer(IGNITE_ODBC_C_TYPE_CHAR, msgBuf, msgBufLen, &outResLen);
+        ApplicationDataBuffer outBuffer(OdbcNativeType::AI_CHAR, msgBuf, msgBufLen, &outResLen);
 
         outBuffer.PutString(record.GetMessageText());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp b/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
index 9aa5f7d..cca3eb5 100644
--- a/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
@@ -25,43 +25,46 @@
 
 namespace
 {
-    enum ResultColumn
+    struct ResultColumn
     {
-        /** Catalog name. NULL if not applicable to the data source. */
-        TABLE_CAT = 1,
+        enum Type
+        {
+            /** Catalog name. NULL if not applicable to the data source. */
+            TABLE_CAT = 1,
 
-        /** Schema name. NULL if not applicable to the data source. */
-        TABLE_SCHEM,
+            /** Schema name. NULL if not applicable to the data source. */
+            TABLE_SCHEM,
 
-        /** Table name. */
-        TABLE_NAME,
+            /** Table name. */
+            TABLE_NAME,
 
-        /** Column name. */
-        COLUMN_NAME,
+            /** Column name. */
+            COLUMN_NAME,
 
-        /** SQL data type. */
-        DATA_TYPE,
+            /** SQL data type. */
+            DATA_TYPE,
 
-        /** Data source\ufffddependent data type name. */
-        TYPE_NAME,
+            /** Data source\ufffddependent data type name. */
+            TYPE_NAME,
 
-        /** Column size. */
-        COLUMN_SIZE,
+            /** Column size. */
+            COLUMN_SIZE,
 
-        /** The length in bytes of data transferred on fetch. */
-        BUFFER_LENGTH,
+            /** The length in bytes of data transferred on fetch. */
+            BUFFER_LENGTH,
 
-        /** The total number of significant digits to the right of the decimal point. */
-        DECIMAL_DIGITS,
+            /** The total number of significant digits to the right of the decimal point. */
+            DECIMAL_DIGITS,
 
-        /** Precision. */
-        NUM_PREC_RADIX,
+            /** Precision. */
+            NUM_PREC_RADIX,
 
-        /** Nullability of the data in column. */
-        NULLABLE,
+            /** Nullability of the data in column. */
+            NULLABLE,
 
-        /** A description of the column. */
-        REMARKS
+            /** A description of the column. */
+            REMARKS
+        };
     };
 }
 
@@ -74,7 +77,7 @@ namespace ignite
             ColumnMetadataQuery::ColumnMetadataQuery(diagnostic::Diagnosable& diag, 
                 Connection& connection, const std::string& schema,
                 const std::string& table, const std::string& column) :
-                Query(diag, COLUMN_METADATA),
+                Query(diag, QueryType::COLUMN_METADATA),
                 connection(connection),
                 schema(schema),
                 table(table),
@@ -112,14 +115,14 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult ColumnMetadataQuery::Execute()
+            SqlResult::Type ColumnMetadataQuery::Execute()
             {
                 if (executed)
                     Close();
 
-                SqlResult result = MakeRequestGetColumnsMeta();
+                SqlResult::Type result = MakeRequestGetColumnsMeta();
 
-                if (result == SQL_RESULT_SUCCESS)
+                if (result == SqlResult::AI_SUCCESS)
                 {
                     executed = true;
 
@@ -134,17 +137,17 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult ColumnMetadataQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
+            SqlResult::Type ColumnMetadataQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 app::ColumnBindingMap::iterator it;
 
@@ -153,75 +156,75 @@ namespace ignite
 
                 ++cursor;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult ColumnMetadataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
+            SqlResult::Type ColumnMetadataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 const meta::ColumnMeta& currentColumn = *cursor;
                 uint8_t columnType = currentColumn.GetDataType();
 
                 switch (columnIdx)
                 {
-                    case TABLE_CAT:
+                    case ResultColumn::TABLE_CAT:
                     {
                         buffer.PutNull();
                         break;
                     }
 
-                    case TABLE_SCHEM:
+                    case ResultColumn::TABLE_SCHEM:
                     {
                         buffer.PutString(currentColumn.GetSchemaName());
                         break;
                     }
 
-                    case TABLE_NAME:
+                    case ResultColumn::TABLE_NAME:
                     {
                         buffer.PutString(currentColumn.GetTableName());
                         break;
                     }
 
-                    case COLUMN_NAME:
+                    case ResultColumn::COLUMN_NAME:
                     {
                         buffer.PutString(currentColumn.GetColumnName());
                         break;
                     }
 
-                    case DATA_TYPE:
+                    case ResultColumn::DATA_TYPE:
                     {
                         buffer.PutInt16(type_traits::BinaryToSqlType(columnType));
                         break;
                     }
 
-                    case TYPE_NAME:
+                    case ResultColumn::TYPE_NAME:
                     {
                         buffer.PutString(type_traits::BinaryTypeToSqlTypeName(currentColumn.GetDataType()));
                         break;
                     }
 
-                    case COLUMN_SIZE:
+                    case ResultColumn::COLUMN_SIZE:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeColumnSize(columnType));
                         break;
                     }
 
-                    case BUFFER_LENGTH:
+                    case ResultColumn::BUFFER_LENGTH:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeTransferLength(columnType));
                         break;
                     }
 
-                    case DECIMAL_DIGITS:
+                    case ResultColumn::DECIMAL_DIGITS:
                     {
                         int32_t decDigits = type_traits::BinaryTypeDecimalDigits(columnType);
                         if (decDigits < 0)
@@ -231,19 +234,19 @@ namespace ignite
                         break;
                     }
 
-                    case NUM_PREC_RADIX:
+                    case ResultColumn::NUM_PREC_RADIX:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeNumPrecRadix(columnType));
                         break;
                     }
 
-                    case NULLABLE:
+                    case ResultColumn::NULLABLE:
                     {
                         buffer.PutInt16(type_traits::BinaryTypeNullability(columnType));
                         break;
                     }
 
-                    case REMARKS:
+                    case ResultColumn::REMARKS:
                     {
                         buffer.PutNull();
                         break;
@@ -253,16 +256,16 @@ namespace ignite
                         break;
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult ColumnMetadataQuery::Close()
+            SqlResult::Type ColumnMetadataQuery::Close()
             {
                 meta.clear();
 
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool ColumnMetadataQuery::DataAvailable() const
@@ -275,7 +278,7 @@ namespace ignite
                 return 0;
             }
 
-            SqlResult ColumnMetadataQuery::MakeRequestGetColumnsMeta()
+            SqlResult::Type ColumnMetadataQuery::MakeRequestGetColumnsMeta()
             {
                 QueryGetColumnsMetaRequest req(schema, table, column);
                 QueryGetColumnsMetaResponse rsp;
@@ -286,17 +289,17 @@ namespace ignite
                 }
                 catch (const IgniteError& err)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                    diag.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());
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 meta = rsp.GetMeta();
@@ -309,7 +312,7 @@ namespace ignite
                          << "\n[" << i << "] ColumnType:     " << meta[i].GetDataType());
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/data_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/data_query.cpp b/modules/platforms/cpp/odbc/src/query/data_query.cpp
index c9762ad..33e763f 100644
--- a/modules/platforms/cpp/odbc/src/query/data_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/data_query.cpp
@@ -29,7 +29,7 @@ namespace ignite
             DataQuery::DataQuery(diagnostic::Diagnosable& diag,
                 Connection& connection, const std::string& sql,
                 const app::ParameterBindingMap& params) :
-                Query(diag, DATA),
+                Query(diag, QueryType::DATA),
                 connection(connection),
                 sql(sql),
                 params(params)
@@ -42,13 +42,13 @@ namespace ignite
                 Close();
             }
 
-            SqlResult DataQuery::Execute()
+            SqlResult::Type DataQuery::Execute()
             {
                 if (cursor.get())
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query cursor is in open state already.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query cursor is in open state already.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 return MakeRequestExecute();
@@ -59,38 +59,38 @@ namespace ignite
                 return resultMeta;
             }
 
-            SqlResult DataQuery::FetchNextRow(app::ColumnBindingMap& columnBindings)
+            SqlResult::Type DataQuery::FetchNextRow(app::ColumnBindingMap& columnBindings)
             {
                 if (!cursor.get())
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (!cursor->HasData())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 cursor->Increment();
 
                 if (cursor->NeedDataUpdate())
                 {
-                    SqlResult result = MakeRequestFetch();
+                    SqlResult::Type result = MakeRequestFetch();
 
-                    if (result != SQL_RESULT_SUCCESS)
+                    if (result != SqlResult::AI_SUCCESS)
                         return result;
                 }
 
                 if (!cursor->HasData())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 Row* row = cursor->GetRow();
 
                 if (!row)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Unknown error.");
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, "Unknown error.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 for (int32_t i = 1; i < row->GetSize() + 1; ++i)
@@ -100,53 +100,53 @@ namespace ignite
                     if (it == columnBindings.end())
                         continue;
 
-                    SqlResult result = row->ReadColumnToBuffer(i, it->second);
+                    SqlResult::Type result = row->ReadColumnToBuffer(i, it->second);
 
-                    if (result == SQL_RESULT_ERROR)
+                    if (result == SqlResult::AI_ERROR)
                     {
-                        diag.AddStatusRecord(SQL_STATE_01S01_ERROR_IN_ROW, "Can not retrieve row column.", 0, i);
+                        diag.AddStatusRecord(SqlState::S01S01_ERROR_IN_ROW, "Can not retrieve row column.", 0, i);
 
-                        return SQL_RESULT_ERROR;
+                        return SqlResult::AI_ERROR;
                     }
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult DataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
+            SqlResult::Type DataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
             {
                 if (!cursor.get())
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 Row* row = cursor->GetRow();
 
                 if (!row)
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
-                SqlResult result = row->ReadColumnToBuffer(columnIdx, buffer);
+                SqlResult::Type result = row->ReadColumnToBuffer(columnIdx, buffer);
 
-                if (result == SQL_RESULT_ERROR)
+                if (result == SqlResult::AI_ERROR)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Unknown column type.");
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, "Unknown column type.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 return result;
             }
 
-            SqlResult DataQuery::Close()
+            SqlResult::Type DataQuery::Close()
             {
                 if (!cursor.get())
-                    return SQL_RESULT_SUCCESS;
+                    return SqlResult::AI_SUCCESS;
 
-                SqlResult result = MakeRequestClose();
+                SqlResult::Type result = MakeRequestClose();
 
-                if (result == SQL_RESULT_SUCCESS)
+                if (result == SqlResult::AI_SUCCESS)
                 {
                     cursor.reset();
 
@@ -167,7 +167,7 @@ namespace ignite
                 return 0;
             }
 
-            SqlResult DataQuery::MakeRequestExecute()
+            SqlResult::Type DataQuery::MakeRequestExecute()
             {
                 const std::string& cacheName = connection.GetCache();
 
@@ -180,18 +180,18 @@ namespace ignite
                 }
                 catch (const IgniteError& err)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                    diag.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());
 
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 cursor.reset(new Cursor(rsp.GetQueryId()));
@@ -207,10 +207,10 @@ namespace ignite
                         <<  "\n[" << i << "] ColumnType:     " << rsp.GetMeta()[i].GetDataType());
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult DataQuery::MakeRequestClose()
+            SqlResult::Type DataQuery::MakeRequestClose()
             {
                 QueryCloseRequest req(cursor->GetQueryId());
                 QueryCloseResponse rsp;
@@ -221,26 +221,26 @@ namespace ignite
                 }
                 catch (const IgniteError& err)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                    diag.AddStatusRecord(SqlState::SHYT01_CONNECTIOIN_TIMEOUT, err.GetText());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 LOG_MSG("Query id: " << rsp.GetQueryId());
 
-                if (rsp.GetStatus() != RESPONSE_STATUS_SUCCESS)
+                if (rsp.GetStatus() != ResponseStatus::SUCCESS)
                 {
                     LOG_MSG("Error: " << rsp.GetError());
 
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult DataQuery::MakeRequestFetch()
+            SqlResult::Type DataQuery::MakeRequestFetch()
             {
                 std::auto_ptr<ResultPage> resultPage(new ResultPage());
 
@@ -253,23 +253,23 @@ namespace ignite
                 }
                 catch (const IgniteError& err)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                    diag.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());
 
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 cursor->UpdateData(resultPage);
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/foreign_keys_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/foreign_keys_query.cpp b/modules/platforms/cpp/odbc/src/query/foreign_keys_query.cpp
index 5813767..4ca7709 100644
--- a/modules/platforms/cpp/odbc/src/query/foreign_keys_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/foreign_keys_query.cpp
@@ -32,7 +32,7 @@ namespace ignite
                 const std::string& primaryCatalog, const std::string& primarySchema,
                 const std::string& primaryTable, const std::string& foreignCatalog,
                 const std::string& foreignSchema, const std::string& foreignTable) :
-                Query(diag, FOREIGN_KEYS),
+                Query(diag, QueryType::FOREIGN_KEYS),
                 connection(connection),
                 primaryCatalog(primaryCatalog),
                 primarySchema(primarySchema),
@@ -74,11 +74,11 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult ForeignKeysQuery::Execute()
+            SqlResult::Type ForeignKeysQuery::Execute()
             {
                 executed = true;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             const meta::ColumnMetaVector & ForeignKeysQuery::GetMeta() const
@@ -86,35 +86,35 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult ForeignKeysQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
+            SqlResult::Type ForeignKeysQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
             }
 
-            SqlResult ForeignKeysQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
+            SqlResult::Type ForeignKeysQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
             }
 
-            SqlResult ForeignKeysQuery::Close()
+            SqlResult::Type ForeignKeysQuery::Close()
             {
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool ForeignKeysQuery::DataAvailable() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/primary_keys_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/primary_keys_query.cpp b/modules/platforms/cpp/odbc/src/query/primary_keys_query.cpp
index a24670d..ef99db3 100644
--- a/modules/platforms/cpp/odbc/src/query/primary_keys_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/primary_keys_query.cpp
@@ -24,25 +24,28 @@
 
 namespace
 {
-    enum ResultColumn
+    struct ResultColumn
     {
-        /** Catalog name. NULL if not applicable to the data source. */
-        TABLE_CAT = 1,
+        enum Type
+        {
+            /** Catalog name. NULL if not applicable to the data source. */
+            TABLE_CAT = 1,
 
-        /** Schema name. NULL if not applicable to the data source. */
-        TABLE_SCHEM,
+            /** Schema name. NULL if not applicable to the data source. */
+            TABLE_SCHEM,
 
-        /** Table name. */
-        TABLE_NAME,
+            /** Table name. */
+            TABLE_NAME,
 
-        /** Column name. */
-        COLUMN_NAME,
+            /** Column name. */
+            COLUMN_NAME,
 
-        /** Column sequence number in key. */
-        KEY_SEQ,
+            /** Column sequence number in key. */
+            KEY_SEQ,
 
-        /** Primary key name. */
-        PK_NAME
+            /** Primary key name. */
+            PK_NAME
+        };
     };
 }
 
@@ -55,7 +58,7 @@ namespace ignite
             PrimaryKeysQuery::PrimaryKeysQuery(diagnostic::Diagnosable& diag,
                 Connection& connection, const std::string& catalog,
                 const std::string& schema, const std::string& table) :
-                Query(diag, PRIMARY_KEYS),
+                Query(diag, QueryType::PRIMARY_KEYS),
                 connection(connection),
                 catalog(catalog),
                 schema(schema),
@@ -86,7 +89,7 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult PrimaryKeysQuery::Execute()
+            SqlResult::Type PrimaryKeysQuery::Execute()
             {
                 if (executed)
                     Close();
@@ -97,7 +100,7 @@ namespace ignite
 
                 cursor = meta.begin();
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             const meta::ColumnMetaVector & PrimaryKeysQuery::GetMeta() const
@@ -105,17 +108,17 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult PrimaryKeysQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
+            SqlResult::Type PrimaryKeysQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 app::ColumnBindingMap::iterator it;
 
@@ -124,56 +127,56 @@ namespace ignite
 
                 ++cursor;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult PrimaryKeysQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
+            SqlResult::Type PrimaryKeysQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 const meta::PrimaryKeyMeta& currentColumn = *cursor;
 
                 switch (columnIdx)
                 {
-                    case TABLE_CAT:
+                    case ResultColumn::TABLE_CAT:
                     {
                         buffer.PutString(currentColumn.GetCatalogName());
                         break;
                     }
 
-                    case TABLE_SCHEM:
+                    case ResultColumn::TABLE_SCHEM:
                     {
                         buffer.PutString(currentColumn.GetSchemaName());
                         break;
                     }
 
-                    case TABLE_NAME:
+                    case ResultColumn::TABLE_NAME:
                     {
                         buffer.PutString(currentColumn.GetTableName());
                         break;
                     }
 
-                    case COLUMN_NAME:
+                    case ResultColumn::COLUMN_NAME:
                     {
                         buffer.PutString(currentColumn.GetColumnName());
                         break;
                     }
 
-                    case KEY_SEQ:
+                    case ResultColumn::KEY_SEQ:
                     {
                         buffer.PutInt16(currentColumn.GetKeySeq());
                         break;
                     }
 
-                    case PK_NAME:
+                    case ResultColumn::PK_NAME:
                     {
                         buffer.PutString(currentColumn.GetKeyName());
                         break;
@@ -183,16 +186,16 @@ namespace ignite
                         break;
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult PrimaryKeysQuery::Close()
+            SqlResult::Type PrimaryKeysQuery::Close()
             {
                 meta.clear();
 
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool PrimaryKeysQuery::DataAvailable() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/special_columns_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/special_columns_query.cpp b/modules/platforms/cpp/odbc/src/query/special_columns_query.cpp
index f507c52..b0f534c 100644
--- a/modules/platforms/cpp/odbc/src/query/special_columns_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/special_columns_query.cpp
@@ -29,7 +29,7 @@ namespace ignite
             SpecialColumnsQuery::SpecialColumnsQuery(diagnostic::Diagnosable& diag,
                 int16_t type, const std::string& catalog, const std::string& schema,
                 const std::string& table, int16_t scope, int16_t nullable) :
-                Query(diag, SPECIAL_COLUMNS),
+                Query(diag, QueryType::SPECIAL_COLUMNS),
                 type(type),
                 catalog(catalog),
                 schema(schema),
@@ -64,11 +64,11 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult SpecialColumnsQuery::Execute()
+            SqlResult::Type SpecialColumnsQuery::Execute()
             {
                 executed = true;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             const meta::ColumnMetaVector& SpecialColumnsQuery::GetMeta() const
@@ -76,35 +76,35 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult SpecialColumnsQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
+            SqlResult::Type SpecialColumnsQuery::FetchNextRow(app::ColumnBindingMap & columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
             }
 
-            SqlResult SpecialColumnsQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
+            SqlResult::Type SpecialColumnsQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer& buffer)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
-                return SQL_RESULT_NO_DATA;
+                return SqlResult::AI_NO_DATA;
             }
 
-            SqlResult SpecialColumnsQuery::Close()
+            SqlResult::Type SpecialColumnsQuery::Close()
             {
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool SpecialColumnsQuery::DataAvailable() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/5c4b7b03/modules/platforms/cpp/odbc/src/query/table_metadata_query.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/query/table_metadata_query.cpp b/modules/platforms/cpp/odbc/src/query/table_metadata_query.cpp
index 4fd5f7b..401a1d2 100644
--- a/modules/platforms/cpp/odbc/src/query/table_metadata_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/table_metadata_query.cpp
@@ -25,22 +25,25 @@
 
 namespace
 {
-    enum ResultColumn
+    struct ResultColumn
     {
-        /** Catalog name. NULL if not applicable to the data source. */
-        TABLE_CAT = 1,
+        enum Type
+        {
+            /** Catalog name. NULL if not applicable to the data source. */
+            TABLE_CAT = 1,
 
-        /** Schema name. NULL if not applicable to the data source. */
-        TABLE_SCHEM,
+            /** Schema name. NULL if not applicable to the data source. */
+            TABLE_SCHEM,
 
-        /** Table name. */
-        TABLE_NAME,
+            /** Table name. */
+            TABLE_NAME,
 
-        /** Table type. */
-        TABLE_TYPE,
+            /** Table type. */
+            TABLE_TYPE,
 
-        /** A description of the column. */
-        REMARKS
+            /** A description of the column. */
+            REMARKS
+        };
     };
 }
 
@@ -53,7 +56,7 @@ namespace ignite
             TableMetadataQuery::TableMetadataQuery(diagnostic::Diagnosable& diag,
                 Connection& connection, const std::string& catalog,const std::string& schema,
                 const std::string& table, const std::string& tableType) :
-                Query(diag, TABLE_METADATA),
+                Query(diag, QueryType::TABLE_METADATA),
                 connection(connection),
                 catalog(catalog),
                 schema(schema),
@@ -85,14 +88,14 @@ namespace ignite
                 // No-op.
             }
 
-            SqlResult TableMetadataQuery::Execute()
+            SqlResult::Type TableMetadataQuery::Execute()
             {
                 if (executed)
                     Close();
 
-                SqlResult result = MakeRequestGetTablesMeta();
+                SqlResult::Type result = MakeRequestGetTablesMeta();
 
-                if (result == SQL_RESULT_SUCCESS)
+                if (result == SqlResult::AI_SUCCESS)
                 {
                     executed = true;
 
@@ -107,17 +110,17 @@ namespace ignite
                 return columnsMeta;
             }
 
-            SqlResult TableMetadataQuery::FetchNextRow(app::ColumnBindingMap& columnBindings)
+            SqlResult::Type TableMetadataQuery::FetchNextRow(app::ColumnBindingMap& columnBindings)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 app::ColumnBindingMap::iterator it;
 
@@ -126,50 +129,50 @@ namespace ignite
 
                 ++cursor;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult TableMetadataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
+            SqlResult::Type TableMetadataQuery::GetColumn(uint16_t columnIdx, app::ApplicationDataBuffer & buffer)
             {
                 if (!executed)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HY010_SEQUENCE_ERROR, "Query was not executed.");
+                    diag.AddStatusRecord(SqlState::SHY010_SEQUENCE_ERROR, "Query was not executed.");
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 if (cursor == meta.end())
-                    return SQL_RESULT_NO_DATA;
+                    return SqlResult::AI_NO_DATA;
 
                 const meta::TableMeta& currentColumn = *cursor;
 
                 switch (columnIdx)
                 {
-                    case TABLE_CAT:
+                    case ResultColumn::TABLE_CAT:
                     {
                         buffer.PutString(currentColumn.GetCatalogName());
                         break;
                     }
 
-                    case TABLE_SCHEM:
+                    case ResultColumn::TABLE_SCHEM:
                     {
                         buffer.PutString(currentColumn.GetSchemaName());
                         break;
                     }
 
-                    case TABLE_NAME:
+                    case ResultColumn::TABLE_NAME:
                     {
                         buffer.PutString(currentColumn.GetTableName());
                         break;
                     }
 
-                    case TABLE_TYPE:
+                    case ResultColumn::TABLE_TYPE:
                     {
                         buffer.PutString(currentColumn.GetTableType());
                         break;
                     }
 
-                    case REMARKS:
+                    case ResultColumn::REMARKS:
                     {
                         buffer.PutNull();
                         break;
@@ -179,16 +182,16 @@ namespace ignite
                         break;
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
-            SqlResult TableMetadataQuery::Close()
+            SqlResult::Type TableMetadataQuery::Close()
             {
                 meta.clear();
 
                 executed = false;
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
 
             bool TableMetadataQuery::DataAvailable() const
@@ -201,7 +204,7 @@ namespace ignite
                 return 0;
             }
 
-            SqlResult TableMetadataQuery::MakeRequestGetTablesMeta()
+            SqlResult::Type TableMetadataQuery::MakeRequestGetTablesMeta()
             {
                 QueryGetTablesMetaRequest req(catalog, schema, table, tableType);
                 QueryGetTablesMetaResponse rsp;
@@ -212,18 +215,18 @@ namespace ignite
                 }
                 catch (const IgniteError& err)
                 {
-                    diag.AddStatusRecord(SQL_STATE_HYT01_CONNECTIOIN_TIMEOUT, err.GetText());
+                    diag.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());
 
-                    diag.AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, rsp.GetError());
+                    diag.AddStatusRecord(SqlState::SHY000_GENERAL_ERROR, rsp.GetError());
 
-                    return SQL_RESULT_ERROR;
+                    return SqlResult::AI_ERROR;
                 }
 
                 meta = rsp.GetMeta();
@@ -236,7 +239,7 @@ namespace ignite
                          << "\n[" << i << "] TableType:   " << meta[i].GetTableType());
                 }
 
-                return SQL_RESULT_SUCCESS;
+                return SqlResult::AI_SUCCESS;
             }
         }
     }