IGNITE-5263: Renamed ODBC connection param "cache" to schema

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

Branch: refs/heads/ignite-5075
Commit: 2ba6ab42bea0b1fff8fa4a7f5e676f04b6c14783
Parents: da37720
Author: Igor Sapego <[email protected]>
Authored: Mon Jun 5 16:28:58 2017 +0300
Committer: Igor Sapego <[email protected]>
Committed: Mon Jun 5 16:28:58 2017 +0300

----------------------------------------------------------------------
 .../processors/odbc/odbc/OdbcMessageParser.java | 12 ++--
 .../odbc/odbc/OdbcQueryExecuteRequest.java      | 16 ++---
 .../odbc/OdbcQueryGetColumnsMetaRequest.java    | 44 ++++++-------
 .../odbc/OdbcQueryGetParamsMetaRequest.java     | 15 +++--
 .../odbc/odbc/OdbcRequestHandler.java           | 68 ++++++++++----------
 .../project/vs/odbc-test.vcxproj.filters        |  4 +-
 .../cpp/odbc-test/src/api_robustness_test.cpp   | 54 ++++++++--------
 .../cpp/odbc-test/src/configuration_test.cpp    | 32 ++++-----
 .../cpp/odbc-test/src/queries_test.cpp          | 34 +++++-----
 .../odbc-test/src/sql_test_suite_fixture.cpp    |  2 +-
 .../include/ignite/odbc/config/configuration.h  | 24 +++----
 .../cpp/odbc/include/ignite/odbc/connection.h   |  6 +-
 .../cpp/odbc/include/ignite/odbc/message.h      | 30 ++++-----
 .../odbc/system/ui/dsn_configuration_window.h   | 12 ++--
 .../src/system/ui/dsn_configuration_window.cpp  | 18 +++---
 .../cpp/odbc/src/config/configuration.cpp       |  4 +-
 modules/platforms/cpp/odbc/src/connection.cpp   |  4 +-
 modules/platforms/cpp/odbc/src/dsn_config.cpp   |  4 +-
 .../odbc/src/query/column_metadata_query.cpp    |  2 +-
 .../platforms/cpp/odbc/src/query/data_query.cpp | 14 ++--
 modules/platforms/cpp/odbc/src/statement.cpp    | 12 ++--
 21 files changed, 208 insertions(+), 203 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java
