提交 1d9b2628 编写于 作者: S Serge Rider

#12 Postgres types model (schema types)

上级 e9446be3
......@@ -51,14 +51,12 @@ public class PostgreDataType extends JDBCDataType implements PostgreObject
private final int typeId;
private final String ownerSchema;
private final PostgreTypeType typeType;
private final PostgreTypeCategory typeCategory;
public PostgreDataType(DBSObject owner, int valueType, String name, int length, int typeId, String ownerSchema, PostgreTypeType typeType, PostgreTypeCategory typeCategory) {
public PostgreDataType(DBSObject owner, int valueType, String name, int length, int typeId, PostgreTypeType typeType, PostgreTypeCategory typeCategory) {
super(owner, valueType, name, null, false, true, length, -1, -1);
this.typeId = typeId;
this.ownerSchema = ownerSchema;
this.typeType = typeType;
this.typeCategory = typeCategory;
}
......@@ -69,11 +67,6 @@ public class PostgreDataType extends JDBCDataType implements PostgreObject
return typeId;
}
@Property
public String getOwnerSchema() {
return ownerSchema;
}
@Property
public PostgreTypeType getTypeType() {
return typeType;
......@@ -87,7 +80,6 @@ public class PostgreDataType extends JDBCDataType implements PostgreObject
public static PostgreDataType readDataType(@NotNull DBSObject owner, @NotNull ResultSet dbResult) throws SQLException, DBException
{
int typeId = JDBCUtils.safeGetInt(dbResult, "oid");
String ownerSchema = JDBCUtils.safeGetString(dbResult, "typnsname");
String name = JDBCUtils.safeGetString(dbResult, "typname");
if (CommonUtils.isEmpty(name)) {
return null;
......@@ -185,7 +177,6 @@ public class PostgreDataType extends JDBCDataType implements PostgreObject
name,
typeLength,
typeId,
ownerSchema,
typeType,
typeCategory);
}
......
......@@ -72,7 +72,6 @@ public class PostgreGenericTypeCache extends JDBCBasicDataTypeCache
protected JDBCDataType fetchObject(@NotNull JDBCSession session, @NotNull JDBCDataSource owner, @NotNull ResultSet dbResult) throws SQLException, DBException
{
int typeId = JDBCUtils.safeGetInt(dbResult, "typid");
String ownerSchema = JDBCUtils.safeGetString(dbResult, "typnsname");
String name = JDBCUtils.safeGetString(dbResult, "typname");
if (CommonUtils.isEmpty(name)) {
return null;
......@@ -170,7 +169,6 @@ public class PostgreGenericTypeCache extends JDBCBasicDataTypeCache
name,
typeLength,
typeId,
ownerSchema,
typeType,
typeCategory);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册