mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-09-07 04:37:48 +00:00
处理issue I5ZS0R,代码优化
This commit is contained in:
@@ -153,6 +153,10 @@ public class DatabaseDmImpl extends AbstractDatabase implements IDatabaseInterfa
|
||||
case ColumnMetaData.TYPE_STRING:
|
||||
if (null != pks && pks.contains(fieldname)) {
|
||||
retval.append("VARCHAR(" + length + ")");
|
||||
} else if (length > 0 && length < 1900) {
|
||||
// 最大存储长度由数据库页面大小决定,支持按照字节存放字符串,数据库页面大小与实际最大存储长度的关系为:
|
||||
// 4K->1900;8k->3900;16k->8000;32k->8188
|
||||
retval.append("VARCHAR(").append(length).append(')');
|
||||
} else {
|
||||
retval.append("TEXT");
|
||||
}
|
||||
|
Reference in New Issue
Block a user