It seems that in order to be able to display only non-system tables, the DataBaseMetadata.getTables() method must only return system tables if the list of types includes SYSTEM_TABLE. Apparently that's how it works with HsqlDB and Sqlite.
Le mardi 2 mai 2023 à 15:30:38 UTC+2, prrvchr a écrit : > To be more precise: > Here is the result of some tests on the DataBaseMetadata.getTables() > method with the String[] types parameter: > > - String[] types = null; > > - H2 lists all > - HsqlDB lists all > - SQLite JDBC Driver <https://github.com/xerial/sqlite-jdbc> lists all > > - String[] types = new String[]{"TABLE", "VIEW"}; > > - H2 lists all > - HsqlDB lists all tables and views except those under schemas: > INFORMATION_SCHEMA > and SYSTEM_LOBS > - SQLite JDBC Driver <https://github.com/xerial/sqlite-jdbc> list all > tables and views except table sqlite_sequence (sqlite as no schema) > > Le mardi 2 mai 2023 à 14:30:26 UTC+2, Pierre Vacher a écrit : > >> Hi, >> >> 2.2.219 is a SNAPSHOT that fixes the problem of autoincrement types if I >> remember correctly... >> >> In fact the problem is not to find the type of the table, but that the >> DataBaseMetadata.getTables() method does not know how to filter on the type >> that normally we must be able to control... >> Maybe I'm wrong... >> >> >> Le mar. 2 mai 2023 à 11:39, Evgenij Ryazanov <[email protected]> a écrit : >> >>> Hi! >>> >>> The latest version of H2 is 2.1.214, there is no such version as 2.2.219. >>> >>> You can detect types of tables with the following query in modern >>> versions of H2: >>> >>> SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, STORAGE_TYPE, >>> DB_OBJECT_SQL('TABLE', TABLE_SCHEMA, TABLE_NAME) IS NULL IS_SYSTEM FROM >>> INFORMATION_SCHEMA.TABLES; >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "H2 Database" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/h2-database/0c9892ec-4a71-4802-9f21-9ee9fc42da8an%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/h2-database/0c9892ec-4a71-4802-9f21-9ee9fc42da8an%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/87b5322b-0e69-40e9-ba80-6beb5dded95bn%40googlegroups.com.
