mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08: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) {
|
String forBuildColumnsSql(String tableName) {
|
||||||
return "SELECT * FROM " + tableName + " WHERE 1 = 2";
|
return "SELECT * FROM " + tableName + " WHERE 1 = 2";
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
IDialect MYSQL = new JdbcDialect() {
|
||||||
@Override
|
@Override
|
||||||
public ResultSet getTablesResultSet(DatabaseMetaData dbMeta, Connection conn, String[] types) throws SQLException {
|
String forBuildColumnsSql(String tableName) {
|
||||||
return dbMeta.getTables(conn.getCatalog(), null, null, types);
|
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);
|
abstract String forBuildColumnsSql(String tableName);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user