Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 83672 invoked from network); 2 Dec 2008 03:08:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 03:08:38 -0000 Received: (qmail 33606 invoked by uid 500); 2 Dec 2008 03:08:48 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 33578 invoked by uid 500); 2 Dec 2008 03:08:48 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 33567 invoked by uid 99); 2 Dec 2008 03:08:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 19:08:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jrhuggins@gmail.com designates 209.85.221.10 as permitted sender) Received: from [209.85.221.10] (HELO mail-qy0-f10.google.com) (209.85.221.10) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 03:07:19 +0000 Received: by qyk3 with SMTP id 3so1943710qyk.12 for ; Mon, 01 Dec 2008 19:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=X0aNCbgRJJW7bW7fbdq6ff+eMo5XkaMJy9RNpyUYNO0=; b=Gv1pagpruts6uWHElUxJnqXRrusVa/9hqPo13l+75LTJIn+/4wBFBC3IEDoglYy8+k ogBbyiYVeNAowo9dz0jJs3eyXCSn0SIkkW6oHmxAMkA3qtgALYxBfJ+tjuwOF0+TEihz WX24ngfnzW9aD1IEfL+coYPXtF+VBsP+BIUo8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Uat4nfIQshouk6TYozNjRhde9v7/uJfnLBO1Go8DFMM9lP3NaX/Bprp6oUbeGlfLM1 mL6Gx3lJb3EdkmXqN4kUt3UqMOzv2z3ghLNMogZjht1yeO73KuamIzVizyzWlvb866zX tYkUYQ2foI+kr+k+HSQyPLnMIs+j1TCNXuP/w= Received: by 10.214.11.12 with SMTP id 12mr10875977qak.117.1228187226323; Mon, 01 Dec 2008 19:07:06 -0800 (PST) Received: by 10.215.14.3 with HTTP; Mon, 1 Dec 2008 19:07:06 -0800 (PST) Message-ID: <53b9568a0812011907u25e99f06s7ee1c036356942df@mail.gmail.com> Date: Mon, 1 Dec 2008 21:07:06 -0600 From: "Jason Huggins" Sender: jrhuggins@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: Auto-adding additional fields on PUT/POST? (datetime stamps) In-Reply-To: <493487C8.5060206@silencegreys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <53b9568a0812010829n49ce2eebl89419e5db0b536a4@mail.gmail.com> <493487C8.5060206@silencegreys.com> X-Google-Sender-Auth: 78590cb808096a6b X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Dec 1, 2008 at 6:56 PM, Jedediah Smith wrote: > The new validation functions might be able to do this for you if they are > allowed to modify the document. Whether or not they are was asked on the dev > list but not answered. I hope they are as that would be endlessly useful. It > would be *really* neat if a function could also handle merging for revision > conflicts. Are validation functions in trunk or a released version?... or still on the drawing board? (I suppose I should switch to the dev list to ask that question to a more targeted audience.) :-) I have another idea for tracking timestamps and other meta-data. I think I'll create a meta-data database for each "real" database. Since I'd like to give my users free reign to edit their own documents in the real database, but *not* be able to edit createdAt and lastModified timestamps. So, with a meta-data db, I can set it up so only my server has write permission to that meta-db, but the user can read from it. The downside is that combining the data and meta-data into a unified view of the document would have to happen on the client side, not on the couchdb side, since (as I understand it), couchdb can't do cross-database map/reducing views. - jason huggins http://saucelabs.com