My Blog List

Tuesday, April 9, 2013

2 day : get where

// make Users column tables

create column family Users with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type and column_metadata=[{column_name: fname, validation_class: UTF8Type}, {column_name: email, validation_class:UTF8Type}, {column_name: state, validation_class: UTF8Type, index_type:KEYS}];


set Users['song']['fname']='moo chan';
set Users['song']['email']='';
set Users['song']['state']='seoul';

set Users['choi']['fname']='won woo';
set Users['choi']['email']='';
set Users['choi']['state']='seoul';

set Users['jang']['fname']='jang woo';
set Users['jang']['email']='';
set Users['jang']['state']='boosan';

 get Users where state='seoul';

No comments:

Post a Comment