'Access Keycloak database in its source code

I have created a new table in Keycloak's H2 Database (called MyTable) and I want to read that table and also execute some sql commands in the ValidateUsername.java of Keycloak source codes.

Does anyone have any idea that how can I have an access to the database in the source code of Keycloak?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source