Author: eevans
Date: Sat Nov 27 02:22:27 2010
New Revision: 1039596
URL: http://svn.apache.org/viewvc?rev=1039596&view=rev
Log:
updated documentation for CQL TRUNCATE
Patch by eevans for CASSANDRA-1716
Modified:
cassandra/trunk/doc/cql/CQL.html
cassandra/trunk/doc/cql/CQL.textile
Modified: cassandra/trunk/doc/cql/CQL.html
URL:
http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.html?rev=1039596&r1=1039595&r2=1039596&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.html (original)
+++ cassandra/trunk/doc/cql/CQL.html Sat Nov 27 02:22:27 2010
@@ -1,4 +1,4 @@
-<?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"/></head><body><h1
id="CassandraQueryLanguageCQLv0.99.1">Cassandra Query Language (CQL)
v0.99.1</h1><h2 id="TableofContents">Table of Contents</h2><ol
style="list-style: none;"><li><a
href="#CassandraQueryLanguageCQLv0.99.1">Cassandra Query Language (CQL)
v0.99.1</a><ol style="list-style: none;"><li><a href="#TableofContents">Table
of Contents</a></li><li><a href="#USE">USE</a></li><li><a
href="#SELECT">SELECT</a><ol style="list-style: none;"><li><a
href="#SpecifyingColumns">Specifying Columns</a></li><li><a
href="#ColumnFamily">Column Family</a></li><li><a
href="#ConsistencyLevel">Consistency Level</a></li><li><a
href="#Filteringrows">Filtering rows</a></li><li><a
href="#Limits">Limits</a></li></ol></li>
<li><a href="#UPDATE">UPDATE</a><ol style="list-style: none;"><li><a
href="#ColumnFamily2">Column Family</a></li><li><a
href="#ConsistencyLevel2">Consistency Level</a></li><li><a
href="#SpecifyingColumnsandRow">Specifying Columns and
Row</a></li></ol></li><li><a href="#CommonIdioms">Common Idioms</a><ol
style="list-style: none;"><li><a href="#consistency">Specifying
Consistency</a></li><li><a href="#terms">Term specification</a><ol
style="list-style: none;"><li><a href="#StringLiterals">String
Literals</a></li><li><a href="#Integerslongs">Integers /
longs</a></li></ol></li></ol></li></ol></li></ol><h2
id="USE">USE</h2><p><i>Synopsis:</i></p><pre><code>USE <KEYSPACE>;
+<?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"/></head><body><h1
id="CassandraQueryLanguageCQLv0.99.1">Cassandra Query Language (CQL)
v0.99.1</h1><h2 id="TableofContents">Table of Contents</h2><ol
style="list-style: none;"><li><a
href="#CassandraQueryLanguageCQLv0.99.1">Cassandra Query Language (CQL)
v0.99.1</a><ol style="list-style: none;"><li><a href="#TableofContents">Table
of Contents</a></li><li><a href="#USE">USE</a></li><li><a
href="#SELECT">SELECT</a><ol style="list-style: none;"><li><a
href="#SpecifyingColumns">Specifying Columns</a></li><li><a
href="#ColumnFamily">Column Family</a></li><li><a
href="#ConsistencyLevel">Consistency Level</a></li><li><a
href="#Filteringrows">Filtering rows</a></li><li><a
href="#Limits">Limits</a></li></ol></li>
<li><a href="#UPDATE">UPDATE</a><ol style="list-style: none;"><li><a
href="#ColumnFamily2">Column Family</a></li><li><a
href="#ConsistencyLevel2">Consistency Level</a></li><li><a
href="#SpecifyingColumnsandRow">Specifying Columns and
Row</a></li></ol></li><li><a href="#TRUNCATE">TRUNCATE</a></li><li><a
href="#CommonIdioms">Common Idioms</a><ol style="list-style: none;"><li><a
href="#consistency">Specifying Consistency</a></li><li><a href="#terms">Term
specification</a><ol style="list-style: none;"><li><a
href="#StringLiterals">String Literals</a></li><li><a
href="#Integerslongs">Integers /
longs</a></li></ol></li></ol></li></ol></li></ol><h2
id="USE">USE</h2><p><i>Synopsis:</i></p><pre><code>USE <KEYSPACE>;
</code></pre><p>A <code>USE</code> statement consists of the <code>USE</code>
keyword, followed by a valid keyspace name. Its purpose is to assign the
per-connection, current working keyspace. All subsequent keyspace-specific
actions will be performed in the context of the supplied value.</p><h2
id="SELECT">SELECT</h2><p><i>Synopsis:</i></p><pre><code>SELECT [FIRST N]
[REVERSED] <SELECT EXPR> FROM <COLUMN FAMILY> [USING
<CONSISTENCY>]
[WHERE <CLAUSE>] [LIMIT N];
</code></pre><p>A <code>SELECT</code> is used to read one or more records from
a Cassandra column family. It returns a result-set of rows, where each row
consists of a key and a collection of columns corresponding to the
query.</p><h3 id="SpecifyingColumns">Specifying Columns</h3><pre><code>SELECT
[FIRST N] [REVERSED] name1, name2, name3 FROM ...
@@ -18,5 +18,6 @@ UPDATE CF1 SET name1 = value1, name2 = v
UPDATE CF1 SET name3 = value3 WHERE KEY = keyname2;
UPDATE CF2 SET name4 = value4, name5 = value5 WHERE KEY = keyname3;
APPLY BATCH
-</code></pre><p>When batching UPDATEs, a single consistency level is used for
the entire batch, it appears after the <code>BEGIN BATCH</code> statement, and
uses the standard <a href="#consistency">consistency level specification</a>.
Batch UPDATEs default to <code>CONSISTENCY.ONE</code> when left
unspecified.</p><p><em>NOTE: While there are no isolation guarantees,
<code>UPDATE</code> queries are atomic within a give record.</em></p><h2
id="CommonIdioms">Common Idioms</h2><h3 id="consistency">Specifying
Consistency</h3><pre><code>... USING <CONSISTENCY> ...
+</code></pre><p>When batching UPDATEs, a single consistency level is used for
the entire batch, it appears after the <code>BEGIN BATCH</code> statement, and
uses the standard <a href="#consistency">consistency level specification</a>.
Batch UPDATEs default to <code>CONSISTENCY.ONE</code> when left
unspecified.</p><p><em>NOTE: While there are no isolation guarantees,
<code>UPDATE</code> queries are atomic within a give record.</em></p><h2
id="TRUNCATE">TRUNCATE</h2><p><em>Synopsis:</em></p><pre><code>TRUNCATE
<COLUMN FAMILY>
+</code></pre><p>Accepts a single argument for the column family name, and
permanently removes all data from said column family.</p><h2
id="CommonIdioms">Common Idioms</h2><h3 id="consistency">Specifying
Consistency</h3><pre><code>... USING <CONSISTENCY> ...
</code></pre><p>Consistency level specifications are made up the keyword
<code>USING</code>, followed by a consistency level identifier. Valid
consistency levels are as
follows:</p><ul><li><code>CONSISTENCY.ZERO</code></li><li><code>CONSISTENCY.ONE</code>
(default)</li><li><code>CONSISTENCY.QUORUM</code></li><li><code>CONSISTENCY.ALL</code></li><li><code>CONSISTENCY.DCQUORUM</code></li><li><code>CONSISTENCY.DCQUORUMSYNC</code></li></ul><h3
id="terms">Term specification</h3><p>Where possible, the type of terms are
inferred; the following term types are supported:</p><h4
id="StringLiterals">String Literals</h4><p>String literals are any value
enclosed in double-quotes, (`"`). String literals are treated as raw bytes; no
interpolation is performed.</p><h4 id="Integerslongs">Integers /
longs</h4><p>Integers are any term consisting soley of unquoted numericals,
longs are any otherwise valid integer term followed by an upper case
“L”, (e.g. 100L). It is an error to s
pecify an integer term that will not fit in 4 bytes unsigned, or a long that
will not fit in 8 bytes unsigned.</p></body></html>
\ No newline at end of file
Modified: cassandra/trunk/doc/cql/CQL.textile
URL:
http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.textile?rev=1039596&r1=1039595&r2=1039596&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.textile (original)
+++ cassandra/trunk/doc/cql/CQL.textile Sat Nov 27 02:22:27 2010
@@ -112,6 +112,15 @@ When batching UPDATEs, a single consiste
_NOTE: While there are no isolation guarantees, @UPDATE@ queries are atomic
within a give record._
+h2. TRUNCATE
+
+_Synopsis:_
+
+bc.
+TRUNCATE <COLUMN FAMILY>
+
+Accepts a single argument for the column family name, and permanently removes
all data from said column family.
+
h2. Common Idioms
h3(#consistency). Specifying Consistency