postgresql - Sails.js : Compile native database functions/procedures on sails lift -


I am using sails.js with postgres as database. Although most of the tasks can easily be controlled through the waterway ORM, in some cases I prefer to use native questions, and sometimes the original stored functions of PostGrace, however, the challenge with stored work is that they Code comes with overhead of maintenance.

In my project repo, I have created a directory SQL that contains all the SQL functions. Currently, I have to make sure that whenever I make some changes to the function, I need to compile it on the database.

I need to configure it whenever I Restart the server, like all models are rebuilt, is it possible and how?

There is no built-in support for compilation of sales postsgrace stored procedures, but for this you have a Grunting can work. Take a look at this when you pick up (and in some cases, when some files are changed) they run every time.

A quick Google package was found, which can help you on your way.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -