create_doc should take a dict and we need create_doc_from_json
Bug #1026751 reported by
Lucio Torre
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
U1DB |
Fix Released
|
High
|
Eric Casteleijn |
Bug Description
The first thing one does when using u1db is:
>>> content = json.dumps({"name": "John Barnes", "position": "forward"}) # create a document
>>> doc2 = db.create_
which doesnt make much sense as we will be trating the document as a dict in doc.content and the user wont have to care about json ever again.
This should look like this:
>>> doc2 = db.create_
And if you want to use json:
>>> doc2 = db.create_
Related branches
lp:~thisfred/u1db/create_doc-from-dict
- Lucio Torre (community): Approve
-
Diff: 2648 lines (+447/-393)21 files modifiedREADME (+1/-1)
html-docs/high-level-api.rst (+10/-10)
html-docs/quickstart.rst (+3/-3)
include/u1db/u1db.h (+2/-2)
src/u1db.c (+2/-2)
u1db/__init__.py (+16/-1)
u1db/backends/__init__.py (+12/-3)
u1db/commandline/client.py (+1/-1)
u1db/remote/http_database.py (+1/-1)
u1db/tests/c_backend_wrapper.pyx (+4/-4)
u1db/tests/commandline/test_client.py (+20/-20)
u1db/tests/test_backends.py (+250/-220)
u1db/tests/test_c_backend.py (+32/-32)
u1db/tests/test_http_app.py (+18/-18)
u1db/tests/test_http_database.py (+2/-2)
u1db/tests/test_open.py (+1/-1)
u1db/tests/test_remote_sync_target.py (+2/-2)
u1db/tests/test_sqlite_backend.py (+7/-7)
u1db/tests/test_sync.py (+61/-61)
u1todo/test_u1todo.py (+1/-1)
u1todo/u1todo.py (+1/-1)
Changed in u1db: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Eric Casteleijn (thisfred) |
Changed in u1db: | |
status: | Triaged → In Progress |
Changed in u1db: | |
status: | In Progress → Fix Committed |
Changed in u1db: | |
milestone: | none → 0.0.3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.