Skip to content

Instantly share code, notes, and snippets.

@careo
Created August 7, 2009 00:59
Show Gist options
  • Select an option

  • Save careo/163654 to your computer and use it in GitHub Desktop.

Select an option

Save careo/163654 to your computer and use it in GitHub Desktop.
def insert(keyspace, key, column_path, value, timestamp, consistency_level)
send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
recv_insert()
end
def send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
send_message('insert', Insert_args, :keyspace => keyspace, :key => key, :column_path => column_path, :value => value, :timestamp => timestamp, :consistency_level => consistency_level)
end
def recv_insert()
result = receive_message(Insert_result)
raise result.ire unless result.ire.nil?
raise result.ue unless result.ue.nil?
return
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment