Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B56579DDF for ; Mon, 13 Feb 2012 17:54:58 +0000 (UTC) Received: (qmail 24426 invoked by uid 500); 13 Feb 2012 17:54:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 24343 invoked by uid 500); 13 Feb 2012 17:54:56 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 24335 invoked by uid 99); 13 Feb 2012 17:54:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 17:54:56 +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 paul.joseph.davis@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 17:54:49 +0000 Received: by vbih1 with SMTP id h1so4764034vbi.11 for ; Mon, 13 Feb 2012 09:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=XDZIbrIaTxtm0fv+gpr0V7lSE1uKJzShct/wYpwVC+4=; b=m5SRf7AZ/Z2GnkaJmIRBvsQDKaSwbD/JyzxCyr7CvPhDo2hRret2fSL2hCp74jUiLA 6mfm68LN277IYME8Mo7rNVe0RMHsGaTGjk04vjeDJyM4HRqUcRHm3g4Scd4g+i08cEjr xWijAvpKL2vOaUT0RHISKHNxriyirAB+e9PwY= Received: by 10.220.224.136 with SMTP id io8mr8887157vcb.4.1329155669208; Mon, 13 Feb 2012 09:54:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.188.1 with HTTP; Mon, 13 Feb 2012 09:53:48 -0800 (PST) In-Reply-To: <87obt27o9o.fsf@gmail.com> References: <87obt27o9o.fsf@gmail.com> From: Paul Davis Date: Mon, 13 Feb 2012 11:53:48 -0600 Message-ID: Subject: Re: Erlang view question To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is just an Erlang question, but it'd be something like: {Props} =3D Doc, case proplists:get_value(created_at, Props) of ValueICareAbout -> % Do stuff _ -> ok end There are a few examples in the test suites that should give you a decent look at writing Erlang functions. On Mon, Feb 13, 2012 at 9:21 AM, bsquared wrote: > Hello, I am experimenting with Erlang for views and am having trouble > locating an example of how a field should be evaluated for assignment. > > ie. > > I have noticed views generally have an assignment check > =A0if (doc.created_at) { > > =A0} > > How would this be coded in Erlang? =A0From what I have found Erlang doesn= 't > have a null. > > Thank you. > > -- > Regards, > Brian >