vapor-community / mongo-driver

MongoDB driver for Fluent
28 stars 26 forks source link

Update to version 2 of MongoKitten #22

Closed miroslavkovac closed 7 years ago

miroslavkovac commented 8 years ago

This PR updates MongoKitten to version 2 that supports connection pooling.

I fixed some compilation errors after the update and have to remove 1 test that I did not find relevant any more, because the isConnected property on MongoKitten will be true after calling connect because the actual connection does not occur at that point.

Let me know if this PR makes sense at this moment, and if there is anything else that you would like me to adjust.

Joannis commented 8 years ago

@mmyyccrroo I'd keep the test there. I've reimplemented it in my MongoKitten 3 alpha code and I'm backporting this.

miroslavkovac commented 8 years ago

@Joannis sure, even better :) Can you point me to your implementation of that test so that I can make necessary adjustments?

Joannis commented 8 years ago

I didn't really review your code but what I mean is that the isConnected is a getter that wasn't updated for MongoKitten 2. MongoKitten 2 has a few flaws that have been patched in MongoKitten 3 that I'm working on that I want to port back to MongoKitten 2.

MongoKitten 3 is aiming to redesign huge parts of the API of BSON and MongoKitten so MK2 is an in-between release that doesn't change too much whilst still providing some essential features like Connection Pooling.

But MongoKitten 2 has been released a little too early, so some things like isConnected were returning an invalid value like you noticed.

tanner0101 commented 8 years ago

Should we skip to using MK3 then?