public class DBMySqlGeneratorImpl extends AbstractDBGenerator
| Modifier and Type | Field and Description |
|---|---|
private static Map<String,Map<String,DBTable>> |
existsTable |
static org.slf4j.Logger |
LOG
日志.
|
static String |
SQL_SHOWTABLE |
private EnumSyncAction |
syncAction |
| Constructor and Description |
|---|
DBMySqlGeneratorImpl() |
| Modifier and Type | Method and Description |
|---|---|
private Map<String,DBTable> |
_getTable(Connection conn)
获取数据库中已有的表结构.
|
private void |
_initTableColumn(DBTable table,
Connection dbconn)
初始化数据库中已有的表的列.
|
private void |
_initTableIndex(DBTable table,
Connection dbconn)
初始化数据库中已有的表的索引.
|
EnumSyncAction |
getSyncAction() |
void |
setSyncAction(EnumSyncAction syncAction) |
void |
syncTable(Connection conn,
DBTable table)
同步数据库表
|
void |
syncTable(Connection conn,
DBTable table,
int num)
批量同步数据库表.
|
converTo, scanEntitypublic static final org.slf4j.Logger LOG
public static final String SQL_SHOWTABLE
private EnumSyncAction syncAction
public void syncTable(Connection conn, DBTable table) throws DDLException
IDBGeneratorDDLExceptionpublic void syncTable(Connection conn, DBTable table, int num) throws DDLException
IDBGeneratorconn - 数据库连接.table - 库表num - 需要生成的分表数DDLExceptionprivate Map<String,DBTable> _getTable(Connection conn) throws DDLException
conn - DDLExceptionprivate void _initTableIndex(DBTable table, Connection dbconn) throws SQLException
table - dbconn - SQLExceptionprivate void _initTableColumn(DBTable table, Connection dbconn) throws SQLException
table - dbconn - SQLExceptionpublic EnumSyncAction getSyncAction()
public void setSyncAction(EnumSyncAction syncAction)
Copyright © 2015. All rights reserved.