#375 ✓resolved

CouchDB adaptor broken with Couch 0.8.0

Reported by hkstar | June 12th, 2008 @ 04:29 PM

The CouchDB adaptor implementation in dm-more 0.9.1 does not work at all with the new temp_view format of CouchDB, which has changed in a backwards-incompatible way with the move to 0.8.0.

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) June 13th, 2008 @ 03:50 AM

    That's just as well, because we changed the dm-core Adapter API so the CouchDB adapter will need some retooling anyway before it'll work with the latest edge.

  • BradfordW

    BradfordW July 7th, 2008 @ 08:53 AM

    • Tag set to bug, dm-more

    Hi there, someone notified me after seeing a blog post of mine that there was a ticket for CouchDB integration with the 0.8.0 version. I've got it working, but it's a very unofficial patch. I'd like to branch off and merge it in as it's a bit out of date, but I'll take my lumps. There are a few places that need to be cleaned up, primarily the handling of the view method - instead of passing a string, you should pass a hash to specify both a map and a reduce. Or if you just supply a string it will default to a map-only view. Anyway, I'd like to help, just not sure how to get the ball rolling. Please feel free to contact me! Oh and you can see the hacks I had over on the blog it's the URL in my profile - I won't post it here unless asked. Let me know what you all think. I don't think it would take more than a few hours to get working with the changes that are out there now.

  • geemus (Wesley Beary)

    geemus (Wesley Beary) July 11th, 2008 @ 03:42 PM

    There is likely some more fixing that could occur (ie making views be a hash with map/reduce keys instead of just a string), but the newest version does work with 0.8.0+ after changes that I checked in yesterday. Let me know how that works out for you.

    I seem to have become the de facto maintainer of the plugin, so any other feedback/ideas/etc you might have I would be happy to hear (monki@geemus.com). I will add the views as hashes thing to my todo list and maybe take a stab this afternoon.

  • BradfordW

    BradfordW July 11th, 2008 @ 06:45 PM

    Ah, right on...yea I had made a fairly trivial change to it in regard to paging, basically I sneak a little _total_rows method onto the model to grab the (you guessed it) total number of rows back from a view. Makes paging a breeze since you don't have to query the total each time. But yea, I'll check out the stuff and see if everything's rockin' and rollin' as it was. Keep up the good work :)

    ----- Original Message ----

    From: Lighthouse

    To: bradswinfrey@yahoo.com

    Sent: Friday, July 11, 2008 3:42:31 PM

    Subject: [DataMapper #375] CouchDB adaptor broken with Couch 0.8.0

  • geemus (Wesley Beary)

    geemus (Wesley Beary) July 16th, 2008 @ 04:25 PM

    This should be fixed, so it could be closed.

    Bernard, if you want to add me to the lighthouse project, I'd be happy to handle couchdb tickets moving forward.



  • Bernerd Schaefer

    Bernerd Schaefer July 22nd, 2008 @ 12:15 PM

    • State changed from “new” to “resolved”


    I'll mark this as completed. I sent you an invite for DM's lighthouse.

    Thanks for your help!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »


Referenced by