下面列出了怎么用org.hibernate.dialect.PostgreSQL10Dialect的API类实例代码及写法,或者点击链接到github查看源代码。
public ClobType(Dialect dialect) {
super(new VarcharTypeDescriptor() {
@Override
public int getSqlType() {
//force the use of byte instead of oid on Postgres
return dialect instanceof PostgreSQL10Dialect
? Types.LONGVARCHAR
: Types.CLOB;
}
@Override
public boolean canBeRemapped() {
return false;
}
}, StringTypeDescriptor.INSTANCE);
}
public BlobType(Dialect dialect) {
super(new VarbinaryTypeDescriptor() {
@Override
public int getSqlType() {
//force the use of text instead of oid on Postgres
return dialect instanceof PostgreSQL10Dialect
? Types.LONGVARBINARY
: Types.BLOB;
}
@Override
public boolean canBeRemapped() {
return false;
}
}, PrimitiveByteArrayTypeDescriptor.INSTANCE);
}