From be7253cf3937f2ea7be8eaa9ddab249c413c699d Mon Sep 17 00:00:00 2001 From: Eric Evans Date: Wed, 23 Mar 2011 01:09:46 +0000 Subject: [PATCH] bump CQL doc version to 1.0 Patch by eevans git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@1084437 13f79535-47bb-0310-9956-ffa450edef68 --- doc/cql/CQL.html | 6 ++++-- doc/cql/CQL.textile | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/cql/CQL.html b/doc/cql/CQL.html index abc8aadb57..2c6e99e671 100644 --- a/doc/cql/CQL.html +++ b/doc/cql/CQL.html @@ -1,4 +1,4 @@ -

Cassandra Query Language (CQL) v0.99.1

Table of Contents

  1. Cassandra Query Language (CQL) v0.99.1
    1. Table of Contents
    2. USE
    3. SELECT
      1. Specifying Columns
      2. Column Family
      3. Consistency Level
      4. Filtering rows
      5. Limits
    4. UPDATE
      1. Column Family
      2. Consistency Level
      3. Specifying Columns and Row
    5. DELETE
      1. Specifying Columns
      2. Column Family
      3. Consistency Level
      4. Specifying Rows
    6. TRUNCATE
    7. CREATE KEYSPACE
    8. CREATE COLUMNFAMILY
      1. Specifying Column Type (optional)
      2. Column Family Options (optional)
    9. CREATE INDEX
    10. DROP
    11. Common Idioms
      1. Specifying Consistency
      2. Term specification

USE

Synopsis:

USE <KEYSPACE>;
+

Cassandra Query Language (CQL) v1.0.0

Table of Contents

  1. Cassandra Query Language (CQL) v1.0.0
    1. Table of Contents
    2. USE
    3. SELECT
      1. Specifying Columns
      2. Column Family
      3. Consistency Level
      4. Filtering rows
      5. Limits
    4. UPDATE
      1. Column Family
      2. Consistency Level
      3. Specifying Columns and Row
    5. DELETE
      1. Specifying Columns
      2. Column Family
      3. Consistency Level
      4. Specifying Rows
    6. TRUNCATE
    7. CREATE KEYSPACE
    8. CREATE COLUMNFAMILY
      1. Specifying Column Type (optional)
      2. Column Family Options (optional)
    9. CREATE INDEX
    10. DROP
    11. Common Idioms
      1. Specifying Consistency
      2. Term specification
  2. Versioning
  3. Changes

USE

Synopsis:

USE <KEYSPACE>;
 

A USE statement consists of the USE 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.

SELECT

Synopsis:

SELECT [FIRST N] [REVERSED] <SELECT EXPR> FROM <COLUMN FAMILY> [USING <CONSISTENCY>]
         [WHERE <CLAUSE>] [LIMIT N];
 

A SELECT 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.

Specifying Columns

SELECT [FIRST N] [REVERSED] name1, name2, name3 FROM ...
@@ -35,4 +35,6 @@ UPDATE ... WHERE KEY IN (keyname1, keyname2)
 

A number of optional keyword arguments can be supplied to control the configuration of a new column family.

keyworddefaultdescription
comparatorutf8Determines sorting and validation of column names. Valid values are identical to the types listed in Specifying Column Type above.
commentnoneA free-form, human-readable comment.
row_cache_size0Number of rows whose entire contents to cache in memory.
key_cache_size200000Number of keys per SSTable whose locations are kept in memory in “mostly LRU” order.
read_repair_chance1.0The probability with which read repairs should be invoked on non-quorum reads.
gc_grace_seconds864000Time to wait before garbage collecting tombstones (deletion markers).
default_validationutf8Determines validation of column values. Valid values are identical to the types listed in Specifying Column Type above.
min_compaction_threshold4Minimum number of SSTables needed to start a minor compaction.
max_compaction_threshold32Maximum number of SSTables allowed before a minor compaction is forced.
row_cache_save_period_in_seconds0Number of seconds between saving row caches.
key_cache_save_period_in_seconds14400Number of seconds between saving key caches.
memtable_flush_after_mins60Maximum time to leave a dirty table unflushed.
memtable_throughput_in_mbdynamicMaximum size of the memtable before it is flushed.
memtable_operations_in_millionsdynamicNumber of operations in millions before the memtable is flushed.
replicate_on_writefalse

CREATE INDEX

Synopsis:

CREATE INDEX [index_name] ON <column_family> (column_name);
 

A CREATE INDEX statement is used to create a new, automatic secondary index for the named column.

DROP

Synopsis:

