On Mon, Apr 13, 2009 at 3:57 AM, Mark Hammond <[email protected]> wrote: > As usual, 2 seconds after I hit 'Send' I think of something else to say... > > On 13/04/2009 5:16 PM, Chris Anderson wrote: > >> Something like this then? (also a list of signatures, here) >> >> { >> "_id" : "89a7stdg235", >> "_rev" : "1-26476513", >> "message" : "I said this and I meant it.", >> "date" : "2009/04/09 15:54:08", >> "author" : { >> "name" : "J. Chris Anderson", >> "url" : "http://jchrisa.net", >> "photo" : "http://jchrisa.net/profile.jpg" >> } >> "foo" : "not signed but still a normal field", >> "signatures" : [{ >> "signed-fields: [ "message", "date", "author"], >> etc as described... >> }] >> } > > I've a slight concern about the name 'signatures' here - its not about > 'signatures' per-se, it's more about the assumptions *any* regular word > implies about the 'schema' of the database trying to use this facility. > > In other words, how can we be sure the field 'signatures' doesn't conflict > with a field already in the database? > > I'm not quite up on the full context of this discussion, but I see 2 > potential solutions: > > * Leave it up to the app to dictate the name of the field (ie, 'signatures' > is just an example in the above, but the literal field name is up to the > app) > > or > > * Invent a new naming convention for a category of fields somewhere in > between 'reserved' (ie, those with a leading '_') and application-specific > ones. IOW, assuming the couch impl will not let us use '_signatures', use > something along the lines of '.signatures' - something couch will not > reject, but something which apps can easily avoid. A leading '.' does have > a certain appeal - its almost a 'hidden' field... > > Cheers, > > Mark >
I see it as either a special field or it is not. If it is supported by couchdb proper, I suggest that it really should use the underscore convention '_signatures' just as _rev, _attachments. I use the field 'signatures' in production databases already to track hash values for attachments. I suspect others do too since there are common examples that use this convention, see http://books.couchdb.org/relax/application-deployment for one example. (I know this is turning into a bikeshed, sorry). So to recap, either it is a standard couchdb feature, in which case I am +1 for _signatures -- otherwise it should be up to the application to set the name +0. Regards, Jeff Hinrichs
