try {
Connection conn = connections.getConnection();
try {
DatabaseMetaData meta = conn.getMetaData();
databaseName = meta.getDatabaseProductName();
databaseMajorVersion = getDatabaseMajorVersion(meta);
log.info("RDBMS: " + databaseName + ", version: " + meta.getDatabaseProductVersion() );
log.info("JDBC driver: " + meta.getDriverName() + ", version: " + meta.getDriverVersion() );
metaSupportsScrollable = meta.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
metaSupportsBatchUpdates = meta.supportsBatchUpdates();(判断是否使用批量操作)
if ( Environment.jvmSupportsGetGeneratedKeys() ) {
try {
DatabaseMetaData使用(读hibernate源代码)
最新推荐文章于 2022-10-17 13:51:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)