DROP <KEYSPACE|COLUMNFAMILY> namespace;
 

DROP statements result in the immediate, irreversible removal of keyspace and column family namespaces.

Common Idioms

Specifying Consistency

... USING <CONSISTENCY> ...
-

Consistency level specifications are made up the keyword USING, followed by a consistency level identifier. Valid consistency levels are as follows:

  • CONSISTENCY ZERO
  • CONSISTENCY ONE (default)
  • CONSISTENCY QUORUM
  • CONSISTENCY ALL
  • CONSISTENCY DCQUORUM
  • CONSISTENCY DCQUORUMSYNC

Term specification

Terms are used in statements to specify things such as keyspaces, column families, indexes, column names and values, and keyword arguments. The rules governing term specification are as follows:

  • Any single quoted string literal (example: 'apple').
  • Unquoted alpha-numeric strings that begin with a letter (example: carrot).
  • Unquoted numeric literals (example: 100).
  • UUID strings in hyphen-delimited hex notation (example: 1438fc5c-4ff6-11e0-b97f-0026c650d722).

Terms which do not conform to these rules result in an exception.

How column name/value terms are interpreted is determined by the configured type.

typeterm
asciiAny string which can be decoded using ASCII charset
utf8Any string which can be decoded using UTF8 charset
uuidStandard UUID string format (hyphen-delimited hex notation)
timeuuidStandard UUID string format (hyphen-delimited hex notation)
timeuuidThe string now, to represent a type-1 (time-based) UUID with a date-time component based on the current time
timeuuidNumeric value representing milliseconds since epoch
timeuuidAn iso8601 timestamp
longNumeric value capable of fitting in 8 bytes
intNumeric value of arbitrary size
bytesHex-encoded strings (converted directly to the corresponding bytes)
\ No newline at end of file +

Consistency level specifications are made up the keyword USING, followed by a consistency level identifier. Valid consistency levels are as follows:

Term specification

Terms are used in statements to specify things such as keyspaces, column families, indexes, column names and values, and keyword arguments. The rules governing term specification are as follows:

Terms which do not conform to these rules result in an exception.

How column name/value terms are interpreted is determined by the configured type.

typeterm
asciiAny string which can be decoded using ASCII charset
utf8Any string which can be decoded using UTF8 charset
uuidStandard UUID string format (hyphen-delimited hex notation)
timeuuidStandard UUID string format (hyphen-delimited hex notation)
timeuuidThe string now, to represent a type-1 (time-based) UUID with a date-time component based on the current time
timeuuidNumeric value representing milliseconds since epoch
timeuuidAn iso8601 timestamp
longNumeric value capable of fitting in 8 bytes
intNumeric value of arbitrary size
bytesHex-encoded strings (converted directly to the corresponding bytes)

Versioning

Versioning of the CQL language adheres to the Semantic Versioning guidelines. Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively. There is no correlation between Cassandra release versions and the CQL language version.

versiondescription
PatchThe patch version is incremented when bugs are fixed.
MinorMinor version increments occur when new, but backward compatible, functionality is introduced.
MajorThe major version must be bumped when backward incompatible changes are introduced. This should rarely (if ever) occur.

Changes

Tue, 22 Mar 2011 18:10:28 -0700 - Eric Evans <eevans@rackspace.com>
+ * Initial version, 1.0.0
+
\ No newline at end of file diff --git a/doc/cql/CQL.textile b/doc/cql/CQL.textile index 097cfb5067..f08be160bf 100644 --- a/doc/cql/CQL.textile +++ b/doc/cql/CQL.textile @@ -1,4 +1,4 @@ -h1. Cassandra Query Language (CQL) v0.99.1 +h1. Cassandra Query Language (CQL) v1.0.0 h2. Table of Contents @@ -283,3 +283,18 @@ How column name/value terms are interpreted is determined by the configured type |long|Numeric value capable of fitting in 8 bytes| |int|Numeric value of arbitrary size| |bytes|Hex-encoded strings (converted directly to the corresponding bytes)| + +h1. Versioning + +Versioning of the CQL language adheres to the "Semantic Versioning":http://semver.org guidelines. Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively. There is no correlation between Cassandra release versions and the CQL language version. + +|_. version|_. description| +|Patch|The patch version is incremented when bugs are fixed.| +|Minor|Minor version increments occur when new, but backward compatible, functionality is introduced.| +|Major|The major version _must_ be bumped when backward incompatible changes are introduced. This should rarely (if ever) occur.| + +h1. Changes + +pre. +Tue, 22 Mar 2011 18:10:28 -0700 - Eric Evans + * Initial version, 1.0.0