Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-existing PostgresSQL data and schema #2

Open
sebastiandanilonr opened this issue Aug 20, 2015 · 1 comment
Open

Use pre-existing PostgresSQL data and schema #2

sebastiandanilonr opened this issue Aug 20, 2015 · 1 comment

Comments

@sebastiandanilonr
Copy link

Hello and thanks for this repo.
It's possible to retrieve info for an existing postgres database (preexisting tables, function,etc)?
I have a postgres database and i want to show the already existing info on a angular-meteor based app using this package.

UPDATE: I read that i can´t use pre-existing tables because they don´t have triggers. It's possible to add the triggers directly on postgres and make it work?

Thanks for your help.

@sebastiandanilonr sebastiandanilonr changed the title Use existing PostgresSQL data and schema Use pre-existing PostgresSQL data and schema Aug 20, 2015
@MichaelHirn
Copy link
Member

Hi @sebastiandanilonr

Is it possible to receive infos about the db/tables?
Sadly no, the underlying ORM is really hacky and we should switch it to a mature one like sequelize. But there are emerging some problems as well, you can check our thoughts on this here: https://github.com/storeness/sql

Is it possible to add triggers to an pre-existing table?
I think so (not tried yet), but I can't see why it shouldn't work. You can see the code that gets used to set up the table with all the triggers, here: https://github.com/storeness/meteor-postgres/blob/master/packages/meteor-postgres/lib/server.coffee#L64-L81

You can call those on your table directly or you can flash out the specific parts of the query into individual methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants