-
Notifications
You must be signed in to change notification settings - Fork 42
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
Prepare SQL from file on application start. New function for using pr… #4
base: master
Are you sure you want to change the base?
Conversation
If you can make a tag after merging, it would be amazing. |
Conflicts: src/pgapp.erl src/pgapp_worker.erl
this could be merged after epgsql/epgsql#92 |
@davidw @seriyps @fishcakez once you have merged epgsql/epgsql#92, can you please check this PR? It prepares sql statements from file on start of pgapp, which later could be used in new epgsql:prepared_query function. |
@@ -77,16 +99,29 @@ with_transaction(PoolName, Fun, Timeout) -> | |||
{transaction, Fun}, Timeout) | |||
end, Timeout). | |||
|
|||
|
|||
-include_lib("epgsql/include/epgsql.hrl"). | |||
-include("worker_args.hrl"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Includes should be somewhere in module's header (near defines).
Prepared SQL functionality.
It introduces new setting to a pool, but is backward-compatible.