incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Erlang view question
Date Mon, 13 Feb 2012 17:53:48 GMT
This is just an Erlang question, but it'd be something like:

{Props} = 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 <bwcode4u@gmail.com> 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
>  if (doc.created_at) {
>
>  }
>
> How would this be coded in Erlang?  From what I have found Erlang doesn't
> have a null.
>
> Thank you.
>
> --
> Regards,
> Brian
>

Mime
View raw message