From 3daba271a9d2fbe98acf372850ce1549349393e1 Mon Sep 17 00:00:00 2001 From: Juraci Krohling Date: Wed, 4 Feb 2009 08:42:07 +0000 Subject: [PATCH] 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 --- core/src/main/java/org/hibernate/dialect/SybaseDialect.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/org/hibernate/dialect/SybaseDialect.java b/core/src/main/java/org/hibernate/dialect/SybaseDialect.java index ae6f8b4df3..aa78d7c1af 100644 --- a/core/src/main/java/org/hibernate/dialect/SybaseDialect.java +++ b/core/src/main/java/org/hibernate/dialect/SybaseDialect.java @@ -126,6 +126,9 @@ public class SybaseDialect extends Dialect { registerFunction( "trim", new SQLFunctionTemplate( Hibernate.STRING, "ltrim(rtrim(?1))") ); 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); }