Fix minor errors 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/02d26214
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/02d26214
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/02d26214

Branch: refs/heads/trunk
Commit: 02d262146930c7dda7d2bebe9363a06de504c5aa
Parents: 0e62423
Author: Sylvain Lebresne <sylv...@datastax.com>
Authored: Mon Jun 27 12:18:35 2016 +0200
Committer: Sylvain Lebresne <sylv...@datastax.com>
Committed: Mon Jun 27 15:02:05 2016 +0200

----------------------------------------------------------------------
 doc/source/cql/ddl.rst         | 39 +++++++++++++++++++++----------------
 doc/source/cql/definitions.rst |  6 +++---
 doc/source/cql/dml.rst         | 13 +++++++------
 doc/source/cql/indexes.rst     |  8 ++++++++
 doc/source/cql/mvs.rst         |  6 ++++++
 doc/source/cql/triggers.rst    |  6 ++++++
 6 files changed, 52 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/ddl.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/ddl.rst b/doc/source/cql/ddl.rst
index 948298b..7f3431a 100644
--- a/doc/source/cql/ddl.rst
+++ b/doc/source/cql/ddl.rst
@@ -50,6 +50,11 @@ Further, a table is always part of a keyspace and a table 
name can be provided f
 part of. If is is not fully-qualified, the table is assumed to be in the 
*current* keyspace (see :ref:`USE statement
 <use-statement>`).
 
+Further, the valid names for columns is simply defined as:
+
+.. productionlist::
+   column_name: `identifier`
+
 We also define the notion of statement options for use in the following 
section:
 
 .. productionlist::
@@ -164,15 +169,15 @@ Creating a new table uses the ``CREATE TABLE`` statement:
                          :     ( ',' `column_definition` )*
                          :     [ ',' PRIMARY KEY '(' `primary_key` ')' ]
                          : ')' [ WITH `table_options` ]
-   column_definition: `identifier` `cql_type` [ STATIC ] [ PRIMARY KEY]
+   column_definition: `column_name` `cql_type` [ STATIC ] [ PRIMARY KEY]
    primary_key: `partition_key` [ ',' `clustering_columns` ]
-   partition_key: `identifier`
-                : | '(' `identifier` ( ',' `identifier` )* ')'
-   clustering_columns: `identifier` ( ',' `identifier` )*
+   partition_key: `column_name`
+                : | '(' `column_name` ( ',' `column_name` )* ')'
+   clustering_columns: `column_name` ( ',' `column_name` )*
    table_options: COMPACT STORAGE [ AND `table_options` ]
                    : | CLUSTERING ORDER BY '(' `clustering_order` ')' [ AND 
`table_options` ]
                    : | `options`
-   clustering_order: `identifier` (ASC | DESC) ( ',' `identifier` (ASC | DESC) 
)*
+   clustering_order: `column_name` (ASC | DESC) ( ',' `column_name` (ASC | 
DESC) )*
 
 For instance::
 
@@ -554,9 +559,9 @@ Altering an existing table uses the ``ALTER TABLE`` 
statement:
 
 .. productionlist::
    alter_table_statement: ALTER TABLE `table_name` `alter_table_instruction`
-   alter_table_instruction: ALTER `identifier` TYPE `cql_type`
-                          : | ADD `identifier` `cql_type` ( ',' `identifier` 
`cql_type` )*
-                          : | DROP `identifier` ( `identifier` )*
+   alter_table_instruction: ALTER `column_name` TYPE `cql_type`
+                          : | ADD `column_name` `cql_type` ( ',' `column_name` 
`cql_type` )*
+                          : | DROP `column_name` ( `column_name` )*
                           : | WITH `options`
 
 For instance::
@@ -631,15 +636,15 @@ CQL data types may be converted only as the following 
table.
 
 Clustering columns have stricter requirements, only the following conversions 
are allowed:
 
-+------------------------+-------------------+
-| Existing type          | Can be altered to |
-+========================+===================+
-| ascii, text, varchar   | blob              |
-+------------------------+-------------------+
-| ascii, varchar         | text              |
-+------------------------+-------------------+
-| ascii, text            | varchar           |
-+------------------------+-------------------+
++------------------------+----------------------+
+| Existing type          | Can be altered to    |
++========================+======================+
+| ascii, text, varchar   | blob                 |
++------------------------+----------------------+
+| ascii, varchar         | text                 |
++------------------------+----------------------+
+| ascii, text            | varchar              |
++------------------------+----------------------+
 
 .. _drop-table-statement:
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/definitions.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/definitions.rst b/doc/source/cql/definitions.rst
index 5f0cafb..6c3b522 100644
--- a/doc/source/cql/definitions.rst
+++ b/doc/source/cql/definitions.rst
@@ -199,14 +199,14 @@ All the statements are listed below and are described in 
the rest of this docume
                                 : | `drop_role_statement`
                                 : | `grant_role_statement`
                                 : | `revoke_role_statement`
