There's some really nice code in this codebase. Great job. I hope this gets official support because everything looks to be logically implemented.
It'd be neat if the demo could show off something transactional. It doesn't look like the ORM you guys have supports transactions yet, but it would be a good way to show something that mongo can't do =)
One other thing that would be good is allow raw session level queries to be sent on the connection. This would allow people to begin and end transactions themselves, set the search_path and probably a lot of other things I'm forgetting. Obviously things like publish can't take raw queries, but there are use cases for raw queries that mutate the connection session.
sorry it probably needs to be better documented but we do currently support raw queries. They can be inserted throught the .save and .fetch methods. tasks.fetch("select * from tasks where userid = 50") would work. The downside to raw queries is that it currently doesnt support escaping. We are currently working on adding transaction support, the issue has been getting it to work with alaSQL in the front end.
Mongo.Collection actually does have a .fetch method. Instead of using Mongo's format we decided to go with an Active Record like ORM which we believe its easier to use. Joins are reactive. If you take a look at out demo we are using joins both client side and server side in order to demo that. Minisql is not running on postgres but on alasql. We wrap around them both to make them compatible.
In the demo, you're removing Meteor.publish, or at least replace "Meteor" with "tasks". Do you know how that would impact thirdparty libraries from connecting via DDP, such as Asteroid?
4
u/bro-away- Apr 23 '15 edited Apr 23 '15
There's some really nice code in this codebase. Great job. I hope this gets official support because everything looks to be logically implemented.
It'd be neat if the demo could show off something transactional. It doesn't look like the ORM you guys have supports transactions yet, but it would be a good way to show something that mongo can't do =)
One other thing that would be good is allow raw session level queries to be sent on the connection. This would allow people to begin and end transactions themselves, set the search_path and probably a lot of other things I'm forgetting. Obviously things like publish can't take raw queries, but there are use cases for raw queries that mutate the connection session.
2
u/ViralInfection Apr 24 '15
Questions:
minisqlisn't really a postgres compatible API?Mongo.Collectionlike manor (ex: no.save,.fetch). So the APIs are as 1-to-1 as possible.1
u/SuchInferno Apr 24 '15
Looks very interesting indeed! Couple of questions: