mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
codegen add IDialect.MYSQL
This commit is contained in:
parent
4a0b46826a
commit
c149e9c7a7
@ -30,10 +30,13 @@ public interface IDialect {
|
||||
String forBuildColumnsSql(String tableName) {
|
||||
return "SELECT * FROM " + tableName + " WHERE 1 = 2";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IDialect MYSQL = new JdbcDialect() {
|
||||
@Override
|
||||
public ResultSet getTablesResultSet(DatabaseMetaData dbMeta, Connection conn, String[] types) throws SQLException {
|
||||
return dbMeta.getTables(conn.getCatalog(), null, null, types);
|
||||
String forBuildColumnsSql(String tableName) {
|
||||
return "SELECT * FROM `" + tableName + "` WHERE 1 = 2";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -72,5 +72,11 @@ public abstract class JdbcDialect implements IDialect {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultSet getTablesResultSet(DatabaseMetaData dbMeta, Connection conn, String[] types) throws SQLException {
|
||||
return dbMeta.getTables(conn.getCatalog(), null, null, types);
|
||||
}
|
||||
|
||||
|
||||
abstract String forBuildColumnsSql(String tableName);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user