|
@@ -399,6 +399,13 @@ public class TableField {
|
|
|
*/
|
|
|
private JdbcType jdbcType;
|
|
|
|
|
|
+ /**
|
|
|
+ * 类型名称(可用做额外判断处理,例如在pg下,json,uuid,jsonb,tsquery这种都认为是OHTER 1111)
|
|
|
+ *
|
|
|
+ * @since 3.5.3
|
|
|
+ */
|
|
|
+ private String typeName;
|
|
|
+
|
|
|
public MetaInfo(DatabaseMetaDataWrapper.Column column, TableInfo tableInfo) {
|
|
|
if (column != null) {
|
|
|
this.tableName = tableInfo.getName();
|
|
@@ -409,6 +416,7 @@ public class TableField {
|
|
|
this.defaultValue = column.getDefaultValue();
|
|
|
this.scale = column.getScale();
|
|
|
this.jdbcType = column.getJdbcType();
|
|
|
+ this.typeName = column.getTypeName();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -436,17 +444,22 @@ public class TableField {
|
|
|
return jdbcType;
|
|
|
}
|
|
|
|
|
|
+ public String getTypeName() {
|
|
|
+ return typeName;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
return "MetaInfo{" +
|
|
|
- "tableName=" + tableName +
|
|
|
- ", columnName=" + columnName +
|
|
|
+ "tableName='" + tableName + '\'' +
|
|
|
+ ", columnName='" + columnName + '\'' +
|
|
|
", length=" + length +
|
|
|
", nullable=" + nullable +
|
|
|
", remarks='" + remarks + '\'' +
|
|
|
", defaultValue='" + defaultValue + '\'' +
|
|
|
", scale=" + scale +
|
|
|
", jdbcType=" + jdbcType +
|
|
|
+ ", typeName='" + typeName + '\'' +
|
|
|
'}';
|
|
|
}
|
|
|
}
|