DevLeoko / AdvancedBan

AdvancedBan is a Spigot plugin to manage punishments on single servers and server networks
GNU General Public License v3.0
165 stars 131 forks source link

Use HSQLDB's MySQL compatibility mode to simplify SQLQuery enum #418

Open A248 opened 4 years ago

A248 commented 4 years ago

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:

Also of note:

DevLeoko commented 4 years ago

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 👍