Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating ColumnFamily and Column through C++ code #10

Closed
durgadevi4887 opened this issue Jan 22, 2011 · 2 comments
Closed

Creating ColumnFamily and Column through C++ code #10

durgadevi4887 opened this issue Jan 22, 2011 · 2 comments

Comments

@durgadevi4887
Copy link

Hi,
We want to create ColumnFamily and Column dynamically in cassandra database through the C++ Code.Is the posulliv libcassandra c++ client support to dynamically create ColumnFamily?Can you please explain how to create columnfamily in cassandra through C++ code?

@posulliv
Copy link
Owner

Latest updates to libcassandra allows you to do this. For example, to create a keyspace and column family, you could do:

/* create keyspace */
KeyspaceDefinition ks_def;
ks_def.setName("drizzle");
client->createKeyspace(ks_def);
client->setKeyspace(ks_def.getName());

/* create standard column family */
ColumnFamilyDefinition cf_def;
cf_def.setName("Data");
cf_def.setKeyspaceName(ks_def.getName());
client->createColumnFamily(cf_def);

@durgadevi4887
Copy link
Author

Thanks.
It is helpful to create keyspace and ColumnFamily dynamically.Likewise is it possible to create column and their type dynamically through libcassandra.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants