[I57] MySQL implementation #65

Merged
rho_n merged 21 commits from MySQL into main 2023-02-12 12:59:14 +00:00
Owner

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.

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.
rho_n added the
Feature Request
label 2023-02-12 12:56:56 +00:00
rho_n self-assigned this 2023-02-12 12:56:56 +00:00
rho_n added 20 commits 2023-02-12 12:56:57 +00:00
rho_n added 1 commit 2023-02-12 12:57:41 +00:00
rho_n merged commit a213efa695 into main 2023-02-12 12:59:14 +00:00
rho_n deleted branch MySQL 2023-02-12 12:59:30 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rho_n/hpr_generator#65
No description provided.