protected List<Map<String, Object>> query(final String query, final String key, final String value) {
        Handle h = null;
        try {
            h = dbi.open();
            logger.debug("Query: {} for key/value: {} / {}", query, key, value);
            return h.createQuery(query).bind(key, value).list(2);
        } finally {
            if (h != null) {
                h.close();
            }
        }
    }
<p>query.</p>

@param query a {@link String} object
@param key a {@link String} object
@param value a {@link String} object
@return a {@link List} object
pac4j-sql/src/main/java/org/pac4j/sql/profile/service/DbProfileService.java