Author: tylerhobbs
Date: Tue Jun 16 17:33:54 2015
New Revision: 1685875

URL: http://svn.apache.org/r1685875
Log:
Fix identifier regex in CQL docs

Modified:
    cassandra/site/publish/doc/cql3/CQL-2.1.html

Modified: cassandra/site/publish/doc/cql3/CQL-2.1.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/doc/cql3/CQL-2.1.html?rev=1685875&r1=1685874&r2=1685875&view=diff
==============================================================================
--- cassandra/site/publish/doc/cql3/CQL-2.1.html (original)
+++ cassandra/site/publish/doc/cql3/CQL-2.1.html Tue Jun 16 17:33:54 2015
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD 
XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";><html 
xmlns="http://www.w3.org/1999/xhtml";><head><meta http-equiv="Content-Type" 
content="text/html; charset=utf-8"/><title>CQL</title></head><body><p><link 
rel="StyleSheet" href="CQL.css" type="text/css" media="screen"></p><h1 
id="CassandraQueryLanguageCQLv3.2.0">Cassandra Query Language (CQL) 
v3.2.0</h1><span id="tableOfContents"><ol style="list-style: none;"><li><a 
href="CQL.html#CassandraQueryLanguageCQLv3.2.0">Cassandra Query Language (CQL) 
v3.2.0</a><ol style="list-style: none;"><li><a href="CQL.html#CQLSyntax">CQL 
Syntax</a><ol style="list-style: none;"><li><a 
href="CQL.html#Preamble">Preamble</a></li><li><a 
href="CQL.html#Conventions">Conventions</a></li><li><a 
href="CQL.html#identifiers">Identifiers and keywords</a></li><li><a 
href="CQL.html#constants">Constants</a></li><li><a 
href="CQL.html#Comments">Comments</a></l
 i><li><a href="CQL.html#statements">Statements</a></li><li><a 
href="CQL.html#preparedStatement">Prepared Statement</a></li></ol></li><li><a 
href="CQL.html#dataDefinition">Data Definition</a><ol style="list-style: 
none;"><li><a href="CQL.html#createKeyspaceStmt">CREATE KEYSPACE</a></li><li><a 
href="CQL.html#useStmt">USE</a></li><li><a 
href="CQL.html#alterKeyspaceStmt">ALTER KEYSPACE</a></li><li><a 
href="CQL.html#dropKeyspaceStmt">DROP KEYSPACE</a></li><li><a 
href="CQL.html#createTableStmt">CREATE TABLE</a></li><li><a 
href="CQL.html#alterTableStmt">ALTER TABLE</a></li><li><a 
href="CQL.html#dropTableStmt">DROP TABLE</a></li><li><a 
href="CQL.html#truncateStmt">TRUNCATE</a></li><li><a 
href="CQL.html#createIndexStmt">CREATE INDEX</a></li><li><a 
href="CQL.html#dropIndexStmt">DROP INDEX</a></li><li><a 
href="CQL.html#createTypeStmt">CREATE TYPE</a></li><li><a 
href="CQL.html#alterTypeStmt">ALTER TYPE</a></li><li><a 
href="CQL.html#dropTypeStmt">DROP TYPE</a></li><li><a href="CQL.html#createTri
 ggerStmt">CREATE TRIGGER</a></li><li><a href="CQL.html#dropTriggerStmt">DROP 
TRIGGER</a></li></ol></li><li><a href="CQL.html#dataManipulation">Data 
Manipulation</a><ol style="list-style: none;"><li><a 
href="CQL.html#insertStmt">INSERT</a></li><li><a 
href="CQL.html#updateStmt">UPDATE</a></li><li><a 
href="CQL.html#deleteStmt">DELETE</a></li><li><a 
href="CQL.html#batchStmt">BATCH</a></li></ol></li><li><a 
href="CQL.html#queries">Queries</a><ol style="list-style: none;"><li><a 
href="CQL.html#selectStmt">SELECT</a></li></ol></li><li><a 
href="CQL.html#databaseUsers">Database Users</a><ol style="list-style: 
none;"><li><a href="CQL.html#createUserStmt">CREATE USER </a></li><li><a 
href="CQL.html#alterUserStmt">ALTER USER </a></li><li><a 
href="CQL.html#dropUserStmt">DROP USER </a></li><li><a 
href="CQL.html#listUsersStmt">LIST USERS</a></li></ol></li><li><a 
href="CQL.html#dataControl">Data Control</a><ol style="list-style: 
none;"><li><a href="CQL.html#permissions">Permissions </a></li><li><a hr
 ef="CQL.html#grantPermissionsStmt">GRANT PERMISSION</a></li><li><a 
