简体   繁体   中英

Count tables in H2 Database with OrmLite

Is there any way to get the number of tables in a h2 database when using OrmLite?

I'm looking for something like:

mysql> show tables;

for OrmLite.

Is there any way to get the number of tables in a h2 database when using OrmLite?

ORMLite has a pretty good online manual. If you have looked in the index under "raw queries" you would have found the following:

http://ormlite.com/docs/raw-queries

There is a lot of detail there but you can do something like the following using the Dao.queryRaw(...) method .

GenericRawResults<String[]> results = dao.queryRaw("show tables;");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM