Boolean values need to enclosed in single quotes #83

Merged
merged 1 commit into from Oct 26, 2012

Projects

None yet

2 participants

@kzadorozhny
Contributor

There is an error in C* documentation about literals in CQL2/3.

Boolean values need to be enclosed in single quotes. It's true for both CQL2 and CQL3.

CREATE TABLE users (
    id text,
    name text,
    email text,
    verified boolean,
    PRIMARY KEY (id)
);
UPDATE users SET verified = true WHERE id = '1';

Bad Request: line 1:33 no viable alternative at input 'WHERE'

UPDATE users SET verified = 'true' WHERE id = '1';

Success.

SELECT id, verified FROM users WHERE id = '1';
 id | verified_email
----+----------------
  3 |           True
Contributor
Owner

Thanks for the update, will having the quotes cause 1.2 to break?

Contributor

I think it safe to assume that single quoted strings will keep
working. The patch included with the CASSANDRA-4776 doesn't touch
anything outside of query parser.

On Thu, Oct 25, 2012 at 11:11 AM, Russ Bradberry
notifications@github.com wrote:

will having the quotes cause 1.2 to break?


Reply to this email directly or view it on GitHub.

@devdazed devdazed merged commit 0609ec4 into simplereach:master Oct 26, 2012

1 check passed

default The Travis build passed
Details
Owner

This is published in version 0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment