cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu D'Amours <math...@damours.org>
Subject Re: Named bind variables and one-off queries
Date Wed, 20 Nov 2013 16:34:25 GMT
Sorry about that,

I'm making a driver for Cassandra binary protocol v2. When the driver sends QUERY queries
(unprepared), those can contain only the CQL statement, or, if there are bind variables in
the statement, the values for the bind variables can be sent along the statement. Recently,
C* added "named variables", and (from the driver's perspective) dealing with those for prepared
queries is straightforward using the metadata that is received from cassandra after a PREPARE
query. But, for unprepared queries, the client doesn't have this metadata in hand, so it doesn't
know the order of variables... Cassandra obviously has its way of going from named variables
in statements to a ordered list of expected values, so I was wondering how I should make sure
I yield the same order as cassandra.

Le Nov 20, 2013 à 11:20 AM, Tyler Hobbs <tyler@datastax.com> a écrit :

> On Wed, Nov 20, 2013 at 10:13 AM, Mathieu D'Amours <mathieu@damours.org>wrote:
> 
>> 
>> Since C* expect a list of values for bind variables in queries, in
>> non-prepared queries the driver has no direct information about the
>> expected order of named variables. Is there a way to reliably predict the
>> order of variable values C* will expect?
> 
> 
> Your question isn't clear to me.  Are you concerned with prepared
> statements or non-prepared statements?  What are you concerned about or
> what are you trying to accomplish?
> 
> 
> -- 
> Tyler Hobbs
> DataStax <http://datastax.com/>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message