From cb881558ca9a066503440f7cd3d205f924700f78 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 27 Nov 2022 13:11:14 -0500 Subject: [PATCH] Add database type constant for use in templates This is used to select which database specific SQL query to use. --- site-generator | 1 + site.cfg | 1 + 2 files changed, 2 insertions(+) diff --git a/site-generator b/site-generator index 3a59d65..c758a37 100755 --- a/site-generator +++ b/site-generator @@ -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}, diff --git a/site.cfg b/site.cfg index faff6f3..807f3e5 100644 --- a/site.cfg +++ b/site.cfg @@ -2,6 +2,7 @@ # with the database. # dbi:: [DBI] +database: mysql driver: dbi:mysql:database=hpr_hpr:hostname=localhost user: hpr-generator password: zBozqN-Z2zNAz