PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 8th of May, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[11:03:07] <xialvjun> at http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOne I find "Deprecated use find().limit(1).next(function(err, doc){})" ... what does it mean? which is deprecated? findOne? or find().limit()
[11:18:04] <kurushiyama> xialvjun: findOne()
[11:20:42] <xialvjun> well, I thought findOne too...After all, find().limit can be used some other where, so it can't be deleted... I was just not sure... thanks kurushiyama
[12:59:16] <djlee> Hi all, anyone know of a pretty print/formatter for mongo queries, operators dont have quotes round them which breaks json formatters
[13:01:17] <kurushiyama> djlee: printjson?
[13:01:53] <djlee> kurushiyama: doesn't that print the result rather than the query
[13:02:16] <djlee> (was trying to prettify a query for a blog post rather than do it manually, but nevermind if theres nothing, just being lazy)
[13:02:42] <kurushiyama> djlee: sorry, got that wrong. Not that I am aware of.
[13:04:17] <djlee> kurushiyama: nevermind, thanks anyway :)
[17:43:42] <AlexZan> hey guys, whats the best way to reference the mongodb driver object in my node route functions, so that i can save/retrive data from mongo? Save reference to it in the req somehow?
[23:32:15] <thezanke> Does anyone know how to tell Model.create() to only return specific properties with the response object?
[23:33:17] <thezanke> (using mongoose)
[23:34:33] <StephenLynx> dont use mongoose
[23:34:48] <cofeineSunshine> thezanke: create simpler model object, so it returns less fields
[23:35:02] <cofeineSunshine> or dont use mongoose
[23:35:14] <cofeineSunshine> but probably it's not up to you to decide
[23:35:22] <cofeineSunshine> in your project
[23:35:30] <cofeineSunshine> isnt it?
[23:35:41] <thezanke> It is, is mongoose not worth using?
[23:35:54] <thezanke> Everything I have read has kinda pushed for it
[23:36:27] <cofeineSunshine> evaluate benefits that it gives vs shortcoming that you'll have in relation to your problem/design
[23:37:06] <thezanke> well, I want all the fields internally.. I just don't want them all sent in the response to the client
[23:37:41] <cofeineSunshine> so create object that will fetch all base fields
[23:38:13] <cofeineSunshine> and use extended class for ful field collection retrieval/operations
[23:38:24] <cofeineSunshine> they both will work on same collection
[23:39:34] <StephenLynx> mongoose is the worst thing you could use
[23:39:45] <thezanke> Really?
[23:39:51] <StephenLynx> its performance is a joke and its practically broken when it comes to ids and dates.
[23:40:01] <StephenLynx> not to mention it is completely unnecessary
[23:40:18] <StephenLynx> it only got traction because the author has ties with mongodb.
[23:40:25] <StephenLynx> and the node.js community don`t know any better.
[23:40:32] <thezanke> Hmmm... would you suggest a different tool or just raw mongodb
[23:40:36] <StephenLynx> raw mongodb
[23:41:07] <thezanke> What do you mean by dates being broken?
[23:41:14] <StephenLynx> they don`t parse correctly.
[23:42:44] <thezanke> I think they must've fixed that then, the timestamps are working fine for me.. I'll have to look into it's pros and cons
[23:43:01] <thezanke> I didn't consider it being bad since it seems so commonly suggested
[23:43:55] <StephenLynx> as a rule of thumb
[23:44:02] <StephenLynx> anything too popular related to node.js is awful.
[23:44:19] <StephenLynx> express, mongoose
[23:44:30] <StephenLynx> those build systems
[23:44:42] <StephenLynx> see leftpad.
[23:45:20] <StephenLynx> es6
[23:52:30] <thezanke> Haha, leftpad