incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Goacher <julian.goac...@gmail.com>
Subject Re: Proposal regarding reserved names
Date Fri, 30 Oct 2009 11:01:57 GMT
Using a $ prefix is my fallback position.

My proposal is predicated on the idea that the user is aware of the _
contract - i.e. they know they are using couchdb. I'm looking for a way to
piggyback on the convention that such names are private or system names, and
trying to avoid adding a new convention - e.g. using a $ prefix.

Are there particular technical considerations against such a property, or is
it just a desire to avoid cluttering up the namespace?

(Also, would it be preferable to move this conversation to the dev list?)

Regards,

/julian.

On Fri, Oct 30, 2009 at 10:44 AM, Brian Candler <B.Candler@pobox.com> wrote:

> On Thu, Oct 29, 2009 at 11:19:18PM +0000, Julian Goacher wrote:
> > I think this is a slightly different use case though. The framework sits
> as
> > a layer between the user and the db; I don't want the user to wrap their
> > data to use the framework. Rather, I want to annotate a user generated
> > document with additional data - which is essentially what the existing
> > underscored names currently do.
>
> I make the following observation: if you don't want to wrap the user's
> object, then you must already have a contract with your user that the
> object
> they are storing must not have any property starting with an underscore
> (because that would be rejected by CouchDB).
>
> So why not just extend this contract to say that they cannot have a
> property
> called $meta or meta_ or some other property name that you reserve?
>
> Regards,
>
> Brian.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message