Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.
The "CassandraCli" page has been changed by TheDailySpank. http://wiki.apache.org/cassandra/CassandraCli?action=diff&rev1=14&rev2=15 -------------------------------------------------- }}} In the example above we authenticated to 'Keyspace1' and created a record in the `Standard1` column family using the key `jsmith`. This record has three columns, `first`, `last`, and `age`. Each of these commands is the equivalent to an `insert()` using the [[API|Thrift API]]. + In API version 2.1.0 the example would go like the following due to changes in the API. + + {{{ + cassandra> set Keyspace1.Standard2['jsmith']['first'] = 'John' + Value inserted. + cassandra> set Keyspace1.Standard2['jsmith']['last'] = 'Smith' + Value inserted. + cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42' + Value inserted. + }}} + Now let's read back the `jsmith` row to see what it contains: {{{ @@ -50, +61 @@ }}} Note: Using the `get` command in this form is the equivalent to a `get_slice()` using the [[API|Thrift API]]. + + Once again, with the API being different, you need to specify the Keyspace + + {{{ + cassandra> get Keyspace1.Standard2['jsmith'] + => (column=last, value=Smith, timestamp=1278953905903000) + => (column=first, value=John, timestamp=1278953848952000) + => (column=age, value=42, timestamp=1278953919182000) + Returned 3 results. + }}} +
