SQLite has feature named "Virtual Tables", which "allows an application to publish interfaces that are accessible from SQL statements as if they were tables".
For instance it is possible to wrap some REST api in table interface (creating virtual table) and then query that table as if it were actual table.
For Python there's
apsw library, which provides such functionality:
Is there Java (or any JVM-based language) library, that allows to use SQLite Virtual Table functionality? So that virtual tables could be implemented in Java code.