Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE5121064D for ; Wed, 5 Feb 2014 15:38:34 +0000 (UTC) Received: (qmail 96377 invoked by uid 500); 5 Feb 2014 15:38:30 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 96248 invoked by uid 500); 5 Feb 2014 15:38:29 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 95948 invoked by uid 99); 5 Feb 2014 15:38:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 15:38:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C0EAC91C18F; Wed, 5 Feb 2014 15:38:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: slebresne@apache.org To: commits@cassandra.apache.org Date: Wed, 05 Feb 2014 15:38:29 -0000 Message-Id: In-Reply-To: <695ba33b4f9146a9816c46b16c819a6b@git.apache.org> References: <695ba33b4f9146a9816c46b16c819a6b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/5] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0 Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt NEWS.txt build.xml debian/changelog Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/49bb972c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/49bb972c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/49bb972c Branch: refs/heads/trunk Commit: 49bb972c6f79c6717b4750488bdcb035bb770784 Parents: 29670eb 16efdf4 Author: Sylvain Lebresne Authored: Wed Feb 5 16:36:50 2014 +0100 Committer: Sylvain Lebresne Committed: Wed Feb 5 16:36:50 2014 +0100 ---------------------------------------------------------------------- doc/cql3/CQL.textile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/49bb972c/doc/cql3/CQL.textile ---------------------------------------------------------------------- diff --cc doc/cql3/CQL.textile index cf73708,b18ce22..f82fc19 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@@ -459,11 -443,9 +457,11 @@@ INSERT INTO NerdMovies (movie, director VALUES ('Serenity', 'Joss Whedon', 'Nathan Fillion', 2005) USING TTL 86400; - The @INSERT@ statement writes one or more columns for a given row in a table. Note that since a row is identified by its @PRIMARY KEY@, the columns that compose it must be specified. Also, since a row only exists when it contains one value for a column not part of the @PRIMARY KEY@, one such value must be specified too. + The @INSERT@ statement writes one or more columns for a given row in a table. Note that since a row is identified by its @PRIMARY KEY@, at least the columns composing it must be specified. -Note that unlike in SQL, @INSERT@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. +Note that unlike in SQL, @INSERT@ does not check the prior existence of the row by default: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. + +It is however possible to use the @IF NOT EXISTS@ condition to only insert if the row does not exist prior to the insertion. But please note that using @IF NOT EXISTS@ will incur a non negligible performance cost (internally, Paxos will be used) so this should be used sparingly. All updates for an @INSERT@ are applied atomically and in isolation.