Can anyone explain this to me?  I have been looking through the source code but 
can't seem to find the answer.

The documentation mentions using the token() function to change a value into 
it's token for use in queries.   It always mentions it as taking a single 
parameter:


SELECT * FROM posts WHERE token(userid) > token('tom') AND token(userid) < 
token('bob')

However on my 1.2.5 node I am getting the following error:

e.x.

create table foo (
    organization text,
    type text,
    time timestamp,
    id uuid,
    primary key ((organization, type, time), id))

select * from foo where organization = 'companyA' and type = 'typeB' and 
token(time) < token('somevalue') and token(time) > token('othervalue')

Bad Request: Invalid number of arguments in call to function token: 3 required 
but 1 provided

What are the other two parameters?  We don't currently use the token function 
but I was experimenting seeing if I could move the time into the partition key 
for a table like this to better distribute the rows.  But I can't seem to 
figure out how to get token() working.

Ben
This electronic message contains information which may be confidential or 
privileged. The information is intended for the use of the individual or entity 
named above. If you are not the intended recipient, be aware that any 
disclosure, copying, distribution or use of the contents of this information is 
prohibited. If you have received this electronic transmission in error, please 
notify us by e-mail at (postmas...@rapid7.com) immediately.

Reply via email to