[I57] MySQL implementation #65
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HPR/hpr_generator#65
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "refs/pull/65/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add MySQL database support to the hpr templates. Unfortunately there are enough differences in the MySQL and SQLite query syntax (in particular when using date functions) that either separate branches in the repository would need to be maintained for each database or the templates would need to programatically adjust based on the current database being used.
I chose the later option. Now any SQL query that needs modified depending on the database being used is split out into a separate template with the following naming convention:
queries-<page name>-<database name>.tpl.html
These queries can be in the calling template with the following PROCESS MACRO:
<!--% PROCESS "queries-<page name name>-${constants.database}.tpl.html" %-->
With this, any supported database can be add by just including new query templates.