Commit 6646c409 authored by Michael Ott's avatar Michael Ott
Browse files

Change CassSchema references to CassSchemaMeta to reflect changes in API...

Change CassSchema references to CassSchemaMeta to reflect changes in API change due to cpp-driver update to 2.10.0
parent df3360ab
......@@ -52,7 +52,7 @@ protected:
CassCluster* cluster; /**< The Cassandra Cluster object (contains hostname, port, etc) */
CassSession* session; /**< The session object through which we communicate with C* once the connection is established */
const CassSchema* schema; /**< The schema object containing the current database schema information */
const CassSchemaMeta* schema; /**< The schema object containing the current database schema information */
std::string currentKeyspace; /**< The name of the active keyspace */
/**
......
......@@ -160,10 +160,10 @@ void ConnectionImpl::updateSchema()
{
/* Free the memory of the currently known schema definition. */
if (schema)
cass_schema_free(schema);
cass_schema_meta_free(schema);
/* Get the new schema */
schema = cass_session_get_schema(session);
schema = cass_session_get_schema_meta(session);
}
/**
......@@ -176,7 +176,7 @@ bool ConnectionImpl::existsKeyspace(std::string name)
{
updateSchema();
const CassSchemaMeta* keyspaceMeta = cass_schema_get_keyspace(schema, name.c_str());
const CassKeyspaceMeta* keyspaceMeta = cass_schema_meta_keyspace_by_name(schema, name.c_str());
if (keyspaceMeta != NULL)
return true;
else
......@@ -239,13 +239,13 @@ bool ConnectionImpl::existsColumnFamily(std::string name)
{
updateSchema();
const CassSchemaMeta* keyspaceMeta = cass_schema_get_keyspace(schema, currentKeyspace.c_str());
const CassKeyspaceMeta* keyspaceMeta = cass_schema_meta_keyspace_by_name(schema, currentKeyspace.c_str());
if (keyspaceMeta == NULL) {
/* It is a bit misleading to return false if the keyspace doesn't even exist... */
return false;
}
const CassSchemaMeta* tableMeta = cass_schema_meta_get_entry(keyspaceMeta, name.c_str());
const CassTableMeta* tableMeta = cass_keyspace_meta_table_by_name(keyspaceMeta, name.c_str());
if (tableMeta == NULL) {
return false;
}
......@@ -487,7 +487,7 @@ ConnectionImpl::~ConnectionImpl() {
/* Clean up... */
disconnect();
if (schema)
cass_schema_free(schema);
cass_schema_meta_free(schema);
if (session)
cass_session_free(session);
if (cluster)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment