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 7918B10326 for ; Tue, 2 Jul 2013 17:29:48 +0000 (UTC) Received: (qmail 59432 invoked by uid 500); 2 Jul 2013 17:29:47 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 59257 invoked by uid 500); 2 Jul 2013 17:29:47 -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 59248 invoked by uid 99); 2 Jul 2013 17:29:47 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 17:29:47 +0000 Received: from localhost (HELO mail-ob0-f178.google.com) (127.0.0.1) (smtp-auth username chewbranca, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 17:29:45 +0000 Received: by mail-ob0-f178.google.com with SMTP id fb19so5837609obc.37 for ; Tue, 02 Jul 2013 10:29:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=RBI8AeLZnjGB0h7MEJ7fBgeybtZzBtYVzqUcXF37ML8=; b=DsR8jff9ydxDtokPILQE2o0hQwV1BaJBw/usCvDiA/YWFUzaHg3IBUEvV6XC7kjeZJ Y6rJqyYUB2FuzzI1ZFJDACwKuoEGyNO8SwV/Yxrtkgax1FZZXeVL503e52D4e8Ts7R5K qgQfNJsdWTpa6rNLBixkcYwMwctiBFLRbkUHf+ybR4/7wsgPW69JXXjaEQHLP3jDYsJu 7+c4e0TNFh2Q2GaW1XddC9G2EeaVM0iIJFaxnMKL3ZBkL5utWt4TTZFfQD7jwdr/Skbd 9mxvZb3miAXnS6CgjOsHweAZM3smaOgnk59pi4WtnPVcONLyzAzXlaa9HCjMyTwRPAzm m3UQ== MIME-Version: 1.0 X-Received: by 10.182.111.199 with SMTP id ik7mr4601835obb.44.1372786184750; Tue, 02 Jul 2013 10:29:44 -0700 (PDT) Received: by 10.60.51.161 with HTTP; Tue, 2 Jul 2013 10:29:44 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Jul 2013 10:29:44 -0700 Message-ID: Subject: Re: On Alternative View Engines From: Russell Branca To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=089e0149cd4ae518d204e08ab03c --089e0149cd4ae518d204e08ab03c Content-Type: text/plain; charset=ISO-8859-1 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 --089e0149cd4ae518d204e08ab03c--