org.hibernate.dialect.SybaseDialect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beangle-hibernate-core Show documentation
Show all versions of beangle-hibernate-core Show documentation
Hibernate Orm Core Shade,Support Scala Collection
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.dialect;
import java.sql.Types;
import org.hibernate.type.descriptor.sql.BlobTypeDescriptor;
import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
/**
* All Sybase dialects share an IN list size limit.
*
* @author Brett Meyer
*/
public class SybaseDialect extends AbstractTransactSQLDialect {
private static final int PARAM_LIST_SIZE_LIMIT = 250000;
@Override
public int getInExpressionCountLimit() {
return PARAM_LIST_SIZE_LIMIT;
}
@Override
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
switch (sqlCode) {
case Types.BLOB:
return BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING;
case Types.CLOB:
// Some Sybase drivers cannot support getClob. See HHH-7889
return ClobTypeDescriptor.STREAM_BINDING_EXTRACTING;
default:
return super.getSqlTypeDescriptorOverride( sqlCode );
}
}
@Override
public String getNullColumnString() {
return " null";
}
@Override
public String getCurrentSchemaCommand() {
return "select db_name()";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy