PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 14th of January, 2020

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[07:53:05] <obiwahn> Hi, is there a way to validate dates?
[13:02:27] <mweckbecker> how much additional disk space does compact() require? I know for MMAP it's 2GB, but documentation is silent for WiredTiger engine. thanks!
[13:12:53] <GothAlice> obiwahn: Define "validate dates", and describe how your needs aren't covered by core document validation? https://docs.mongodb.com/v3.2/core/document-validation/
[13:18:45] <obiwahn> GothAlice: no not really
[13:18:59] <obiwahn> how would i validate that a given date is in a range
[13:21:02] <GothAlice> "Define…?" "no not really" Alternative interpretation: "[are your validation needs not] covered by document validation?" "no not really" When yes, absolutely, that is the exact solution to your question. Good luck, man. You can't read. (Give that Document Validation documentation a proper read-through. It is your solution.)
[14:53:50] <obiwahn> Look there hardly any good examples for ranges. You assume that people know about query operators that are not on that page. I guess it must be done with: `bla: { $le: <date1> , $gt <date2> }` but that is not obvious to somebody who looks at the features of the database. You are lucky to be the first NoSQL db.
[15:04:11] <GothAlice> obiwahn: Not the first no-SQL database, not really. (SQLite wins that due to the fact it ignores the “schema” you give it, at least, possibly others, and SQL using EAV storage to model documents can qualify as no-SQL, given you aren’t using any of the structuring capabilities under EAV.)
[15:04:13] <GothAlice> A range is quite obviously defined, even in basic mathematics as: 2 < x < 27 which can only be modelled as {field: {$gt: 2, $lt: 27}}. Well, you could expand it unnecessarily using $and and two discrete filters, but that’s excessive.