Author: tylerhobbs
Date: Thu Dec 31 21:36:17 2015
New Revision: 1722472
URL: http://svn.apache.org/viewvc?rev=1722472&view=rev
Log:
Fix CREATE MV formatting in CQL docs
Modified:
cassandra/site/publish/doc/cql3/CQL-3.0.html
Modified: cassandra/site/publish/doc/cql3/CQL-3.0.html
URL:
http://svn.apache.org/viewvc/cassandra/site/publish/doc/cql3/CQL-3.0.html?rev=1722472&r1=1722471&r2=1722472&view=diff
==============================================================================
--- cassandra/site/publish/doc/cql3/CQL-3.0.html (original)
+++ cassandra/site/publish/doc/cql3/CQL-3.0.html Thu Dec 31 21:36:17 2015
@@ -138,7 +138,19 @@ CREATE CUSTOM INDEX ON users (email) USI
</pre></pre><p><i>Sample:</i></p><pre class="sample"><pre>DROP INDEX userIndex;
DROP INDEX userkeyspace.address_index;
-</pre></pre><p><br/>The <code>DROP INDEX</code> statement is used to drop an
existing secondary index. The argument of the statement is the index name,
which may optionally specify the keyspace of the index.</p><p>If the index does
not exists, the statement will return an error, unless <code>IF EXISTS</code>
is used in which case the operation is a no-op.</p><h3 id="createMVStmt">CREATE
MATERIALIZED
VIEW</h3><p><i>Syntax:</i></p><p>bc(syntax)..<br/><create-table-stmt> ::=
CREATE MATERIALIZED VIEW ( IF NOT EXISTS )? <viewname> AS<br/>
SELECT ( ‘(’ <identifier> ( ‘,’ <identifier> )
* ‘)’ | ‘*’ )<br/> FROM
<tablename><br/> WHERE ( <identifier> IS NOT NULL (
AND <identifier> IS NOT NULL )* )?<br/> PRIMARY KEY
‘(’ <partition-key> ( ‘,’ <identifier> )* ')'<br/>
( WITH <option> ( AND <option>)* )
?<br/><i>Sample:</i></p><p>bc(sample)..<br/>CREATE MATERIALIZED VIEW
monkeySpecies_by_population AS<br/> SELECT *<br/> FROM monkeySpecies<br/>
WHERE population IS NOT NULL AND species IS NOT NULL<br/> PRIMARY KEY
(population, species)<br/> WITH comment=‘Allow query by population
instead of species’;<br/>p.<br/>The <code>CREATE MATERIALIZED VIEW</code>
statement creates a new materialized view. Each such view is a set of
<em>rows</em> which corresponds to rows which are present in the underlying, or
base, table specified in the <code>SELECT</code> statement. A materialized view
cannot be directly updated, but updates to the base table will cause
corresponding updates in the view.</p><p>Attempting to create an already
existing materialized view will return an error unless the <code>IF NOT
EXISTS</code> option is used. If it is used, the statement will be a no-op if
the materialized view already exists.</p><h4 id="createMVWhere"><code>WHERE
<identifier> IS
NOT NULL</code></h4><p>The where clause is required to explicitly exclude all
primary key columns' null values. Any row which contains null values in the
primary key will not be present in the materialized view.</p><h3
id="alterMVStmt">ALTER MATERIALIZED VIEW</h3><p><i>Syntax:</i></p><pre
class="syntax"><pre><alter-materialized-view-stmt> ::= ALTER MATERIALIZED
VIEW <viewname>
+</pre></pre><p><br/>The <code>DROP INDEX</code> statement is used to drop an
existing secondary index. The argument of the statement is the index name,
which may optionally specify the keyspace of the index.</p><p>If the index does
not exists, the statement will return an error, unless <code>IF EXISTS</code>
is used in which case the operation is a no-op.</p><h3 id="createMVStmt">CREATE
MATERIALIZED VIEW</h3><p><i>Syntax:</i></p><pre
class="syntax"><pre><create-table-stmt> ::= CREATE MATERIALIZED VIEW ( IF
NOT EXISTS )? <viewname> AS
+ SELECT ( '(' <identifier> ( ',' <identifier> )
* ')' | '*' )
+ FROM <tablename>
+ WHERE ( <identifier> IS NOT NULL ( AND
<identifier> IS NOT NULL )* )?
+ PRIMARY KEY '(' <partition-key> ( ','
<identifier> )* ')'
+ ( WITH <option> ( AND <option>)* )?
+</pre></pre><p><br/><i>Sample:</i></p><pre class="sample"><pre>CREATE
MATERIALIZED VIEW monkeySpecies_by_population AS
+ SELECT *
+ FROM monkeySpecies
+ WHERE population IS NOT NULL AND species IS NOT NULL
+ PRIMARY KEY (population, species)
+ WITH comment='Allow query by population instead of species';
+</pre></pre><p><br/>The <code>CREATE MATERIALIZED VIEW</code> statement
creates a new materialized view. Each such view is a set of <em>rows</em> which
corresponds to rows which are present in the underlying, or base, table
specified in the <code>SELECT</code> statement. A materialized view cannot be
directly updated, but updates to the base table will cause corresponding
updates in the view.</p><p>Attempting to create an already existing
materialized view will return an error unless the <code>IF NOT EXISTS</code>
option is used. If it is used, the statement will be a no-op if the
materialized view already exists.</p><h4 id="createMVWhere"><code>WHERE
<identifier> IS NOT NULL</code></h4><p>The where clause is required to
explicitly exclude all primary key columns' null values. Any row which contains
null values in the primary key will not be present in the materialized
view.</p><h3 id="alterMVStmt">ALTER MATERIALIZED
VIEW</h3><p><i>Syntax:</i></p><pre class="syntax"><pre><alte
r-materialized-view-stmt> ::= ALTER MATERIALIZED VIEW <viewname>
WITH <option> ( AND
<option> )*
</pre></pre><p>p.<br/>The <code>ALTER MATERIALIZED VIEW</code> statement
allows options to be update; these options are the same as <a
href="#createTableOptions"><code>CREATE TABLE</code>'s options</a>.</p><h3
id="dropMVStmt">DROP MATERIALIZED VIEW</h3><p><i>Syntax:</i></p><pre
class="syntax"><pre><drop-materialized-stmt> ::= DROP MATERIALIZED VIEW ( IF
EXISTS )? <tablename>
</pre></pre><p><i>Sample:</i></p><pre class="sample"><pre>DROP MATERIALIZED
VIEW monkeySpecies_by_population;