cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brayton Thompson <thomp...@grnoc.iu.edu>
Subject 0.7 API Change?
Date Thu, 14 Oct 2010 19:41:12 GMT
Was there a change to the API in 0.7?

example...
from the api wikki

insert

void insert(string keyspace, string key, ColumnPath column_path, binary value, i64 timestamp,
ConsistencyLevel consistency_level)


Now from the thrift generated perl library for the 0.7 beta 2 download.

sub insert{
  my $self = shift;
  my $key = shift;
  my $column_parent = shift;
  my $column = shift;
  my $consistency_level = shift;

  $self->send_insert($key, $column_parent, $column, $consistency_level);
  $self->recv_insert();
}

For those of you who don't use perl... 
  my $self = shift;
  my $key = shift;
  my $column_parent = shift;
  my $column = shift;
  my $consistency_level = shift;

these get the function arguments out in the order they are listed. The first argument (in
this example the thing stored into $self) is a reference to the class object the method belongs
to.  So in our example keyspace goes into $key, key goes into $column_parent ... etc.

This is not a huge issue, I can look at the module to determine the new ordering of arguments.
However how can I run an insert if the keyspace is never supplied to the method?

Thank you for your time.
Mime
View raw message