index 02e8676..91ed139 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java
@@ -83,7 +83,7 @@ public class OdbcMessageParser implements 
SqlListenerMessageParser {
 
         switch (cmd) {
             case OdbcRequest.QRY_EXEC: {
-                String cache = reader.readString();
+                String schema = reader.readString();
                 String sql = reader.readString();
                 int argsNum = reader.readInt();
 
@@ -92,7 +92,7 @@ public class OdbcMessageParser implements 
SqlListenerMessageParser {
                 for (int i = 0; i < argsNum; ++i)
                     params[i] = SqlListenerUtils.readObject(reader, true);
 
-                res = new OdbcQueryExecuteRequest(cache, sql, params);
+                res = new OdbcQueryExecuteRequest(schema, sql, params);
 
                 break;
             }
@@ -115,11 +115,11 @@ public class OdbcMessageParser implements 
SqlListenerMessageParser {
             }
 
             case OdbcRequest.META_COLS: {
-                String cache = reader.readString();
+                String schema = reader.readString();
                 String table = reader.readString();
                 String column = reader.readString();
 
-                res = new OdbcQueryGetColumnsMetaRequest(cache, table, column);
+                res = new OdbcQueryGetColumnsMetaRequest(schema, table, 
column);
 
                 break;
             }
@@ -136,10 +136,10 @@ public class OdbcMessageParser implements 
SqlListenerMessageParser {
             }
 
             case OdbcRequest.META_PARAMS: {
-                String cacheName = reader.readString();
+                String schema = reader.readString();
                 String sqlQuery = reader.readString();
 
-                res = new OdbcQueryGetParamsMetaRequest(cacheName, sqlQuery);
+                res = new OdbcQueryGetParamsMetaRequest(schema, sqlQuery);
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryExecuteRequest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryExecuteRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryExecuteRequest.java
index dd674d2..8bb61dc 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryExecuteRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryExecuteRequest.java
@@ -26,8 +26,8 @@ import org.jetbrains.annotations.Nullable;
  * SQL listener query execute request.
  */
 public class OdbcQueryExecuteRequest extends OdbcRequest {
-    /** Cache name. */
-    private final String cacheName;
+    /** Schema. */
+    private final String schema;
 
     /** Sql query. */
     @GridToStringInclude(sensitive = true)
@@ -38,14 +38,14 @@ public class OdbcQueryExecuteRequest extends OdbcRequest {
     private final Object[] args;
 
     /**
-     * @param cacheName Cache name.
+     * @param schema Schema.
      * @param sqlQry SQL query.
      * @param args Arguments list.
      */
-    public OdbcQueryExecuteRequest(String cacheName, String sqlQry, Object[] 
args) {
+    public OdbcQueryExecuteRequest(String schema, String sqlQry, Object[] 
args) {
         super(QRY_EXEC);
 
-        this.cacheName = cacheName.isEmpty() ? null : cacheName;
+        this.schema = schema.isEmpty() ? null : schema;
         this.sqlQry = sqlQry;
         this.args = args;
     }
@@ -65,10 +65,10 @@ public class OdbcQueryExecuteRequest extends OdbcRequest {
     }
 
     /**
-     * @return Cache name.
+     * @return Schema.
      */
-    @Nullable public String cacheName() {
-        return cacheName;
+    @Nullable public String schema() {
+        return schema;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetColumnsMetaRequest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetColumnsMetaRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetColumnsMetaRequest.java
index b60a9e3..db00e63 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetColumnsMetaRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetColumnsMetaRequest.java
@@ -24,47 +24,47 @@ import org.jetbrains.annotations.Nullable;
  * ODBC query get columns meta request.
  */
 public class OdbcQueryGetColumnsMetaRequest extends OdbcRequest {
-    /** Cache name. */
-    private final String cacheName;
+    /** Schema pattern. */
+    private final String schemaPattern;
 
-    /** Table name. */
-    private final String tableName;
+    /** Table pattern. */
+    private final String tablePattern;
 
-    /** Column name. */
-    private final String columnName;
+    /** Column pattern. */
+    private final String columnPattern;
 
     /**
-     * @param cacheName Cache name.
-     * @param tableName Table name.
-     * @param columnName Column name.
+     * @param schemaPattern Schema pattern.
+     * @param tablePattern Table pattern.
+     * @param columnPattern Column pattern.
      */
-    public OdbcQueryGetColumnsMetaRequest(String cacheName, String tableName, 
String columnName) {
+    public OdbcQueryGetColumnsMetaRequest(String schemaPattern, String 
tablePattern, String columnPattern) {
         super(META_COLS);
 
-        this.cacheName = cacheName;
-        this.tableName = tableName;
-        this.columnName = columnName;
+        this.schemaPattern = schemaPattern;
+        this.tablePattern = tablePattern;
+        this.columnPattern = columnPattern;
     }
 
     /**
-     * @return Cache name.
+     * @return Schema pattern.
      */
-    @Nullable public String cacheName() {
-        return cacheName;
+    @Nullable public String schemaPattern() {
+        return schemaPattern;
     }
 
     /**
-     * @return Table name.
+     * @return Table pattern.
      */
-    public String tableName() {
-        return tableName;
+    public String tablePattern() {
+        return tablePattern;
     }
 
     /**
-     * @return Column name.
+     * @return Column pattern.
      */
-    public String columnName() {
-        return columnName;
+    public String columnPattern() {
+        return columnPattern;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetParamsMetaRequest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetParamsMetaRequest.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetParamsMetaRequest.java
index 1d468b1..0ae2916 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetParamsMetaRequest.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQueryGetParamsMetaRequest.java
@@ -23,19 +23,20 @@ import org.apache.ignite.internal.util.typedef.internal.S;
  * ODBC query get params meta request.
  */
 public class OdbcQueryGetParamsMetaRequest extends OdbcRequest {
-    /** Cache. */
-    private final String cacheName;
+    /** Schema. */
+    private final String schema;
 
     /** Query. */
     private final String query;
 
     /**
+     * @param schema Schema.
      * @param query SQL Query.
      */
-    public OdbcQueryGetParamsMetaRequest(String cacheName, String query) {
+    public OdbcQueryGetParamsMetaRequest(String schema, String query) {
         super(META_PARAMS);
 
-        this.cacheName = cacheName;
+        this.schema = schema;
         this.query = query;
     }
 
@@ -47,10 +48,10 @@ public class OdbcQueryGetParamsMetaRequest extends 
OdbcRequest {
     }
 
     /**
-     * @return Cache name.
+     * @return Schema name.
      */
-    public String cacheName() {
-        return cacheName;
+    public String schema() {
+        return schema;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
index e1b421b..a520d96 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
-import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
@@ -40,6 +39,7 @@ import 
org.apache.ignite.internal.processors.odbc.SqlListenerRequestHandler;
 import org.apache.ignite.internal.processors.odbc.SqlListenerResponse;
 import org.apache.ignite.internal.processors.odbc.odbc.escape.OdbcEscapeUtils;
 import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
+import org.apache.ignite.internal.processors.query.GridQueryIndexing;
 import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.typedef.F;
@@ -173,20 +173,9 @@ public class OdbcRequestHandler implements 
SqlListenerRequestHandler {
 
             qry.setDistributedJoins(distributedJoins);
             qry.setEnforceJoinOrder(enforceJoinOrder);
+            qry.setSchema(req.schema());
 
-            IgniteCache<Object, Object> cache0 = 
ctx.grid().cache(req.cacheName());
-
-            if (cache0 == null)
-                return new OdbcResponse(SqlListenerResponse.STATUS_FAILED,
-                    "Cache doesn't exist (did you configure it?): " + 
req.cacheName());
-
-            IgniteCache<Object, Object> cache = cache0.withKeepBinary();
-
-            if (cache == null)
-                return new OdbcResponse(SqlListenerResponse.STATUS_FAILED,
-                    "Can not get cache with keep binary: " + req.cacheName());
-
-            QueryCursor qryCur = cache.query(qry);
+            QueryCursor qryCur = ctx.query().querySqlFieldsNoCache(qry, true);
 
             qryCursors.put(qryId, new IgniteBiTuple<QueryCursor, 
Iterator>(qryCur, null));
 
@@ -290,38 +279,47 @@ public class OdbcRequestHandler implements 
SqlListenerRequestHandler {
         try {
             List<OdbcColumnMeta> meta = new ArrayList<>();
 
-            String cacheName;
-            String tableName;
+            String schemaPattern;
+            String tablePattern;
 
-            if (req.tableName().contains(".")) {
+            if (req.tablePattern().contains(".")) {
                 // Parsing two-part table name.
-                String[] parts = req.tableName().split("\\.");
+                String[] parts = req.tablePattern().split("\\.");
 
-                cacheName = OdbcUtils.removeQuotationMarksIfNeeded(parts[0]);
+                schemaPattern = 
OdbcUtils.removeQuotationMarksIfNeeded(parts[0]);
 
-                tableName = parts[1];
+                tablePattern = parts[1];
             }
             else {
-                cacheName = 
OdbcUtils.removeQuotationMarksIfNeeded(req.cacheName());
+                schemaPattern = 
OdbcUtils.removeQuotationMarksIfNeeded(req.schemaPattern());
 
-                tableName = req.tableName();
+                tablePattern = req.tablePattern();
             }
 
-            Collection<GridQueryTypeDescriptor> tablesMeta = 
ctx.query().types(cacheName);
+            GridQueryIndexing indexing = ctx.query().getIndexing();
+
+            for (String cacheName : ctx.cache().cacheNames()) {
+                String cacheSchema = indexing.schema(cacheName);
 
-            for (GridQueryTypeDescriptor table : tablesMeta) {
-                if (!matches(table.name(), tableName))
+                if (!matches(cacheSchema, schemaPattern))
                     continue;
 
-                for (Map.Entry<String, Class<?>> field : 
table.fields().entrySet()) {
-                    if (!matches(field.getKey(), req.columnName()))
+                Collection<GridQueryTypeDescriptor> tablesMeta = 
ctx.query().types(cacheName);
+
+                for (GridQueryTypeDescriptor table : tablesMeta) {
+                    if (!matches(table.name(), tablePattern))
                         continue;
 
-                    OdbcColumnMeta columnMeta = new 
OdbcColumnMeta(req.cacheName(), table.name(),
+                    for (Map.Entry<String, Class<?>> field : 
table.fields().entrySet()) {
+                        if (!matches(field.getKey(), req.columnPattern()))
+                            continue;
+
+                    OdbcColumnMeta columnMeta = new 
OdbcColumnMeta(cacheSchema, table.name(),
                         field.getKey(), field.getValue());
 
-                    if (!meta.contains(columnMeta))
-                        meta.add(columnMeta);
+                        if (!meta.contains(columnMeta))
+                            meta.add(columnMeta);
+                    }
                 }
             }
 
@@ -346,11 +344,15 @@ public class OdbcRequestHandler implements 
SqlListenerRequestHandler {
         try {
             List<OdbcTableMeta> meta = new ArrayList<>();
 
-            String realSchema = 
OdbcUtils.removeQuotationMarksIfNeeded(req.schema());
+            String schemaPattern = 
OdbcUtils.removeQuotationMarksIfNeeded(req.schema());
+
+            GridQueryIndexing indexing = ctx.query().getIndexing();
 
             for (String cacheName : ctx.cache().cacheNames())
             {
-                if (!matches(cacheName, realSchema))
+                String cacheSchema = indexing.schema(cacheName);
+
+                if (!matches(cacheSchema, schemaPattern))
                     continue;
 
                 Collection<GridQueryTypeDescriptor> tablesMeta = 
ctx.query().types(cacheName);
@@ -388,7 +390,7 @@ public class OdbcRequestHandler implements 
SqlListenerRequestHandler {
      */
     private SqlListenerResponse getParamsMeta(OdbcQueryGetParamsMetaRequest 
req) {
         try {
-            PreparedStatement stmt = 
ctx.query().prepareNativeStatement(req.cacheName(), req.query());
+            PreparedStatement stmt = 
ctx.query().getIndexing().prepareNativeStatement(req.schema(), req.query());
 
             ParameterMetaData pmd = stmt.getParameterMetaData();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc-test/project/vs/odbc-test.vcxproj.filters
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc-test/project/vs/odbc-test.vcxproj.filters 
b/modules/platforms/cpp/odbc-test/project/vs/odbc-test.vcxproj.filters
index a344df9..65f2ebf 100644
--- a/modules/platforms/cpp/odbc-test/project/vs/odbc-test.vcxproj.filters
+++ b/modules/platforms/cpp/odbc-test/project/vs/odbc-test.vcxproj.filters
@@ -155,6 +155,8 @@
     <None Include="..\..\config\queries-default.xml">
       <Filter>Configs</Filter>
     </None>
-    <None Include="..\..\config\queries-test-default.xml" />
+    <None Include="..\..\config\queries-test-default.xml">
+      <Filter>Configs</Filter>
+    </None>
   </ItemGroup>
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp 
b/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
index 3681ea1..82f7274 100644
--- a/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
@@ -154,7 +154,7 @@ struct ApiRobustnessTestSuiteFixture
      */
     void CheckFetchScrollUnsupportedOrientation(SQLUSMALLINT orientation)
     {
-        Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+        Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
         SQLRETURN ret;
 
@@ -293,7 +293,7 @@ BOOST_AUTO_TEST_CASE(TestSQLDriverConnect)
 
     Prepare();
 
-    SQLCHAR connectStr[] = "DRIVER={Apache 
Ignite};address=127.0.0.1:11110;cache=cache";
+    SQLCHAR connectStr[] = "DRIVER={Apache 
Ignite};address=127.0.0.1:11110;schema=cache";
 
     SQLCHAR outStr[ODBC_BUFFER_SIZE];
     SQLSMALLINT outStrLen;
@@ -332,7 +332,7 @@ BOOST_AUTO_TEST_CASE(TestSQLConnect)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR buffer[ODBC_BUFFER_SIZE];
     SQLSMALLINT resLen = 0;
@@ -363,7 +363,7 @@ BOOST_AUTO_TEST_CASE(TestSQLPrepare)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -395,7 +395,7 @@ BOOST_AUTO_TEST_CASE(TestSQLExecDirect)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE(TestSQLExtendedFetch)
         testCache.Put(i, obj);
     }
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -476,7 +476,7 @@ BOOST_AUTO_TEST_CASE(TestSQLNumResultCols)
         testCache.Put(i, obj);
     }
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -500,7 +500,7 @@ BOOST_AUTO_TEST_CASE(TestSQLTables)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR catalogName[] = "";
     SQLCHAR schemaName[] = "";
@@ -528,7 +528,7 @@ BOOST_AUTO_TEST_CASE(TestSQLColumns)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR catalogName[] = "";
     SQLCHAR schemaName[] = "";
@@ -556,7 +556,7 @@ BOOST_AUTO_TEST_CASE(TestSQLBindCol)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLINTEGER ind1;
     SQLLEN len1 = 0;
@@ -597,7 +597,7 @@ BOOST_AUTO_TEST_CASE(TestSQLBindParameter)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLINTEGER ind1;
     SQLLEN len1 = 0;
@@ -644,7 +644,7 @@ BOOST_AUTO_TEST_CASE(TestSQLNativeSql)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
     SQLCHAR buffer[ODBC_BUFFER_SIZE];
@@ -679,7 +679,7 @@ BOOST_AUTO_TEST_CASE(TestSQLColAttribute)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -719,7 +719,7 @@ BOOST_AUTO_TEST_CASE(TestSQLDescribeCol)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -755,7 +755,7 @@ BOOST_AUTO_TEST_CASE(TestSQLRowCount)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -778,7 +778,7 @@ BOOST_AUTO_TEST_CASE(TestSQLForeignKeys)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR catalogName[] = "";
     SQLCHAR schemaName[] = "cache";
@@ -863,7 +863,7 @@ BOOST_AUTO_TEST_CASE(TestSQLGetStmtAttr)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR buffer[ODBC_BUFFER_SIZE];
     SQLINTEGER resLen = 0;
@@ -884,7 +884,7 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttr)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLULEN val = 1;
 
@@ -903,7 +903,7 @@ BOOST_AUTO_TEST_CASE(TestSQLPrimaryKeys)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR catalogName[] = "";
     SQLCHAR schemaName[] = "cache";
@@ -929,7 +929,7 @@ BOOST_AUTO_TEST_CASE(TestSQLNumParams)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -953,7 +953,7 @@ BOOST_AUTO_TEST_CASE(TestSQLGetDiagField)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     // Should fail.
     SQLRETURN ret = SQLGetTypeInfo(stmt, SQL_INTERVAL_MONTH);
@@ -979,7 +979,7 @@ BOOST_AUTO_TEST_CASE(TestSQLGetDiagRec)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     // Should fail.
     SQLRETURN ret = SQLGetTypeInfo(stmt, SQL_INTERVAL_MONTH);
@@ -1018,7 +1018,7 @@ BOOST_AUTO_TEST_CASE(TestSQLGetData)
         testCache.Put(i, obj);
     }
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR sql[] = "SELECT strField FROM TestType";
 
@@ -1062,7 +1062,7 @@ BOOST_AUTO_TEST_CASE(TestSQLGetEnvAttr)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR buffer[ODBC_BUFFER_SIZE];
     SQLINTEGER resLen = 0;
@@ -1083,7 +1083,7 @@ BOOST_AUTO_TEST_CASE(TestSQLSpecialColumns)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR catalogName[] = "";
     SQLCHAR schemaName[] = "cache";
@@ -1152,7 +1152,7 @@ BOOST_AUTO_TEST_CASE(TestSQLError)
     // There are no checks because we do not really care what is the result of 
these
     // calls as long as they do not cause segmentation fault.
 
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLCHAR state[6] = { 0 };
     SQLINTEGER nativeCode = 0;
@@ -1194,7 +1194,7 @@ BOOST_AUTO_TEST_CASE(TestSQLError)
 
 BOOST_AUTO_TEST_CASE(TestSQLDiagnosticRecords)
 {
-    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;cache=cache");
+    Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
     SQLHANDLE hnd;
     SQLRETURN ret;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc-test/src/configuration_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/configuration_test.cpp 
b/modules/platforms/cpp/odbc-test/src/configuration_test.cpp
index ecf3c4b..a2cd280 100644
--- a/modules/platforms/cpp/odbc-test/src/configuration_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/configuration_test.cpp
@@ -35,7 +35,7 @@ namespace
     const std::string testDriverName = "Ignite Driver";
     const std::string testServerHost = "testhost.com";
     const uint16_t testServerPort = 4242;
-    const std::string testCacheName = "TestCache";
+    const std::string testSchemaName = "TestSchema";
     const std::string testDsn = "Ignite DSN";
     const int32_t testPageSize = 4321;
     const bool testDistributedJoins = true;
@@ -113,7 +113,7 @@ void CheckConnectionConfig(const Configuration& cfg)
     BOOST_CHECK_EQUAL(cfg.GetHost(), testServerHost);
     BOOST_CHECK_EQUAL(cfg.GetTcpPort(), testServerPort);
     BOOST_CHECK_EQUAL(cfg.GetAddress(), testAddress);
-    BOOST_CHECK_EQUAL(cfg.GetCache(), testCacheName);
+    BOOST_CHECK_EQUAL(cfg.GetSchema(), testSchemaName);
     BOOST_CHECK_EQUAL(cfg.GetDsn(), std::string());
     BOOST_CHECK_EQUAL(cfg.GetPageSize(), testPageSize);
     BOOST_CHECK_EQUAL(cfg.IsDistributedJoins(), testDistributedJoins);
@@ -122,11 +122,11 @@ void CheckConnectionConfig(const Configuration& cfg)
     std::stringstream constructor;
 
     constructor << "address=" << testAddress << ';'
-                << "cache=" << testCacheName << ';'
                 << "distributed_joins=" << (testDistributedJoins ? "true" : 
"false") << ';'
                 << "driver={" << testDriverName << "};"
                 << "enforce_join_order=" << (testEnforceJoinOrder ? "true" : 
"false") << ';'
-                << "page_size=" << testPageSize << ';';
+                << "page_size=" << testPageSize << ';'
+                << "schema=" << testSchemaName << ';';
 
     const std::string& expectedStr = constructor.str();
 
@@ -137,7 +137,7 @@ void CheckDsnConfig(const Configuration& cfg)
 {
     BOOST_CHECK_EQUAL(cfg.GetDriver(), testDriverName);
     BOOST_CHECK_EQUAL(cfg.GetDsn(), testDsn);
-    BOOST_CHECK_EQUAL(cfg.GetCache(), Configuration::DefaultValue::cache);
+    BOOST_CHECK_EQUAL(cfg.GetSchema(), Configuration::DefaultValue::schema);
     BOOST_CHECK_EQUAL(cfg.GetAddress(), Configuration::DefaultValue::address);
     BOOST_CHECK_EQUAL(cfg.GetHost(), std::string());
     BOOST_CHECK_EQUAL(cfg.GetTcpPort(), Configuration::DefaultValue::port);
@@ -153,7 +153,7 @@ BOOST_AUTO_TEST_CASE(CheckTestValuesNotEquealDefault)
     BOOST_CHECK_NE(testDriverName, Configuration::DefaultValue::driver);
     BOOST_CHECK_NE(testAddress, Configuration::DefaultValue::address);
     BOOST_CHECK_NE(testServerPort, Configuration::DefaultValue::port);
-    BOOST_CHECK_NE(testCacheName, Configuration::DefaultValue::cache);
+    BOOST_CHECK_NE(testSchemaName, Configuration::DefaultValue::schema);
     BOOST_CHECK_NE(testDsn, Configuration::DefaultValue::dsn);
     BOOST_CHECK_NE(testPageSize, Configuration::DefaultValue::pageSize);
     BOOST_CHECK_NE(testDistributedJoins, 
Configuration::DefaultValue::distributedJoins);
@@ -168,10 +168,10 @@ BOOST_AUTO_TEST_CASE(TestConnectStringUppercase)
 
     constructor << "DRIVER={" << testDriverName << "};"
                 << "ADDRESS=" << testAddress << ';'
-                << "CACHE=" << testCacheName << ';'
                 << "DISTRIBUTED_JOINS=" << (testDistributedJoins ? "TRUE" : 
"FALSE") << ';'
                 << "ENFORCE_JOIN_ORDER=" << (testEnforceJoinOrder ? "TRUE" : 
"FALSE") << ';'
-                << "PAGE_SIZE=" << testPageSize;
+                << "PAGE_SIZE=" << testPageSize << ';'
+                << "SCHEMA=" << testSchemaName;
 
     const std::string& connectStr = constructor.str();
 
@@ -189,9 +189,9 @@ BOOST_AUTO_TEST_CASE(TestConnectStringLowercase)
     constructor << "driver={" << testDriverName << "};"
                 << "address=" << testAddress << ';'
                 << "page_size=" << testPageSize << ';'
-                << "cache=" << testCacheName << ';'
                 << "distributed_joins=" << (testDistributedJoins ? "true" : 
"false") << ';'
-                << "enforce_join_order=" << (testEnforceJoinOrder ? "true" : 
"false");
+                << "enforce_join_order=" << (testEnforceJoinOrder ? "true" : 
"false") << ';'
+                << "schema=" << testSchemaName;
 
     const std::string& connectStr = constructor.str();
 
@@ -209,9 +209,9 @@ BOOST_AUTO_TEST_CASE(TestConnectStringZeroTerminated)
     constructor << "driver={" << testDriverName << "};"
                 << "address=" << testAddress << ';'
                 << "page_size=" << testPageSize << ';'
-                << "cache=" << testCacheName << ';'
                 << "distributed_joins=" << (testDistributedJoins ? "true" : 
"false") << ';'
-                << "enforce_join_order=" << (testEnforceJoinOrder ? "true" : 
"false");
+                << "enforce_join_order=" << (testEnforceJoinOrder ? "true" : 
"false") << ';'
+                << "schema=" << testSchemaName;
 
     const std::string& connectStr = constructor.str();
 
@@ -229,9 +229,9 @@ BOOST_AUTO_TEST_CASE(TestConnectStringMixed)
     constructor << "Driver={" << testDriverName << "};"
                 << "Address=" << testAddress << ';'
                 << "Page_Size=" << testPageSize << ';'
-                << "Cache=" << testCacheName << ';'
                 << "Distributed_Joins=" << (testDistributedJoins ? "True" : 
"False") << ';'
-                << "Enforce_Join_Order=" << (testEnforceJoinOrder ? "True" : 
"False");
+                << "Enforce_Join_Order=" << (testEnforceJoinOrder ? "True" : 
"False") << ';'
+                << "Schema=" << testSchemaName;
 
     const std::string& connectStr = constructor.str();
 
@@ -249,9 +249,9 @@ BOOST_AUTO_TEST_CASE(TestConnectStringWhitepaces)
     constructor << "DRIVER = {" << testDriverName << "} ;\n"
                 << " ADDRESS =" << testAddress << "; "
                 << "   PAGE_SIZE= " << testPageSize << ';'
-                << "CACHE = \n\r" << testCacheName << ';'
                 << "   DISTRIBUTED_JOINS=" << (testDistributedJoins ? "TRUE" : 
"FALSE") << ';'
-                << "ENFORCE_JOIN_ORDER=   " << (testEnforceJoinOrder ? "TRUE  
" : "FALSE  ");
+                << "ENFORCE_JOIN_ORDER=   " << (testEnforceJoinOrder ? "TRUE  
" : "FALSE  ") << ';'
+                << "SCHEMA = \n\r" << testSchemaName;
 
     const std::string& connectStr = constructor.str();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc-test/src/queries_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/queries_test.cpp 
b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
index 4f7a6e2..25595c8 100644
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@ -160,7 +160,7 @@ struct QueriesTestSuiteFixture
     template<typename T>
     void CheckTwoRowsInt(SQLSMALLINT type)
     {
-        Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+        Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
         SQLRETURN ret;
 
@@ -375,12 +375,12 @@ BOOST_FIXTURE_TEST_SUITE(QueriesTestSuite, 
QueriesTestSuiteFixture)
 
 BOOST_AUTO_TEST_CASE(TestLegacyConnection)
 {
-    Connect("DRIVER={Apache Ignite};SERVER=127.0.0.1;PORT=11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};SERVER=127.0.0.1;PORT=11110;SCHEMA=cache");
 }
 
 BOOST_AUTO_TEST_CASE(TestConnectionProtocolVersion_2_1_0)
 {
-    Connect("DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;PROTOCOL_VERSION=2.1.0");
+    Connect("DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache;PROTOCOL_VERSION=2.1.0");
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt8)
@@ -425,7 +425,7 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsUint64)
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsString)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -528,7 +528,7 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsString)
 
 BOOST_AUTO_TEST_CASE(TestOneRowString)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -596,7 +596,7 @@ BOOST_AUTO_TEST_CASE(TestOneRowString)
 
 BOOST_AUTO_TEST_CASE(TestOneRowStringLen)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -648,7 +648,7 @@ BOOST_AUTO_TEST_CASE(TestOneRowStringLen)
 
 BOOST_AUTO_TEST_CASE(TestOneRowObject)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache2");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache2");
 
     SQLRETURN ret;
 
@@ -705,7 +705,7 @@ BOOST_AUTO_TEST_CASE(TestOneRowObject)
 
 BOOST_AUTO_TEST_CASE(TestDataAtExecution)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -830,7 +830,7 @@ BOOST_AUTO_TEST_CASE(TestDataAtExecution)
 
 BOOST_AUTO_TEST_CASE(TestNullFields)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -964,7 +964,7 @@ BOOST_AUTO_TEST_CASE(TestDistributedJoins)
         cache1.Put(i, entry);
     }
 
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     SQLRETURN ret;
 
@@ -998,7 +998,7 @@ BOOST_AUTO_TEST_CASE(TestDistributedJoins)
 
     Disconnect();
 
-    Connect("DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache;DISTRIBUTED_JOINS=true;");
+    Connect("DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache;DISTRIBUTED_JOINS=true;");
 
     // Binding colums.
     for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
@@ -1021,7 +1021,7 @@ BOOST_AUTO_TEST_CASE(TestDistributedJoins)
 
 BOOST_AUTO_TEST_CASE(TestInsertSelect)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     const int recordsNum = 100;
 
@@ -1081,7 +1081,7 @@ BOOST_AUTO_TEST_CASE(TestInsertSelect)
 
 BOOST_AUTO_TEST_CASE(TestInsertUpdateSelect)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     const int recordsNum = 100;
 
@@ -1155,7 +1155,7 @@ BOOST_AUTO_TEST_CASE(TestInsertUpdateSelect)
 
 BOOST_AUTO_TEST_CASE(TestInsertDeleteSelect)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     const int recordsNum = 100;
 
@@ -1223,7 +1223,7 @@ BOOST_AUTO_TEST_CASE(TestInsertDeleteSelect)
 
 BOOST_AUTO_TEST_CASE(TestInsertMergeSelect)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");
 
     const int recordsNum = 100;
 
@@ -1312,7 +1312,7 @@ void CheckMeta(char columns[n][k], SQLLEN columnsLen[n])
 
 BOOST_AUTO_TEST_CASE(TestTablesMeta)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache2");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache2");
 
     SQLRETURN ret;
 
@@ -1376,7 +1376,7 @@ void CheckObjectData(int8_t* data, int32_t len, T const& 
value)
 
 BOOST_AUTO_TEST_CASE(TestKeyVal)
 {
-    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache2");
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache2");
 
     SQLRETURN ret;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
index 0f82fd0..f905ff7 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
@@ -51,7 +51,7 @@ namespace ignite
         BOOST_REQUIRE(dbc != NULL);
 
         // Connect string
-        SQLCHAR connectStr[] = "DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache";
+        SQLCHAR connectStr[] = "DRIVER={Apache 
Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache";
 
         SQLCHAR outstr[ODBC_BUFFER_SIZE];
         SQLSMALLINT outstrlen;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h 
b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
index c0d102b..5850d50 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
@@ -50,8 +50,8 @@ namespace ignite
                     /** Connection attribute keyword for Driver attribute. */
                     static const std::string driver;
 
-                    /** Connection attribute keyword for cache attribute. */
-                    static const std::string cache;
+                    /** Connection attribute keyword for schema attribute. */
+                    static const std::string schema;
 
                     /** Connection attribute keyword for address attribute. */
                     static const std::string address;
@@ -84,8 +84,8 @@ namespace ignite
                     /** Default value for Driver attribute. */
                     static const std::string driver;
 
-                    /** Default value for cache attribute. */
-                    static const std::string cache;
+                    /** Default value for schema attribute. */
+                    static const std::string schema;
 
                     /** Default value for address attribute. */
                     static const std::string address;
@@ -229,23 +229,23 @@ namespace ignite
                 void SetHost(const std::string& server);
 
                 /**
-                 * Get cache.
+                 * Get schema.
                  *
-                 * @return Cache name.
+                 * @return Schema.
                  */
-                const std::string& GetCache() const
+                const std::string& GetSchema() const
                 {
-                    return GetStringValue(Key::cache, DefaultValue::cache);
+                    return GetStringValue(Key::schema, DefaultValue::schema);
                 }
 
                 /**
-                 * Set cache.
+                 * Set schema.
                  *
-                 * @param cache Cache name.
+                 * @param schema Schema name.
                  */
-                void SetCache(const std::string& cache)
+                void SetSchema(const std::string& schema)
                 {
-                    arguments[Key::cache] = cache;
+                    arguments[Key::schema] = schema;
                 }
 
                 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 c3f27a2..1f91767 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/connection.h
@@ -107,11 +107,11 @@ namespace ignite
             void Receive(std::vector<int8_t>& msg);
 
             /**
-             * Get name of the assotiated cache.
+             * Get name of the assotiated schema.
              *
-             * @return Cache name.
+             * @return Schema name.
              */
-            const std::string& GetCache() const;
+            const std::string& GetSchema() const;
 
             /**
              * Get configuration.

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 54c00fd..85d5b36 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
@@ -105,7 +105,7 @@ namespace ignite
              * Write request using provided writer.
              * @param writer Writer.
              */
-            void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
+            void Write(impl::binary::BinaryWriterImpl& writer) const
             {
                 writer.WriteInt8(RequestType::HANDSHAKE);
 
@@ -139,13 +139,13 @@ namespace ignite
             /**
              * Constructor.
              *
-             * @param cache Cache name.
+             * @param schema Schema.
              * @param sql SQL query.
              * @param params Query arguments.
              */
-            QueryExecuteRequest(const std::string& cache, const std::string& 
sql,
+            QueryExecuteRequest(const std::string& schema, const std::string& 
sql,
                 const app::ParameterBindingMap& params) :
-                cache(cache),
+                schema(schema),
                 sql(sql),
                 params(params)
             {
@@ -164,10 +164,10 @@ namespace ignite
              * Write request using provided writer.
              * @param writer Writer.
              */
-            void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
+            void Write(impl::binary::BinaryWriterImpl& writer) const
             {
                 writer.WriteInt8(RequestType::EXECUTE_SQL_QUERY);
-                utility::WriteString(writer, cache);
+                utility::WriteString(writer, schema);
                 utility::WriteString(writer, sql);
 
                 writer.WriteInt32(static_cast<int32_t>(params.size()));
@@ -190,8 +190,8 @@ namespace ignite
             }
 
         private:
-            /** Cache name. */
-            std::string cache;
+            /** Schema name. */
+            std::string schema;
 
             /** SQL query. */
             std::string sql;
@@ -408,11 +408,11 @@ namespace ignite
             /**
              * Constructor.
              *
-             * @param cacheName Cache name.
+             * @param schema Schema.
              * @param sqlQuery SQL query itself.
              */
-            QueryGetParamsMetaRequest(const std::string& cacheName, const 
std::string& sqlQuery) :
-                cacheName(cacheName),
+            QueryGetParamsMetaRequest(const std::string& schema, const 
std::string& sqlQuery) :
+                schema(schema),
                 sqlQuery(sqlQuery)
             {
                 // No-op.
@@ -430,17 +430,17 @@ namespace ignite
              * Write request using provided writer.
              * @param writer Writer.
              */
-            void Write(ignite::impl::binary::BinaryWriterImpl& writer) const
+            void Write(impl::binary::BinaryWriterImpl& writer) const
             {
                 writer.WriteInt8(RequestType::GET_PARAMS_METADATA);
 
-                utility::WriteString(writer, cacheName);
+                utility::WriteString(writer, schema);
                 utility::WriteString(writer, sqlQuery);
             }
 
         private:
-            /** Cache name. */
-            std::string cacheName;
+            /** Schema. */
+            std::string schema;
 
             /** SQL query. */
             std::string sqlQuery;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 2439696..46d00cf 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
@@ -46,8 +46,8 @@ namespace ignite
                             NAME_LABEL,
                             ADDRESS_EDIT,
                             ADDRESS_LABEL,
-                            CACHE_EDIT,
-                            CACHE_LABEL,
+                            SCHEMA_EDIT,
+                            SCHEMA_LABEL,
                             PAGE_SIZE_EDIT,
                             PAGE_SIZE_LABEL,
                             DISTRIBUTED_JOINS_CHECK_BOX,
@@ -119,11 +119,11 @@ namespace ignite
                     /** DSN address edit field. */
                     std::auto_ptr<Window> addressEdit;
 
-                    /** DSN cache edit field label. */
-                    std::auto_ptr<Window> cacheLabel;
+                    /** DSN schema edit field label. */
+                    std::auto_ptr<Window> schemaLabel;
 
-                    /** DSN cache edit field. */
-                    std::auto_ptr<Window> cacheEdit;
+                    /** DSN schema edit field. */
+                    std::auto_ptr<Window> schemaEdit;
 
                     /** DSN fetch page size edit field label. */
                     std::auto_ptr<Window> pageSizeLabel;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 36cb5e8..ffb7120 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
@@ -38,8 +38,8 @@ namespace ignite
                     nameEdit(),
                     addressLabel(),
                     addressEdit(),
-                    cacheLabel(),
-                    cacheEdit(),
+                    schemaLabel(),
+                    schemaEdit(),
                     pageSizeLabel(),
                     pageSizeEdit(),
                     distributedJoinsCheckBox(),
@@ -115,9 +115,9 @@ namespace ignite
 
                     rowPos += interval + rowSize;
 
-                    val = config.GetCache().c_str();
-                    cacheLabel = CreateLabel(labelPosX, rowPos, labelSizeX, 
rowSize, "Cache name:", ChildId::CACHE_LABEL);
-                    cacheEdit = CreateEdit(editPosX, rowPos, editSizeX, 
rowSize, val, ChildId::CACHE_EDIT);
+                    val = config.GetSchema().c_str();
+                    schemaLabel = CreateLabel(labelPosX, rowPos, labelSizeX, 
rowSize, "Schema name:", ChildId::SCHEMA_LABEL);
+                    schemaEdit = CreateEdit(editPosX, rowPos, editSizeX, 
rowSize, val, ChildId::SCHEMA_EDIT);
 
                     rowPos += interval + rowSize;
 
@@ -248,7 +248,7 @@ namespace ignite
                 {
                     std::string dsn;
                     std::string address;
-                    std::string cache;
+                    std::string schema;
                     std::string pageSizeStr;
                     std::string version;
 
@@ -257,7 +257,7 @@ namespace ignite
 
                     nameEdit->GetText(dsn);
                     addressEdit->GetText(address);
-                    cacheEdit->GetText(cache);
+                    schemaEdit->GetText(schema);
                     protocolVersionComboBox->GetText(version);
                     pageSizeEdit->GetText(pageSizeStr);
 
@@ -275,7 +275,7 @@ namespace ignite
                     LOG_MSG("Retriving arguments:");
                     LOG_MSG("DSN:                " << dsn);
                     LOG_MSG("Address:            " << address);
-                    LOG_MSG("Cache:              " << cache);
+                    LOG_MSG("Schema:             " << schema);
                     LOG_MSG("Page size:          " << pageSize);
                     LOG_MSG("Protocol version:   " << version);
                     LOG_MSG("Distributed Joins:  " << (distributedJoins ? 
"true" : "false"));
@@ -286,7 +286,7 @@ namespace ignite
 
                     cfg.SetDsn(dsn);
                     cfg.SetAddress(address);
-                    cfg.SetCache(cache);
+                    cfg.SetSchema(schema);
                     cfg.SetPageSize(pageSize);
                     cfg.SetProtocolVersion(version);
                     cfg.SetDistributedJoins(distributedJoins);

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc/src/config/configuration.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/config/configuration.cpp 
b/modules/platforms/cpp/odbc/src/config/configuration.cpp
index 07f1368..854cb2b 100644
--- a/modules/platforms/cpp/odbc/src/config/configuration.cpp
+++ b/modules/platforms/cpp/odbc/src/config/configuration.cpp
@@ -34,7 +34,7 @@ namespace ignite
         {
             const std::string Configuration::Key::dsn               = "dsn";
             const std::string Configuration::Key::driver            = "driver";
-            const std::string Configuration::Key::cache             = "cache";
+            const std::string Configuration::Key::schema            = "schema";
             const std::string Configuration::Key::address           = 
"address";
             const std::string Configuration::Key::server            = "server";
             const std::string Configuration::Key::port              = "port";
@@ -45,7 +45,7 @@ namespace ignite
 
             const std::string Configuration::DefaultValue::dsn      = "Apache 
Ignite DSN";
             const std::string Configuration::DefaultValue::driver   = "Apache 
Ignite";
-            const std::string Configuration::DefaultValue::cache    = "";
+            const std::string Configuration::DefaultValue::schema   = "PUBLIC";
             const std::string Configuration::DefaultValue::address  = "";
             const std::string Configuration::DefaultValue::server   = "";
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 b9c15e5..f43a562 100644
--- a/modules/platforms/cpp/odbc/src/connection.cpp
+++ b/modules/platforms/cpp/odbc/src/connection.cpp
@@ -280,9 +280,9 @@ namespace ignite
             return len;
         }
 
-        const std::string& Connection::GetCache() const
+        const std::string& Connection::GetSchema() const
         {
-            return config.GetCache();
+            return config.GetSchema();
         }
 
         const config::Configuration& Connection::GetConfiguration() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/modules/platforms/cpp/odbc/src/dsn_config.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/dsn_config.cpp 
b/modules/platforms/cpp/odbc/src/dsn_config.cpp
index 2edeab0..cabd06e 100644
--- a/modules/platforms/cpp/odbc/src/dsn_config.cpp
+++ b/modules/platforms/cpp/odbc/src/dsn_config.cpp
@@ -96,7 +96,7 @@ namespace ignite
 
             uint16_t port = ReadDsnInt(dsn, Configuration::Key::port, 
config.GetTcpPort());
 
-            std::string cache = ReadDsnString(dsn, Configuration::Key::cache, 
config.GetCache().c_str());
+            std::string schema = ReadDsnString(dsn, 
Configuration::Key::schema, config.GetSchema().c_str());
 
             bool distributedJoins = ReadDsnBool(dsn, 
Configuration::Key::distributedJoins, config.IsDistributedJoins());
 
@@ -113,7 +113,7 @@ namespace ignite
             config.SetAddress(address);
             config.SetHost(server);
             config.SetTcpPort(port);
-            config.SetCache(cache);
+            config.SetSchema(schema);
             config.SetDistributedJoins(distributedJoins);
             config.SetEnforceJoinOrder(enforceJoinOrder);
             config.SetProtocolVersion(version);

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 cca3eb5..8ba9323 100644
--- a/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/column_metadata_query.cpp
@@ -309,7 +309,7 @@ namespace ignite
                     LOG_MSG("\n[" << i << "] SchemaName:     " << 
meta[i].GetSchemaName()
                          << "\n[" << i << "] TableName:      " << 
meta[i].GetTableName()
                          << "\n[" << i << "] ColumnName:     " << 
meta[i].GetColumnName()
-                         << "\n[" << i << "] ColumnType:     " << 
meta[i].GetDataType());
+                         << "\n[" << i << "] ColumnType:     " << 
static_cast<int32_t>(meta[i].GetDataType()));
                 }
 
                 return SqlResult::AI_SUCCESS;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 33e763f..2ad679b 100644
--- a/modules/platforms/cpp/odbc/src/query/data_query.cpp
+++ b/modules/platforms/cpp/odbc/src/query/data_query.cpp
@@ -169,9 +169,9 @@ namespace ignite
 
             SqlResult::Type DataQuery::MakeRequestExecute()
             {
-                const std::string& cacheName = connection.GetCache();
+                const std::string& schema = connection.GetSchema();
 
-                QueryExecuteRequest req(cacheName, sql, params);
+                QueryExecuteRequest req(schema, sql, params);
                 QueryExecuteResponse rsp;
 
                 try
@@ -199,12 +199,12 @@ namespace ignite
                 resultMeta.assign(rsp.GetMeta().begin(), rsp.GetMeta().end());
 
                 LOG_MSG("Query id: " << cursor->GetQueryId());
-                for (size_t i = 0; i < rsp.GetMeta().size(); ++i)
+                for (size_t i = 0; i < resultMeta.size(); ++i)
                 {
-                    LOG_MSG("\n[" << i << "] SchemaName:     " << 
rsp.GetMeta()[i].GetSchemaName()
-                        <<  "\n[" << i << "] TypeName:       " << 
rsp.GetMeta()[i].GetTableName()
-                        <<  "\n[" << i << "] ColumnName:     " << 
rsp.GetMeta()[i].GetColumnName()
-                        <<  "\n[" << i << "] ColumnType:     " << 
rsp.GetMeta()[i].GetDataType());
+                    LOG_MSG("\n[" << i << "] SchemaName:     " << 
resultMeta[i].GetSchemaName()
+                        <<  "\n[" << i << "] TypeName:       " << 
resultMeta[i].GetTableName()
+                        <<  "\n[" << i << "] ColumnName:     " << 
resultMeta[i].GetColumnName()
+                        <<  "\n[" << i << "] ColumnType:     " << 
static_cast<int32_t>(resultMeta[i].GetDataType()));
                 }
 
                 return SqlResult::AI_SUCCESS;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2ba6ab42/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 99ec42e..3b078ae 100644
--- a/modules/platforms/cpp/odbc/src/statement.cpp
+++ b/modules/platforms/cpp/odbc/src/statement.cpp
@@ -488,13 +488,13 @@ namespace ignite
             if (currentQuery.get())
                 currentQuery->Close();
 
-            std::string cache(schema);
+            std::string schema0(schema);
 
-            if (cache.empty())
-                cache = connection.GetCache();
+            if (schema0.empty())
+                schema0 = connection.GetSchema();
 
             currentQuery.reset(new query::ColumnMetadataQuery(*this,
-                connection, cache, table, column));
+                connection, schema, table, column));
 
             return currentQuery->Execute();
         }
@@ -1026,10 +1026,10 @@ namespace ignite
 
             query::DataQuery* qry = static_cast<query::DataQuery*>(qry0);
 
-            const std::string& cacheName = connection.GetCache();
+            const std::string& schema = connection.GetSchema();
             const std::string& sql = qry->GetSql();
 
-            QueryGetParamsMetaRequest req(cacheName, sql);
+            QueryGetParamsMetaRequest req(schema, sql);
             QueryGetParamsMetaResponse rsp;
 
             try

Reply via email to