You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/01/18 11:28:28 UTC

[02/10] cassandra git commit: Add warning regarding quoted identifiers in CQL doc

Add warning regarding quoted identifiers in CQL doc


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/79b94923
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/79b94923
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/79b94923

Branch: refs/heads/cassandra-3.0
Commit: 79b9492363d60863c717a9dfe4ce8c1769071c85
Parents: 1b59357
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Jan 18 11:27:24 2016 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Jan 18 11:27:24 2016 +0100

----------------------------------------------------------------------
 doc/cql3/CQL.textile | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/79b94923/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index c2ecbd7..2dd96e7 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -46,6 +46,8 @@ p. Identifiers and (unquoted) keywords are case insensitive. Thus @SELECT@ is th
 
 p. There is a second kind of identifiers called _quoted identifiers_ defined by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted identifiers are never keywords. Thus @"select"@ is not a reserved keyword and can be used to refer to a column, while @select@ would raise a parse error. Also, contrarily to unquoted identifiers and keywords, quoted identifiers are case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully lowercase quoted identifier that matches @[a-zA-Z]@@[a-zA-Z0-9_]@@*@ is equivalent to the unquoted identifier obtained by removing the double-quote (so @"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). Inside a quoted identifier, the double-quote character can be repeated to escape it, so @"foo "" bar"@ is a valid identifier.
 
+p. *Warning*: _quoted identifiers_ allows to declare columns with arbitrary names, and those can sometime clash with specific names used by the server. For instance, when using conditional update, the server will respond with a result-set containing a special result named @"[applied]"@. If you've declared a column with such a name, this could potentially confuse some tools and should be avoided. In general, unquoted identifiers should be preferred but if you use quoted identifiers, it is strongly advised to avoid any name enclosed by squared brackets (like @"[applied]"@) and any name that looks like a function call (like @"f(x)"@).
+
 h3(#constants). Constants
 
 CQL defines the following kind of _constants_: strings, integers, floats, booleans, uuids and blobs: