Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0099910B90 for ; Tue, 2 Jul 2013 21:25:28 +0000 (UTC) Received: (qmail 70151 invoked by uid 500); 2 Jul 2013 21:25:27 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 70116 invoked by uid 500); 2 Jul 2013 21:25:27 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 70108 invoked by uid 99); 2 Jul 2013 21:25:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 21:25:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kxepal@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 21:25:23 +0000 Received: by mail-wi0-f174.google.com with SMTP id k10so4611153wiv.13 for ; Tue, 02 Jul 2013 14:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CqmOJ5KKYtRkM33F/txbKRR6Sjmo1wWcO4ILZyS7X3o=; b=R7g6V+zDFl6VdV2F5K2BOPMDosR7A5Z2jNu/+JBe4BQOinF/X+xfUfdM8SUfknzpvV 6y3jfthDV79vi9SyNSeqhjtvkn+OOQ/zJt4dKElfkfkJq8CwrEpErTuGo9ueJohXvDa7 MWDbHh/+pGNJabPGINx64VRhqa9Brlz8BEsiDWm+rJ+2yudtUckYhALpw9m/JdxVs0pS 6tt9qQ+q7ydfX9PxQxO4ZYNLduR/eYJySJgDU78PgzV2iE73XCxaOaHhCkT2ML76Rgtd N5ZX5+DS2MVZdwP3/Oimy0OvrGpMTg2ubXj5cBcUr6eGiygktJxz+Q3vxGTkb7dLLa/V fBCg== MIME-Version: 1.0 X-Received: by 10.195.12.133 with SMTP id eq5mr24732824wjd.27.1372800302164; Tue, 02 Jul 2013 14:25:02 -0700 (PDT) Received: by 10.181.11.138 with HTTP; Tue, 2 Jul 2013 14:25:02 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Jul 2013 01:25:02 +0400 Message-ID: Subject: Re: On Alternative View Engines From: Alexander Shorin To: "dev@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org That's right so why it's called JSON pointer - it was design for a bit different proposes, but still may be useful for DSL/DDL. -- ,,,^..^,,, On Tue, Jul 2, 2013 at 9:29 PM, Russell Branca wrote: > On Tue, Jul 2, 2013 at 10:07 AM, Alexander Shorin wrote: > >> On Tue, Jul 2, 2013 at 8:31 PM, Russell Branca >> wrote: >> > I like the link to JSON Pointer, Alexander, that's intriguing. Something >> > like that could be very useful for simple views, although the RFC is >> quite >> > vague on edge cases, ie how would you implement something like if >> (doc.type >> > == "foo") emit(doc.bar, doc.baz) with JSON pointer. Speaking of JSON >> > pointer, looks like Jan beat us to the punch ;-) >> > https://github.com/janl/erl-jsonpointer >> >> JSON Pointer suggest to raise an error in case if pointer points to >> the non existed value. >> Probably, this case in DDL context will be like: >> >> with doc emit /bar, /baz if /type is "foo" >> >> loops: >> >> with doc map(emit(/bar, /baz) for foo in /boo if /bar is null break) >> >> a bit pythonic, but please don't shoot (: >> >> -- >> ,,,^..^,,, >> > > Sure, so we can create a DDL or what have you, but unless I'm missing > something, I don't see a way to make a view that filters on doc.type or > some other field, and then emits a simple set of values, which I think is > required for a minimal view implementation. The idea of JSON pointers where > we can just let users define path strings for the key and value is really > intriguing, but missing functionality. > > > -Russell