couchdb tips & tricks: All content tagged as couchdb tips & tricks in NoSQL databases and polyglot persistence
Thursday, 30 September 2010
CouchDB: Auto Increment IDs with PHP
Sounds like auto incrementing IDs is something that NoSQL databases users are needing. Aravinda has posted a solution for getting auto incementing IDs in CouchDB:
As of now, PHP function involves two http calls for adding single document. Let me know if you find any ways to reduce it to one http call.
But as pointed out by a commenter, unfortunately the proposed solution is not re-entrant. As far as I can tell there’s a way to get UUIDs from CouchDB, but the values will not be incremental, not sure if even ordered:
curl -X GET <a href='#' rel='external nofollow'>http://127.0.0.1:5984/_uuids?count=10</a>
Original title and link: CouchDB: Auto Increment IDs with PHP (NoSQL databases © myNoSQL)
via: http://aravindavk.in/blog/couchdb_auto_increment_ids_with_php
Wednesday, 1 September 2010
CouchDB Tips & Tricks: Loading DNS data into CouchDB
Not sure how many need it, but still an interesting trick:
Probably this one is a nicer trick though.
Original title and link for this post: CouchDB Tips & Tricks: Loading DNS data into CouchDB (published on the NoSQL blog: myNoSQL)
Thursday, 26 August 2010
CouchDB Tips & Tricks: List Functions for Sorting Map/Reduce Results by Value
Nice CouchDB trick from Arbo von Monkiewitsch:
I just found out, that it is possible to sort the result of Map/Reduce with a list function.
curl http://.../design-doc/_list/sort/count?group=true
Original title and link for this post: CouchDB Tips & Tricks: List Functions for Sorting Map/Reduce Results by Value (published on the NoSQL blog: myNoSQL)
via: http://geekiriki.blogspot.com/2010/08/couchdb-using-list-functions-to-sort.html