Re: Hierarchical comments Hacker News style

2012-05-20 Thread Luca Matteis
On Sun, May 20, 2012 at 6:08 AM, Jim Klo jim@sri.com wrote: I'm not sure I'm following the whole thread, but why are you storing integers as strings? If you store them as numbers, they would collate right I think. Hi Jim, Can you provide an example?

Why is the _id called id in the response from a put request?

2012-05-20 Thread Alexander Gabriel
I am using jquery.couch.js. In a openDoc() the return key for the _id is named _id. In a saveDoc() the return key for the _id is named id. Looking in Firebug at the get and put requests that are beeing sent the reason seems to be the answer of couchdb to a put request:

Re: Why is the _id called id in the response from a put request?

2012-05-20 Thread Goog Cheng
On 05/20/2012 06:16 PM, Alexander Gabriel wrote: I am using jquery.couch.js. In a openDoc() the return key for the _id is named _id. In a saveDoc() the return key for the _id is named id. Looking in Firebug at the get and put requests that are beeing sent the reason seems to be the answer of

Re: How does OAuth support, or custom headers, work in the replicator?

2012-05-20 Thread Martin Higham
Hi Jens, - CouchDB supports OAuth 1.0, not 2.0 - The fields in the replication structure are fine if you want CouchDB to replicate to CouchDB, but I think in your case you want to OAuth requests from a client to CouchDB so you will want to sign each request yourself. - We use the OAuthConsumer

Re: Why is the _id called id in the response from a put request?

2012-05-20 Thread Martin Higham
_id and _rev are field names within a document, whereas the non-underscore versions are copies of those values. On 20 May 2012 11:35, Goog Cheng googch...@gmail.com wrote: On 05/20/2012 06:16 PM, Alexander Gabriel wrote: I am using jquery.couch.js. In a openDoc() the return key for the _id

Re: Why is the _id called id in the response from a put request?

2012-05-20 Thread Alexander Gabriel
@Martin: Thanks, understanding it will hopefully help me remember. @Goog:saveDoc() is a function included in jquery.couch.js. You can use it whenever you reference jquery.couch.js. To reference it I have this line in the header of the document: script type=text/javascript

Re: Why is the _id called id in the response from a put request?

2012-05-20 Thread Goog Cheng
On 05/20/2012 08:26 PM, Alexander Gabriel wrote: @Martin: Thanks, understanding it will hopefully help me remember. @Goog:saveDoc() is a function included in jquery.couch.js. You can use it whenever you reference jquery.couch.js. To reference it I have this line in the header of the document:

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Keith Gable
Integers as strings: [1, 2, 3] Integers as integers: [1, 2, 3] On May 20, 2012 3:37 AM, Luca Matteis lmatt...@gmail.com wrote: On Sun, May 20, 2012 at 6:08 AM, Jim Klo jim@sri.com wrote: I'm not sure I'm following the whole thread, but why are you storing integers as strings? If

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Luca Matteis
On Sun, May 20, 2012 at 4:10 PM, Keith Gable zi...@ignition-project.com wrote: Integers as strings: [1, 2, 3] Integers as integers: [1, 2, 3] Okay, but how does that help with the question at hand?

Re: Review of CouchDB 1.2.0

2012-05-20 Thread Robert Newson
Very nice! But perhaps you could note that 1.3 will switch from the simple SHA1 scheme to PBKDF2 with configurable work factor? B. On 20 May 2012 21:27, Miles Pomeroy pomeroymi...@gmail.com wrote: I wrote a post about the new features in 1.2.0. Check it out and let me know if there are any

Re: Review of CouchDB 1.2.0

2012-05-20 Thread Miles Pomeroy
Thanks. I don't call it out explicitly, but I link to the Jira item in my second footnote. On Sun, May 20, 2012 at 3:48 PM, Robert Newson rnew...@apache.org wrote: Very nice! But perhaps you could note that 1.3 will switch from the simple SHA1 scheme to PBKDF2 with configurable work factor?

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Keith Gable
I'm not sure I'm following the whole thread, but why are you storing integers as strings? If you store them as numbers, they would collate right I think. Hi Jim, Can you provide an example? I merely provided an example of using integers as integers. --- Keith Gable A+ Certified

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Jim Klo
If you're trying to sort hierarchically using integers as id's, assuming the id's grow incrementally with time (say you were using local_seq), the arrays will naturally sort numerically, whereas strings are going to sort alphanumerically, meaning 2, 3, 22, 33 vs 2, 22, 3,33. Hence, [ 1, 2 ]

Re: manipulating .couch files

2012-05-20 Thread Paul Davis
On Thu, May 17, 2012 at 1:58 PM, Tim Tisdall tisd...@gmail.com wrote: I want to temporarily open the port for couchdb so I can access futon.  However, I have a large database already in there that I don't want accessible by the public.  If I temporarily move the database_name.couch file from

Re: purging documents?

2012-05-20 Thread Paul Davis
Yeah, likely the best way to undo this would be to use filtered replication to a local db and then rename the .couch files and reboot to get it swapped over. On Fri, May 18, 2012 at 1:02 PM, Jim Klo jim@sri.com wrote: Not sure how many docs you have, but can you filter replicate the good