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 D5043EF7B for ; Mon, 4 Feb 2013 14:53:12 +0000 (UTC) Received: (qmail 55731 invoked by uid 500); 4 Feb 2013 14:53:11 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 54908 invoked by uid 500); 4 Feb 2013 14:53:05 -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 54852 invoked by uid 99); 4 Feb 2013 14:53:02 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 14:53:02 +0000 Received: from localhost (HELO mail-ve0-f178.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 14:53:02 +0000 Received: by mail-ve0-f178.google.com with SMTP id db10so4721998veb.23 for ; Mon, 04 Feb 2013 06:53:01 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.52.34.176 with SMTP id a16mr20399402vdj.44.1359989581251; Mon, 04 Feb 2013 06:53:01 -0800 (PST) Received: by 10.52.68.209 with HTTP; Mon, 4 Feb 2013 06:53:01 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Feb 2013 14:53:01 +0000 Message-ID: Subject: Re: Update Handler: unique property From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Only the _id is unique, so you could put the MAC address in your _id or as your _id. B. On 4 February 2013 14:50, Anthony Ananich wrote: > Hi! > > I have a database of documents like that: > { > "_id" : "37686beb8d65e74665af55e69801a62c", > "ip" : "192.168.1.1", > "mac" : "01:23:45:67:89:ab" > } > And I have a design doc with update handler. How can I check if a new > document have an unique mac address? Is it possible in CouchDB? If no, > than do any walkarounds exist? > > Thanks! > Anthony