Add database type constant for use in templates

This is used to select which database specific SQL query to use.
This commit is contained in:
Roan Horning 2022-11-27 13:11:14 -05:00
parent 4e8edf2640
commit cb881558ca
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769
2 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,7 @@ sub get_template_html (\%@) {
PRE_CHOMP => 1,
POST_CHOMP => 1,
CONSTANTS => {
database => $_[0]{database},
driver => $_[0]{driver},
user => $_[0]{user},
password => $_[0]{password},

View File

@ -2,6 +2,7 @@
# with the database.
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
[DBI]
database: mysql
driver: dbi:mysql:database=hpr_hpr:hostname=localhost
user: hpr-generator
password: zBozqN-Z2zNAz