FileDocCategorySizeDatePackage
FrontBaseDialect.javaAPI DocHibernate 3.2.53080Thu Feb 23 10:32:48 GMT 2006org.hibernate.dialect

FrontBaseDialect

public class FrontBaseDialect extends Dialect
An SQL Dialect for Frontbase. Assumes you're using the latest version of the FrontBase JDBC driver, available from http://frontbase.com/

NOTE: The latest JDBC driver is not always included with the latest release of FrontBase. Download the driver separately, and enjoy the informative release notes.

This dialect was tested with JDBC driver version 2.3.1. This driver contains a bug that causes batches of updates to fail. (The bug should be fixed in the next release of the JDBC driver.) If you are using JDBC driver 2.3.1, you can work-around this problem by setting the following in your hibernate.properties file: hibernate.jdbc.batch_size=15

author
Ron Lussier rlussier@lenscraft.com

Fields Summary
Constructors Summary
public FrontBaseDialect()

		super();

		registerColumnType( Types.BIT, "bit" );
		registerColumnType( Types.BIGINT, "longint" );
		registerColumnType( Types.SMALLINT, "smallint" );
		registerColumnType( Types.TINYINT, "tinyint" );
		registerColumnType( Types.INTEGER, "integer" );
		registerColumnType( Types.CHAR, "char(1)" );
		registerColumnType( Types.VARCHAR, "varchar($l)" );
		registerColumnType( Types.FLOAT, "float" );
		registerColumnType( Types.DOUBLE, "double precision" );
		registerColumnType( Types.DATE, "date" );
		registerColumnType( Types.TIME, "time" );
		registerColumnType( Types.TIMESTAMP, "timestamp" );
		registerColumnType( Types.VARBINARY, "bit varying($l)" );
		registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
		registerColumnType( Types.BLOB, "blob" );
		registerColumnType( Types.CLOB, "clob" );
	
Methods Summary
public booleandropConstraints()

		return false;
	
public java.lang.StringgetAddColumnString()

		return "add column";
	
public java.lang.StringgetCascadeConstraintsString()

		return " cascade";
	
public java.lang.StringgetCurrentTimestampCallString()

		// TODO : not sure this is correct, could not find docs on how to do this.
		return "{?= call current_timestamp}";
	
public java.lang.StringgetForUpdateString()
Does this dialect support the FOR UPDATE syntax. No!

return
false always. FrontBase doesn't support this syntax, which was dropped with SQL92

		return "";
	
public org.hibernate.dialect.lock.LockingStrategygetLockingStrategy(org.hibernate.persister.entity.Lockable lockable, org.hibernate.LockMode lockMode)

		// Frontbase has no known variation of a "SELECT ... FOR UPDATE" syntax...
		if ( lockMode.greaterThan( LockMode.READ ) ) {
			return new UpdateLockingStrategy( lockable, lockMode );
		}
		else {
			return new SelectLockingStrategy( lockable, lockMode );
		}
	
public booleanisCurrentTimestampSelectStringCallable()

		return true;