Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 80529 invoked from network); 1 Oct 2010 18:56:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 18:56:59 -0000 Received: (qmail 50595 invoked by uid 500); 1 Oct 2010 18:56:59 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 50576 invoked by uid 500); 1 Oct 2010 18:56:58 -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 50568 invoked by uid 99); 1 Oct 2010 18:56:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 18:56:58 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 18:56:56 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o91IuZV3026506 for ; Fri, 1 Oct 2010 18:56:35 GMT Message-ID: <20274820.502341285959395270.JavaMail.jira@thor> Date: Fri, 1 Oct 2010 14:56:35 -0400 (EDT) From: "Jim Ancona (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Updated: (CASSANDRA-1088) Enable cassandra-cli to list rows, and page through rows in a column family In-Reply-To: <29668410.24861273781083894.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Ancona updated CASSANDRA-1088: ---------------------------------- Attachment: cassandra-cli-list.patch > Enable cassandra-cli to list rows, and page through rows in a column family > --------------------------------------------------------------------------- > > Key: CASSANDRA-1088 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1088 > Project: Cassandra > Issue Type: New Feature > Components: Tools > Reporter: Frank Du > Fix For: 0.7.1 > > Attachments: cassandra-cli-list.patch, patch.txt, path-2010-0602.txt > > > I have been looking for showing rows and paging through rows. Finally I write this extension to cassandra-cli tool. > Let's assume that we have the following data in column family named 'CF1': > ========================= > Row 1: > key: fdu1, name: 'Frank Du', city: 'NYC' > Row 2: > key: fdu2, name: 'Jonathan Ellis' > Row 3: > key: fdu3, name: 'Eric Evans' > Syntax: > ========================= > LIST keyRangeExpression limitClause? > keyRangeExpression: > columnFamilyName[ startKey : endKey ] ( [ 'superCoumnName' ] )? > limitClause: > LIMIT count (OFFSET offset)? > \| LIMIT offset, count > The limit clause is the same with MySql. > Examples: > ========================= > // list all the 3 rows in CF1 > list CF1[ '' : '' ] > // list all rows, offset from index 1. So it will show 2 rows > list CF1[ '' : '' ] limit 1, 10 > // show the rows 'fdu2' and 'fdu3' > list CF1[ 'fdu2' : '' ] limit 10 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.