href="CQL.html#revokePermissionsStmt">REVOKE 
PERMISSION</a></li></ol></li><li><a href="CQL.html#types">Data Types</a><ol 
style="list-style: none;"><li><a href="CQL.html#usingdates">Working with 
dates</a></li><li><a href="CQL.html#counters">Counters</a></li><li><a 
href="CQL.html#collections">Working with collections</a></li></ol></li><li><a 
href="CQL.html#functions">Functions</a><ol style="list-style: none;"><li><a 
href="CQL.html#tokenFun">Token</a></li><li><a 
href="CQL.html#uuidFun">Uuid</a></li><li><a 
href="CQL.html#timeuuidFun">Timeuuid functions</a></li><li><a 
href="CQL.html#blobFun">Blob conversion functions</a></li></ol></li><li><a 
href="CQL.html#appendixA">Appendix A: CQL Keywords</a></li><li><a 
href="CQL.html#appendixB">Appendix B: CQL Reserved Types</a></li><li><a 
href="CQL.html#changes">Changes</a><ol style="list-style: none;"><li><a 
href="CQL.html#a3.2.0">3.2.0</a></li><li><a href="CQL.html#a3.1.7">3.1.7</a
 ></li><li><a href="CQL.html#a3.1.6">3.1.6</a></li><li><a 
 >href="CQL.html#a3.1.5">3.1.5</a></li><li><a 
 >href="CQL.html#a3.1.4">3.1.4</a></li><li><a 
 >href="CQL.html#a3.1.3">3.1.3</a></li><li><a 
 >href="CQL.html#a3.1.2">3.1.2</a></li><li><a 
 >href="CQL.html#a3.1.1">3.1.1</a></li><li><a 
 >href="CQL.html#a3.1.0">3.1.0</a></li><li><a 
 >href="CQL.html#a3.0.5">3.0.5</a></li><li><a 
 >href="CQL.html#a3.0.4">3.0.4</a></li><li><a 
 >href="CQL.html#a3.0.3">3.0.3</a></li><li><a 
 >href="CQL.html#a3.0.2">3.0.2</a></li><li><a 
 >href="CQL.html#a3.0.1">3.0.1</a></li></ol></li><li><a 
 >href="CQL.html#Versioning">Versioning</a></li></ol></li></ol></span><h2 
 >id="CQLSyntax">CQL Syntax</h2><h3 id="Preamble">Preamble</h3><p>This document 
 >describes the Cassandra Query Language (CQL) version 3. CQL v3 is not 
 >backward compatible with CQL v2 and differs from it in numerous ways. Note 
 >that this document describes the last version of the languages. However, the 
 ><a href="#changes">changes</a> section provides the diff between the diffe
 rent versions of CQL v3.</p><p>CQL v3 offers a model very close to SQL in the 
sense that data is put in <em>tables</em> containing <em>rows</em> of 
<em>columns</em>. For that reason, when used in this document, these terms 
(tables, rows and columns) have the same definition than they have in SQL. But 
please note that as such, they do <strong>not</strong> refer to the concept of 
rows and columns found in the internal implementation of Cassandra and in the 
thrift and CQL v2 API.</p><h3 id="Conventions">Conventions</h3><p>To aid in 
specifying the CQL syntax, we will use the following conventions in this 
document:</p><ul><li>Language rules will be given in a <a 
href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form";>BNF</a> -like 
notation:</li></ul><pre class="syntax"><pre>&lt;start> ::= TERMINAL 
&lt;non-terminal1> &lt;non-terminal1>
 </pre></pre><ul><li>Nonterminal symbols will have <code>&lt;angle 
