Hey Raymond, Couchbase != CouchDB (check out http://couchbase.com/couchbase-vs-couchdb), however, it may be interesting to write a plugin for LoopBack to support Couchbase. Thanks for pointing that out!
Cheers, Brett On Thursday, November 21, 2013 5:24:01 PM UTC-4, Raymond Feng wrote: > > The > LoopBack<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fstrongloop%2Floopback&sa=D&sntz=1&usg=AFQjCNFPfMwEU9DthcCjTJ1phgLnALlOFg>project > already provides an ODM for many data sources. You can find more > information at: > > http://docs.strongloop.com/display/DOC/Working+with+models+and+data+sources<http://www.google.com/url?q=http%3A%2F%2Fdocs.strongloop.com%2Fdisplay%2FDOC%2FWorking%2Bwith%2Bmodels%2Band%2Bdata%2Bsources&sa=D&sntz=1&usg=AFQjCNHDqMqCstcPhu3DePuk1jLyZXBCVA> > > The CouchDB can be easily ported from > https://github.com/jugglingdb/nano-adapter > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fjugglingdb%2Fnano-adapter&sa=D&sntz=1&usg=AFQjCNGV_1tzY-zeldVpUjskaZT2GXEoVw>as > > LoopBack data source juggler was initially folked from JugglingDB and the > connector/adapter contract is pretty much the same. We welcome > contributions! > > Thanks, > Raymond > > On Thursday, November 21, 2013 12:03:54 PM UTC-8, Brett Lawson wrote: >> >> Hi, >> >> I have been working on building a simple to use ODM for Node.js and >> Couchbase and am looking for suggestions and trying to gauge how much >> interest exists for such a tool. >> >> https://github.com/brett19/node-ottoman<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fbrett19%2Fnode-ottoman&sa=D&sntz=1&usg=AFQjCNHnhO8fUjLR6H2bCCxQzpo_itGgNA> >> >> >> Currently it supports quite a few things, here is an example: >> >> var User = Ottoman.model('User', { >> 'username': 'string', >> 'name': 'string', >> 'email': 'string'}, { >> bucket: new couchbase.Connection({})}); >> var test = new User();test.username = 'brett19';test.name = 'Brett >> Lawson';test.email = '[email protected]'; >> Ottoman.save(test, function(err) { >> if (err) throw err; >> >> MyModel.findById(test._id, function(err, obj) { >> if (err) throw err; >> >> console.log(obj.name); >> // Brett Lawson >> });}); >> >> >> Cheers, Brett >> > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
