r/Meteor • u/pdiniz • Apr 23 '15
PostgreSQL Support for Meteor
http://www.meteorpostgres.com/2
u/ViralInfection Apr 24 '15
Questions:
On the client-side you're using AlaSQL, so I assume
minisqlisn't really a postgres compatible API?Are joins reactive?
Have you considered wrapping the APIs into a more
Mongo.Collectionlike manor (ex: no.save,.fetch). So the APIs are as 1-to-1 as possible.
2
u/pdiniz Apr 24 '15
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.
1
u/SuchInferno Apr 24 '15
Looks very interesting indeed! Couple of questions:
Will you create some special accounts-base/accounts-password package for Postgres, or how would that work?
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.