brackets></code>.</li><li>As additional shortcut notations to BNF, we&#8217;ll 
use traditional regular expression&#8217;s symbols (<code>?</code>, 
<code>+</code> and <code>*</code>) to signify that a given symbol is optional 
and/or can be repeated. We&#8217;ll also allow parentheses to group symbols and 
the <code>[&lt;characters>]</code> notation to represent any one of 
<code>&lt;characters></code>.</li><li>The grammar is provided for documentation 
purposes and leave some minor details out. For instance, the last column 
definition in a <code>CREATE TABLE</code> statement is optional but supported 
if present even though the provided grammar in this document suggest it is not 
supported. </li><li>Sample code will be provided in a code block:</li></ul><pre 
class="sample"><pre>SELECT sample_usage FROM cql;
-</pre></pre><ul><li>References to keywords or pieces of CQL code in running 
text will be shown in a <code>fixed-width font</code>.</li></ul><h3 
id="identifiers">Identifiers and keywords</h3><p>The CQL language uses 
<em>identifiers</em> (or <em>names</em>) to identify tables, columns and other 
objects. An identifier is a token matching the regular expression <code 
lang="a-zA-Z">[a-zA-Z0-9_]</code><code>*</code>.</p><p>A number of such 
identifiers, like <code>SELECT</code> or <code>WITH</code>, are 
<em>keywords</em>. They have a fixed meaning for the language and most are 
reserved. The list of those keywords can be found in <a 
href="#appendixA">Appendix A</a>.</p><p>Identifiers and (unquoted) keywords are 
case insensitive. Thus <code>SELECT</code> is the same than <code>select</code> 
or <code>sElEcT</code>, and <code>myId</code> is the same than 
<code>myid</code> or <code>MYID</code> for instance. A convention often used 
(in particular by the samples of this documentation) is to use u
 pper case for keywords and lower case for other identifiers.</p><p>There is a 
