IGNITE-2243: Implemented SQL_ATTR_ODBC_VERSION getting.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b60b3dc0 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b60b3dc0 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b60b3dc0 Branch: refs/heads/ignite-1786 Commit: b60b3dc0af797d09a4bded0d355d077ffb7fbfd6 Parents: c847f8e Author: isapego <[email protected]> Authored: Wed Jan 20 21:10:04 2016 +0300 Committer: isapego <[email protected]> Committed: Wed Jan 20 21:10:04 2016 +0300 ---------------------------------------------------------------------- .../cpp/odbc/odbc-driver/src/environment.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/b60b3dc0/modules/platforms/cpp/odbc/odbc-driver/src/environment.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/odbc/odbc-driver/src/environment.cpp b/modules/platforms/cpp/odbc/odbc-driver/src/environment.cpp index 1629e91..078d546 100644 --- a/modules/platforms/cpp/odbc/odbc-driver/src/environment.cpp +++ b/modules/platforms/cpp/odbc/odbc-driver/src/environment.cpp @@ -126,6 +126,22 @@ namespace ignite SqlResult Environment::InternalGetAttribute(int32_t attr, app::ApplicationDataBuffer& buffer) { + EnvironmentAttribute attribute = EnvironmentAttributeToInternal(attr); + + switch (attribute) + { + case IGNITE_SQL_ENV_ATTR_ODBC_VERSION: + { + buffer.PutInt32(odbcVersion); + + break; + } + + case IGNITE_SQL_ENV_ATTR_UNKNOWN: + default: + break; + } + AddStatusRecord(SQL_STATE_HYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED, "Attribute is not supported.");
