Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 10 03:09
    guanzo commented #2224
  • Apr 10 03:09
    guanzo commented #2224
  • Apr 10 03:09
    guanzo commented #2224
  • Apr 10 03:05
    guanzo commented #2224
  • Apr 10 03:05
    guanzo commented #2224
  • Apr 10 03:05
    guanzo commented #2224
  • Apr 10 03:02
    guanzo commented #2224
  • Apr 10 03:02
    guanzo commented #2224
  • Apr 10 03:02
    guanzo commented #2224
  • Apr 09 16:33

    nbbeeken on master

    fix: improve ArrayBuffer brand … (compare)

  • Apr 09 16:33

    nbbeeken on master

    fix: improve ArrayBuffer brand … (compare)

  • Apr 09 16:33
    nbbeeken closed #429
  • Apr 09 16:33
    nbbeeken closed #429
  • Apr 09 16:26

    nbbeeken on 4.0

    chore(NODE-3186): ensure aws te… (compare)

  • Apr 09 16:26

    nbbeeken on 4.0

    chore(NODE-3186): ensure aws te… (compare)

  • Apr 09 16:26

    nbbeeken on 4.0

    chore(NODE-3186): ensure aws te… (compare)

  • Apr 09 16:26

    nbbeeken on ensure-aws-tests-run

    (compare)

  • Apr 09 16:26

    nbbeeken on ensure-aws-tests-run

    (compare)

  • Apr 09 16:26

    nbbeeken on ensure-aws-tests-run

    (compare)

  • Apr 09 16:26
    nbbeeken closed #2777
cooly
@cooly-me
Hi
yondering
@yonderbread
Hi all, I have an already existing database with 3 collections with documents in them
I need to retrieve the values by a specific key
Not a query
Ario K
@itsario_twitter
anyone know the performance affects of the $polygon query on 300+ element polygon: https://docs.mongodb.com/manual/reference/operator/query/polygon/
that can be done quite often
The '2d' index is applied obviously
javadevelopment4
@javadevelopment4
This may be useful for anyone - Turn your pc to lightening speed in 7 steps - https://www.youtube.com/watch?v=n0odMfF2yWQ&feature=youtu.be
Mohammad Fayaz
@fayaz07

is there any technique like, if I have two collections

posts:
 - userId
 - other fields...
users:
- userId
- name
...

like, if I just make a find of posts that also fetches the name of the user

Note: without lookup or join

Nitendra Singh Yadav
@nitendra-yadav

hello guys, I am new here, just stuck in a query on orders array of shopify

I want to manipulate orders to get info like this,

{
  topVariant: [
  {
    variant_id: '',
    variant_title: '',
    product_title: '',
    refundAmount: ''
  }
],
  topProducts: [
  {
    product_name: '',
    productSaleAmount: '',
    variantsSold: '',
    product_id: ''
   }
  ],
  grandTotals: {
     totalRefunds: '',
     totalItemsSold: '',
     totalRevenue: ''
   }
}

orders data in the format as below

Nitendra Singh Yadav
@nitendra-yadav

https://shopify.dev/docs/admin-api/rest/reference/orders/order#index-2020-07

sorry, orders object is very lengthy so I was unable to send here, you can see on this link, under all order api-> show response

Azar
@azartheen
Error: Cannot find module 'mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid
why these kinds of error happen in node js
TudorIoanMarin
@TudorIoanMarin

Hello guys. I was wondering, what is the approach to querying a collection with a dynamic field.
Let's say we have collection A { type, name, price } and a map of values B that holds the average price of a type of A, and can acces the value like so: B[A.type].avg.

What I want to do is create a dynamic query that will basically return the cheapest documents of a type but I can't figure out if this is doable in one query.

A.find({ price: { $lte: { B[A.type].avg } } })

I imagine there is an aggregate method fot this, can someone point me in the right dirrection?

Thanks

Nitendra Singh Yadav
@nitendra-yadav
can anybody help me in filling missing dates in array of orders with some default or null values
pedrospecter
@pedrospecter
Hej everybody
1 reply
quick question. Is it possible to have automated robots inside mongo so that they update some fields automatically?
Philip Lysenko
@philly-vanilly
What a useless chatroom. I scrolled 20 posts up, all were questions, no answers
Alan Levi
@Al2zone
noob question: have you ever seen this error? I'm having trouble connecting to a new db I created. "MongoParseError: Invalid source admin for mechanism MONGODB-X509 specified." I'm using the mongodb nodejs library to connect.
robin
@RobinYang11
image.png
image.png
robin
@RobinYang11
knick all your pp
pejman
@pejman-74
[http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html ] according to this document next function must return null if no exist anymore document but for me not working .
Matthew
@ChaplainsBud
what's MongoDB Native?
is this React Native with MongoDB and Nodejs?
Daniel
@danjl23
What is the difference between using MongoDB Driver vs Mongoose?
Neil Duffy
@skiv71
@danjl23 Mongoose provides ORM, in the form of Models specific to the collection via Schemas (and object methods) to interact with mongo itself (like a wrapper)
the mongo driver lets you directly access the db itself
ehsan2003
@ehsan2003
Hi.
what is the best way to prevent duplicate data on mongodb?
I think there is two ways to do this:
1.we can check for existence of the duplicate data before inserting data
2.we can use unique indexes to do the job
I am trying to work with the second solution
but I have a problem with it because recently I can't receive keyPattern from mongoError object ( I am using keyPattern to determine which unique index triggered)
image.png
also the keys are not visible in messages
( I am using mongodb-memory-server for testing and this problem appears when testing )
Dane411
@Dane411
Hi, using mongodb@3.6.4 on node@14.15.0 I get the following error that comes from write_concerns.js:
Top-level use of w, wtimeout, j, and fsync is deprecated. Use writeConcern instead.
Any idea why I'm getting this warning and how to fix it?
What would be the recommended version of mongodb to downgrade and try to see if such warn dissapears?
Dhani A.
@_dhaniboy_twitter

Hi all, I have a collection that looks like this:

[
   { _id: 1,  color: "Blue,Green",  },
   { _id: 2,  color: "Blue", },
   { _id: 3,  color: "Green", }
]

color could be a string of comma separated values as in “Blue,Green” or a single string value as in “Blue”. 

Given a search string of “Blue”, I want to be able to return “Blue,Green” and “Blue”. Similarly, given a search string of “Green”, I want to be able to return “Blue,Green” and “Green”. I’m finding it hard to write such a query. Any ideas please?

I’m not using any ORM library . Mongo Version: 4.0.6.
Thanks

Neil Duffy
@skiv71
change color to "colors" to and an array, then https://docs.mongodb.com/manual/tutorial/query-arrays/
Dhani A.
@_dhaniboy_twitter
Thanks. Makes sense.
Neil Duffy
@skiv71
:thumbsup:
Furry
@Furry
Hiya! I'm starting a project that is very latency sensitive. The DB for this project won't be large, probably only around 100-150mb, does the NodeJS MongoDB driver allow me to keep this database mostly in memory, only writing to the cloud on occasion?
I don't want it spending time getting data from the cloud with every action..
I'm unsure if the driver does this by default
JeffWiebe
@JeffWiebe
Can anyone point me to more complete information on unified topology besides what is found in the MongoDB docs here: https://mongodb.github.io/node-mongodb-native/3.3/reference/unified-topology ?
Jay Patel
@jay0512
node package -> mongodb V 3.5.7
When I am trying to use aggregate lookup pipeline, I am getting the error 'MongoError: let not supported'
Can anyone elaborate why it is happening?
Kamil
@Chester97
Hi, I have simple question - how to make an aggregation on specific document?