SHARE
TWEET

Untitled

a guest Jun 16th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE layer (
  2.     layer_name text,
  3.     layer_position text,
  4.     PRIMARY KEY (layer_name, layer_position)
  5. ) WITH CLUSTERING ORDER BY (layer_position DESC)
  6.      
  7. $select = new CassandraSimpleStatement(<<<EOD
  8.                         select * from layer ORDER BY layer_position DESC
  9. EOD
  10.                       );
  11.  
  12. $result = $session->execute($select);
  13.      
  14. PRIMARY KEY (layer_name, layer_position)
  15. ) WITH CLUSTERING ORDER BY (layer_position DESC)
  16.      
  17. SELECT * FROM layer WHERE layer_name = 'layer1';
  18.      
  19. CREATE TABLE layer_by_state_id (
  20.     layer_name text,
  21.     layer_position text,
  22.     state_id text,
  23.     PRIMARY KEY (state_id, layer_position, layer_name)
  24. ) WITH CLUSTERING ORDER BY (layer_position DESC, layer_name ASC);
  25.      
  26. SELECT * FROM layer WHERE state_id='thx1138';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top