Return-Path:
Delivered-To: apmail-db-derby-commits-archive@www.apache.org
Received: (qmail 28903 invoked from network); 11 Feb 2008 13:58:51 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2)
by minotaur.apache.org with SMTP; 11 Feb 2008 13:58:51 -0000
Received: (qmail 34549 invoked by uid 500); 11 Feb 2008 13:58:45 -0000
Delivered-To: apmail-db-derby-commits-archive@db.apache.org
Received: (qmail 34476 invoked by uid 500); 11 Feb 2008 13:58:45 -0000
Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm
Precedence: bulk
list-help:
list-unsubscribe:
List-Post:
Reply-To: "Derby Development"
List-Id:
Delivered-To: mailing list derby-commits@db.apache.org
Received: (qmail 34465 invoked by uid 99); 11 Feb 2008 13:58:45 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 05:58:45 -0800
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 13:58:22 +0000
Received: by eris.apache.org (Postfix, from userid 65534)
id 04DC11A9832; Mon, 11 Feb 2008 05:58:31 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r620486 -
/db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita
Date: Mon, 11 Feb 2008 13:58:30 -0000
To: derby-commits@db.apache.org
From: dyre@apache.org
X-Mailer: svnmailer-1.0.8
Message-Id: <20080211135831.04DC11A9832@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: dyre
Date: Mon Feb 11 05:58:29 2008
New Revision: 620486
URL: http://svn.apache.org/viewvc?rev=620486&view=rev
Log:
DERBY-3289: Bracketed comments should be documented in the Derby Tools and Utilities Guide
Patch contributed by Kim Haase
Patch file: DERBY-3289.diff
Modified:
db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita
Modified: db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita?rev=620486&r1=620485&r2=620486&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita (original)
+++ db/derby/docs/trunk/src/tools/rtoolsijcomref16653.dita Mon Feb 11 05:58:29 2008
@@ -21,16 +21,67 @@
Syntax for comments in ij commands
-Syntax -- Text
+Syntax -- Text
+
+/* Text */
+
Description You can use a double dash to create
a comment anywhere within an ij command line and as permitted
by the underlying connection within SQL commands. The comment is ended at
the first new line encountered in the text.
Comments are ignored on
-input and have no effect on the output displayed.
-Example ij> -- this is a comment;
+input and have no effect on the output displayed.
+You can also enclose text in /* */ characters to create
+either one-line or multi-line comments. Nested comments are permitted.
+For example, you could put lines like the following into a script named
+comment.sql:
+
+
+/* start the file with a /* nested comment */ and see what happens */
+connect 'jdbc:derby:newdb;create=true';
+values 'hi!';
+create table t (x int);
+/* use a multi-line comment */
+/*
+insert into t values 1, 2, 3;
+insert into t values 4, 5, 6;
+*/
+/* end the file with a comment */
+values 'This is a test';
+/* This is also a test */
+
+Examples ij> -- this is a comment;
-- the semicolons in the comment are not taken as the end
-- of the command; for that, we put it outside the --:
;
-ij>
+ij>
+
+ij> run 'comment.sql';
+ij> /* start the file with a /* nested comment */ and see what happens */
+connect 'jdbc:derby:newdb;create=true';
+ij> values 'hi!';
+1
+---
+hi!
+
+1 row selected
+ij> create table t (x int);
+0 rows inserted/updated/deleted
+ij> /* use a multi-line comment */
+/*
+insert into t values 1, 2, 3;
+insert into t values 4, 5, 6;
+*/
+/* end the file with a comment */
+values 'This is a test';
+1
+--------------
+This is a test
+
+1 row selected
+ij> /* This is also a test */
+;
+ij>
+
+