[hibernate-commits] Hibernate SVN: r15764 - core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Jan 9 08:56:02 EST 2009


Author: jcosta at redhat.com
Date: 2009-01-09 08:56:01 -0500 (Fri, 09 Jan 2009)
New Revision: 15764

Modified:
   core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/SybaseDialect.java
Log:
JBPAPP-1563 HHH-3640 - Added mapping to functions mod and bit_length

Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/SybaseDialect.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/SybaseDialect.java	2009-01-09 13:45:30 UTC (rev 15763)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/SybaseDialect.java	2009-01-09 13:56:01 UTC (rev 15764)
@@ -103,6 +103,9 @@
 		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);
 	}
 




More information about the hibernate-commits mailing list