HHH-3640 - Added bit_length and mod to SybaseDialect.

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15884 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Juraci Krohling 2009-02-04 08:42:07 +00:00
parent cc78cbf6fe
commit 3daba271a9
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ public class SybaseDialect extends Dialect {
registerFunction( "trim", new SQLFunctionTemplate( Hibernate.STRING, "ltrim(rtrim(?1))") ); registerFunction( "trim", new SQLFunctionTemplate( Hibernate.STRING, "ltrim(rtrim(?1))") );
registerFunction( "locate", new CharIndexFunction() ); registerFunction( "locate", new CharIndexFunction() );
registerFunction( "mod", new SQLFunctionTemplate( Hibernate.INTEGER, "?1 % ?2" ) );
registerFunction( "bit_length", new SQLFunctionTemplate( Hibernate.INTEGER, "datalength(?1) * 8" ) );
getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH); getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
} }