aljazerzen / mongodb-typescript

Hydrate MongoDB documents into TypeScript-defined objects
MIT License
47 stars 7 forks source link

Two connections opening together #31

Open SuheylZ opened 1 year ago

SuheylZ commented 1 year ago

While exploring your library for mongo db. it seems like a good effort. I have been using mongoose for mongodb for quite some while. An issue that I have seen is that it cannot open connections to multiple MongoDB databases at the same time. for instance to perform migration

  1. you'd open the connection to database A,
  2. read all the data using this connection and dump it
  3. close the connection
  4. open the connection to database B
  5. read all the dump from step 2
  6. write into database B
  7. close the connection.

is it possible with this library to open two connections together

aljazerzen commented 1 year ago

Hello, I don't think that this library is a good fit for your use-case.

What you probably want is just a plain mongodb client.