Java Code Examples for org.hibernate.dialect.PostgreSQL10Dialect

The following examples show how to use org.hibernate.dialect.PostgreSQL10Dialect. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
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);
}
 
Example 2
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);
}