This example shows how to create a simple custom component in handlebars, and call it from SQL.
It uses MySQL, but it should be easy to adapt to other databases. The only MySQL-specific features used here are:
json_table, which is supported by MariaDB and MySQL 8.0 and later,- MySQL's
json_mergefunction.
Both have analogs in other databases.
Key features illustrated in this example
- How to create a custom component in handlebars, with dynamic behavior implemented in JavaScript
- How to manage multiple-option select boxes, with pre-selected items, and multiple choices
- Including a common menu between different pages using a
shell.sqlfile, the dynamic component, and thesqlpage.run_sqlfunction.
