So... I said fuck it sqlite you have too much limitations. Hence the move to h2. Plugin is now in a half-working state. Fixing SQL queries as I go.