second kind of identifiers called <em>quoted identifiers</em> defined by 
enclosing an arbitrary sequence of characters in double-quotes(<code>"</code>). 
Quoted identifiers are never keywords. Thus <code>"select"</code> is not a 
reserved keyword and can be used to refer to a column, while 
<code>select</code> would raise a parse error. Also, contrarily to unquoted 
identifiers and keywords, quoted identifiers are case sensitive (<code>"My 
Quoted Id"</code> is <em>different</em> from <code>"my quoted id"</code>). A 
fully lowercase quoted identifier that matches <code 
lang="a-zA-Z">[a-zA-Z0-9_]</code><code>*</code> is equivalent to the unquoted 
identifier obtained by removing the double-quote (so <code>"myid"</code> is 
equivalent to <code>myid</code> and to <code>myId</code> but different from 
<code>"myId"</code>). Inside a quoted identifier, the double-quote character 
can be repeated to escape it, so <code>"fo
 o "" bar"</code> is a valid identifier.</p><h3 
id="constants">Constants</h3><p>CQL defines the following kind of 
<em>constants</em>: strings, integers, floats, booleans, uuids and 
blobs:</p><ul><li>A string constant is an arbitrary sequence of characters 
characters enclosed by single-quote(<code>'</code>). One can include a 
single-quote in a string by repeating it, e.g. <code>'It''s raining 
today'</code>. Those are not to be confused with quoted identifiers that use 
double-quotes.</li><li>An integer constant is defined by 
<code>'-'?[0-9]+</code>.</li><li>A float constant is defined by 
<code>'-'?[0-9]+('.'[0-9]*)?([eE][+-]?[0-9+])?</code>. On top of that, 
<code>NaN</code> and <code>Infinity</code> are also float constants.</li><li>A 
boolean constant is either <code>true</code> or <code>false</code> up to 
case-insensitivity (i.e. <code>True</code> is a valid boolean 
constant).</li><li>A <a 
href="http://en.wikipedia.org/wiki/Universally_unique_identifier";>UUID</a> 
constant is defined b
 y <code>hex{8}-hex{4}-hex{4}-hex{4}-hex{12}</code> where <code>hex</code> is 
an hexadecimal character, e.g. <code>[0-9a-fA-F]</code> and <code>{4}</code> is 
the number of such characters.</li><li>A blob constant is an hexadecimal number 
defined by <code>0[xX](hex)+</code> where <code>hex</code> is an hexadecimal 
character, e.g. <code>[0-9a-fA-F]</code>.</li></ul><p>For how these constants 
are typed, see the <a href="#types">data types section</a>.</p><h3 
id="Comments">Comments</h3><p>A comment in CQL is a line beginning by either 
double dashes (<code>--</code>) or double slash 
(<code>//</code>).</p><p>Multi-line comments are also supported through 
enclosure within <code>/*</code> and <code>*/</code> (but nesting is not 
supported).</p><pre class="sample"><pre>-- This is a comment
+</pre></pre><ul><li>References to keywords or pieces of CQL code in running 
text will be shown in a <code>fixed-width font</code>.</li></ul><h3 
id="identifiers">Identifiers and keywords</h3><p>The CQL language uses 
<em>identifiers</em> (or <em>names</em>) to identify tables, columns and other 
objects. An identifier is a token matching the regular expression 
<code>[a-zA-Z]</code><code>[a-zA-Z0-9_]</code><code>*</code>.</p><p>A number of 
such identifiers, like <code>SELECT</code> or <code>WITH</code>, are 
<em>keywords</em>. They have a fixed meaning for the language and most are 
reserved. The list of those keywords can be found in <a 
href="#appendixA">Appendix A</a>.</p><p>Identifiers and (unquoted) keywords are 
case insensitive. Thus <code>SELECT</code> is the same than <code>select</code> 
or <code>sElEcT</code>, and <code>myId</code> is the same than 
<code>myid</code> or <code>MYID</code> for instance. A convention often used 
(in particular by the samples of this documentation) is t
 o use upper case for keywords and lower case for other 
identifiers.</p><p>There is a second kind of identifiers called <em>quoted 
identifiers</em> defined by enclosing an arbitrary sequence of characters in 
double-quotes(<code>"</code>). Quoted identifiers are never keywords. Thus 
<code>"select"</code> is not a reserved keyword and can be used to refer to a 
column, while <code>select</code> would raise a parse error. Also, contrarily 
to unquoted identifiers and keywords, quoted identifiers are case sensitive 
(<code>"My Quoted Id"</code> is <em>different</em> from <code>"my quoted 
id"</code>). A fully lowercase quoted identifier that matches 
<code>[a-zA-Z]</code><code>[a-zA-Z0-9_]</code><code>*</code> is equivalent to 
the unquoted identifier obtained by removing the double-quote (so 
<code>"myid"</code> is equivalent to <code>myid</code> and to <code>myId</code> 
but different from <code>"myId"</code>). Inside a quoted identifier, the 
double-quote character can be repeated to escape it
 , so <code>"foo "" bar"</code> is a valid identifier.</p><h3 
id="constants">Constants</h3><p>CQL defines the following kind of 
<em>constants</em>: strings, integers, floats, booleans, uuids and 
blobs:</p><ul><li>A string constant is an arbitrary sequence of characters 
characters enclosed by single-quote(<code>'</code>). One can include a 
single-quote in a string by repeating it, e.g. <code>'It''s raining 
today'</code>. Those are not to be confused with quoted identifiers that use 
double-quotes.</li><li>An integer constant is defined by 
<code>'-'?[0-9]+</code>.</li><li>A float constant is defined by 
<code>'-'?[0-9]+('.'[0-9]*)?([eE][+-]?[0-9+])?</code>. On top of that, 
<code>NaN</code> and <code>Infinity</code> are also float constants.</li><li>A 
boolean constant is either <code>true</code> or <code>false</code> up to 
case-insensitivity (i.e. <code>True</code> is a valid boolean 
constant).</li><li>A <a 
href="http://en.wikipedia.org/wiki/Universally_unique_identifier";>UUID</a> 
constan
 t is defined by <code>hex{8}-hex{4}-hex{4}-hex{4}-hex{12}</code> where 
<code>hex</code> is an hexadecimal character, e.g. <code>[0-9a-fA-F]</code> and 
<code>{4}</code> is the number of such characters.</li><li>A blob constant is 
an hexadecimal number defined by <code>0[xX](hex)+</code> where 
<code>hex</code> is an hexadecimal character, e.g. 
<code>[0-9a-fA-F]</code>.</li></ul><p>For how these constants are typed, see 
the <a href="#types">data types section</a>.</p><h3 
id="Comments">Comments</h3><p>A comment in CQL is a line beginning by either 
double dashes (<code>--</code>) or double slash 
(<code>//</code>).</p><p>Multi-line comments are also supported through 
enclosure within <code>/*</code> and <code>*/</code> (but nesting is not 
supported).</p><pre class="sample"><pre>-- This is a comment
 // This is a comment too
 /* This is
    a multi-line comment */


Reply via email to