Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 62A1ED073 for ; Fri, 12 Oct 2012 07:59:44 +0000 (UTC) Received: (qmail 43923 invoked by uid 500); 12 Oct 2012 07:59:43 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 43792 invoked by uid 500); 12 Oct 2012 07:59:43 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 43758 invoked by uid 99); 12 Oct 2012 07:59:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 07:59:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [176.9.111.84] (HELO ssl.backendmedia.com) (176.9.111.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 07:59:37 +0000 Received: from localhost (unknown [127.0.0.1]) by ssl.backendmedia.com (Postfix) with ESMTP id CF7175EFE377 for ; Fri, 12 Oct 2012 07:59:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from ssl.backendmedia.com ([127.0.0.1]) by localhost (hq2.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id frobD-jfTPSV for ; Fri, 12 Oct 2012 09:59:16 +0200 (CEST) Received: from [192.168.0.177] (77-58-147-243.dclient.hispeed.ch [77.58.147.243]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by ssl.backendmedia.com (Postfix) with ESMTPSA id 980535EFE376 for ; Fri, 12 Oct 2012 09:59:16 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: JCR-SQL2 query From: Lukas Kahwe Smith In-Reply-To: Date: Fri, 12 Oct 2012 09:59:15 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4C2A3FF2-445C-4A62-99A0-DC261E796249@pooteeweet.org> References: To: users@jackrabbit.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org On Oct 12, 2012, at 9:51 , danisevsky wrote: > Hi, >=20 > could someone please help me with JCR-SQL2 query? I would like to do > find out count of all files (photos) which are in some folder > hierarchy. This query is almost what I need >=20 > Select * from [nt:file] as file WHERE ISDESCENDANTNODE(file, > [/brix:root/Data/Users/2/35935/racesPhotos/79]) >=20 > But I need to exclude all files which are on path = "*/imported/small/*". could be tricky. afaik Jackrabbit hasnt implemented the PATH() dynamic = operand. and while we are at it .. it also doesnt support a COUNT() :( ModeShape supports PATH, but also doesnt cover COUNT: = https://docs.jboss.org/author/display/MODE/JCR-SQL2#JCR-SQL2-Pseudocolumns= regards, Lukas Kahwe Smith mls@pooteeweet.org