Closed skestle closed 2 years ago
Agree. We added a command
reload
I had started on a different mechanism, but this looks good. In my use case, I'd want a lazy check like on driver startup:
See my first attempt at https://github.com/wise-coders/dbf-jdbc-driver/compare/master...skestle:dbf-cache-refresh?expand=1
It's not very good because I forgot about connection pooling and so you'd need to connect manually with the URL. So I like a SQL statement, but it needs to run eagerly - this change still requires a JVM restart to refresh the table data, since that's only done once on startup.
It could almost be sufficient to just refresh the whole database, but the main table I want takes 90s by itself.
I'm wanting to simply query a DBF database for new information, but it seems that the tables are not updated (within the same application).
https://github.com/wise-coders/dbf-jdbc-driver/blob/0b2f55b1b4a99aa21ecde43db39d462765b72062/src/main/java/com/dbschema/dbf/JdbcDriver.java#L18 probably should be "When you open a connection for the first time in a JVM..." (see line 98).
It would be nice to be able to invoke https://github.com/wise-coders/dbf-jdbc-driver/blob/0b2f55b1b4a99aa21ecde43db39d462765b72062/src/main/java/com/dbschema/dbf/H2WrappedConnection.java#L56-L59 for a specific table/file at will.