-                                : | `list_role_statement`
+                                : | `list_roles_statement`
                                 : | `grant_permission_statement`
                                 : | `revoke_permission_statement`
-                                : | `list_permission_statement`
+                                : | `list_permissions_statement`
                                 : | `create_user_statement`
                                 : | `alter_user_statement`
                                 : | `drop_user_statement`
-                                : | `list_user_statement`
+                                : | `list_users_statement`
     udf_statement: `create_function_statement`
                  : | `drop_function_statement`
                  : | `create_aggregate_statement`

http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/dml.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/dml.rst b/doc/source/cql/dml.rst
index 58fdb05..989c0ca 100644
--- a/doc/source/cql/dml.rst
+++ b/doc/source/cql/dml.rst
@@ -39,17 +39,17 @@ Querying data from data is done using a ``SELECT`` 
statement:
                    : [ LIMIT (`integer` | `bind_marker`) ]
                    : [ ALLOW FILTERING ]
    select_clause: `selector` [ AS `identifier` ] ( ',' `selector` [ AS 
`identifier` ] )
-   selector: `identifier`
+   selector: `column_name`
            : | `term`
            : | CAST '(' `selector` AS `cql_type` ')'
            : | `function_name` '(' [ `selector` ( ',' `selector` )* ] ')'
            : | COUNT '(' '*' ')'
    where_clause: `relation` ( AND `relation` )*
-   relation: `identifier` `operator` `term`
-           : '(' `identifier` ( ',' `identifier` )* ')' `operator` 
`tuple_literal`
-           : TOKEN '(' `identifier` ( ',' `identifier` )* ')' `operator` `term`
+   relation: `column_name` `operator` `term`
+           : '(' `column_name` ( ',' `column_name` )* ')' `operator` 
`tuple_literal`
+           : TOKEN '(' `column_name` ( ',' `column_name` )* ')' `operator` 
`term`
    operator: '=' | '<' | '>' | '<=' | '>=' | '!=' | IN | CONTAINS | CONTAINS 
KEY
-   ordering_clause: `identifier` [ ASC | DESC ] ( ',' `identifier` [ ASC | 
DESC ] )*
+   ordering_clause: `column_name` [ ASC | DESC ] ( ',' `column_name` [ ASC | 
DESC ] )*
 
 For instance::
 
@@ -295,7 +295,8 @@ Inserting data for a row is done using an ``INSERT`` 
statement:
                    : [ IF NOT EXISTS ]
                    : [ USING `update_parameter` ( AND `update_parameter` )* ]
    names_values: `names` VALUES `tuple_literal`
-   names: '(' `identifier` ( ',' `identifier` )* ')'
+   json_clause: JSON `string`
+   names: '(' `column_name` ( ',' `column_name` )* ')'
 
 For instance::
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/indexes.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/indexes.rst b/doc/source/cql/indexes.rst
index 40b9f49..fbe5827 100644
--- a/doc/source/cql/indexes.rst
+++ b/doc/source/cql/indexes.rst
@@ -21,6 +21,14 @@
 Secondary Indexes
 -----------------
 
+CQL supports creating secondary indexes on tables, allowing queries on the 
table to use those indexes. A secondary index
+is identified by a name defined by:
+
+.. productionlist::
+   index_name: re('[a-zA-Z_0-9]+')
+
+
+
 .. _create-index-statement:
 
 CREATE INDEX

http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/mvs.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/mvs.rst b/doc/source/cql/mvs.rst
index c6e3ef7..84c18e0 100644
--- a/doc/source/cql/mvs.rst
+++ b/doc/source/cql/mvs.rst
@@ -21,6 +21,12 @@
 Materialized Views
 ------------------
 
+Materialized views names are defined by:
+
+.. productionlist::
+   view_name: re('[a-zA-Z_0-9]+')
+
+
 .. _create-materialized-view-statement:
 
 CREATE MATERIALIZED VIEW

http://git-wip-us.apache.org/repos/asf/cassandra/blob/02d26214/doc/source/cql/triggers.rst
----------------------------------------------------------------------
diff --git a/doc/source/cql/triggers.rst b/doc/source/cql/triggers.rst
index eae2e81..3bba72d 100644
--- a/doc/source/cql/triggers.rst
+++ b/doc/source/cql/triggers.rst
@@ -21,6 +21,12 @@
 Triggers
 --------
 
+Triggers are identified by a name defined by:
+
+.. productionlist::
+   trigger_name: `identifier`
+
+
 .. _create-trigger-statement:
 
 CREATE TRIGGER

Reply via email to