Skip to content

Commit

Permalink
insertColumn now with supercolumn *and* value as int64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
axs committed Apr 14, 2011
1 parent b587f2f commit ddeb1da
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libcassandra/cassandra.cc
Expand Up @@ -155,6 +155,17 @@ void Cassandra::insertColumn(const string& key,
}


void Cassandra::insertColumn(const string& key,
const string& column_family,
const string& super_column_name,
const string& column_name,
const int64_t value)
{
insertColumn(key, column_family, super_column_name, column_name, serializeLong(value), ConsistencyLevel::QUORUM);
}



void Cassandra::insertColumn(const string& key,
const string& column_family,
const string& column_name,
Expand Down
16 changes: 16 additions & 0 deletions libcassandra/cassandra.h
Expand Up @@ -142,6 +142,22 @@ class Cassandra
const std::string& column_name,
const std::string& value);

/**
* Insert a column, possibly inside a supercolumn
*
* @param[in] key the column key
* @param[in] column_family the column family
* @param[in] super_column_name the super column name (optional)
* @param[in] column_name the column name
* @param[in] value the column value
*/
void insertColumn(const std::string& key,
const std::string& column_family,
const std::string& super_column_name,
const std::string& column_name,
const int64_t value);


/**
* Insert a column, directly in a columnfamily
*
Expand Down

0 comments on commit ddeb1da

Please sign in to comment.