← Back to team overview

u1db-discuss team mailing list archive

Re: API Design

 

On Fri, 2011-11-11 at 08:52 +0000, Stuart Langridge wrote:
> I think you might be under a bit of a misapprehension here. The thing
> that you pass to the Python functions as a "doc" is a JSON string. It's
> not a Python dictionary or some other complex type. Our basic "document"
> is a string containing a JSON serialisation of the document; it's not an
> object. 

That is exactly what my complaint is. That 'doc' and every bit of data
associated with it (id, revision, etc…) must be maintained and passed
around as separate things. I am suggesting we should have a Document
class, which contains all of these things in one place. A simple class,
with properties for all these bits of data, which can be set/get in
accordance to the conventions of the language for each implementation.




Follow ups

References