AdvancedBan
AdvancedBan copied to clipboard
Use HSQLDB's MySQL compatibility mode to simplify SQLQuery enum
Each enum entry in SQLQuery has 2 queries, one for MySQL and one for HSQLDB. However, HSQLDB has a MySQL compatibility mode which can cover all these differences, and therefore allow a single query for each entry.
In MySQL compatibility mode with HSQL:
- Backticks are permitted. This is an optional MySQL feature anyway.
- AUTO_INCREMENT PRIMARY KEY is supported.
Also of note:
- BIGINT is part of the SQL standard and is supported by MySQL. I'm not sure why AdvancedBan uses LONG.
I guess I just used LONG because AdvancedBan uses java long for timestamps :D Not sure if we can just migrate to using a different datatype but if both can be extracted into longs then I suppose it shouldn't be a problem.
Thanks for the research on this 👍