[13:43:34] <GothAlice> That request is a) non-sensical, b) a terribly bad idea as a mis-use of Git, which is meant to handle, and best processes line-oriented text data.
[13:44:07] <GothAlice> "git diff" a BSON record, any change will mark the whole thing as changed. (Game over for SCM systems.)
[13:44:59] <GothAlice> Instead, consider the reverse. Store versioned information within MongoDB itself.
[13:49:18] <hoijui> we have a tiny DB, with just one user entering data, once every few days at most
[13:49:37] <hoijui> we want the data in a textual format in git
[13:49:46] <hoijui> guess mongodb is not for us then
[13:50:01] <GothAlice> hoijui: https://duckduckgo.com/?q=mongodb+versioned+records — first link, e.g. https://tools.ietf.org/html/rfc6902
[13:50:59] <GothAlice> Then use git and on-disk file structure as your database. That's rather unfortunate (goodbye ability to "query" the data), but is the easy path (picking only {fast} of {good, fast, cheap}) to getting what you seem to want.
[13:52:10] <GothAlice> It's not {cheap} as it will take a fair amount of effort to learn how to abuse Git in this way and keep it manageable, and there will be few resources available to assist you. (Welcome to research and development! ;)
[14:10:40] <hoijui> GothAlice, https://www.mongodb.com/what-is-mongodb it says: "MongoDB stores data in flexible, JSON-like documents, ..." and then there is an image of a JSON document
[14:11:10] <hoijui> one shoudl not be surprised if newbs think data gets stored in plain text
[14:12:13] <GothAlice> JSON-like in terms of type representation, extended. http://bsonspec.org. Binary. Not suitable for text processing.
[14:12:33] <GothAlice> This is the problem with only reading the TL;DR/
[15:49:03] <AJTJ> hello, how do I trace collection.count errors?
[15:49:23] <AJTJ> or rather, collection.count deprecation warnings?
[18:34:38] <GothAlice> AJTJ: Google "mongodb collection.count" without quotes, click the first link to: https://docs.mongodb.com/manual/reference/method/db.collection.count/ — heed the deprecation warning and change your code to use one of the specific methods: countDocuments or estimatedDocumentCount.
[18:37:37] <GothAlice> (The "Important" note below the mention of those methods explains why there's a distinction. The latter relies on collection metadata, which may not be 100% accurate for reasons listed in that note.)
[19:01:15] <AJTJ> same for collection.update vs model.update
[19:04:59] <GothAlice> All of those will boil down to the same command invocations over the wire as the mongo shell. Though, another warning sign: update. update_one, update_many. These are now split operations.
[19:07:20] <GothAlice> If the version of mongoose you're using doesn't have/offer the modern APIs, upgrade, or if no update is available, you're probably going to want to find a new abstraction layer, or don't use abstraction layers. (I've been leaning more towards not using "active record" "schema modelling" layers, and using the bare native driver more.)