Copyright © 2014-2020 Arjan Scherpenisse
Authors: Arjan Scherpenisse (arjan@scherpenisse.net).
child_spec/2 | Optionally add the db pool connection. |
close_connections/0 | |
close_connections/1 | |
database_options/2 | Merge the database options from the global config into the site config. |
database_options/3 | |
db_driver/1 | |
db_driver_default/0 | |
db_pool_name/1 | |
get_connection/1 | |
get_database_options/1 | Get all configuration options for this site which are related to the database configuration. |
return_connection/2 | |
status/0 | |
status/1 | |
test_connection/1 | |
test_connection/2 | Perform a connect to test if the database is working. |
child_spec(Site, SiteProps) -> any()
Optionally add the db pool connection
close_connections() -> any()
close_connections(Context) -> any()
database_options(Sitename::atom(), SiteProps::proplists:proplist()) -> proplists:proplist()
Merge the database options from the global config into the site config. If the site uses the default database and it has no schema defined then the site's name is used as the schema name. If the site uses its own database then the schema defaults to "public".
database_options(Sitename::atom(), SiteProps::proplists:proplist(), GlobalProps::proplists:proplist()) -> proplists:proplist()
db_driver(SiteProps) -> any()
db_driver_default() -> any()
db_pool_name(Site) -> any()
get_connection(Context::z:context()) -> {ok, pid()} | {error, full | nodatabase}
get_database_options(Context::z:context()) -> proplists:proplist()
Get all configuration options for this site which are related to the database configuration.
return_connection(Worker::pid(), Context::z:context()) -> ok | {error, term()}
status() -> any()
status(Context) -> any()
test_connection(Context::z:context()) -> ok | {error, nodatabase | noschema | term()}
test_connection(Site::atom(), SiteProps::proplists:proplist()) -> ok | {error, nodatabase | noschema | term()}
Perform a connect to test if the database is working.
Generated by EDoc