@@ -64,6 +64,21 @@ public PostgreSQLDialect()
64
64
RegisterFunction ( "replace" , new StandardSQLFunction ( "replace" , NHibernateUtil . String ) ) ;
65
65
RegisterFunction ( "left" , new SQLFunctionTemplate ( NHibernateUtil . String , "substr(?1,1,?2)" ) ) ;
66
66
RegisterFunction ( "mod" , new SQLFunctionTemplate ( NHibernateUtil . Int32 , "((?1) % (?2))" ) ) ;
67
+
68
+ RegisterFunction ( "sign" , new StandardSQLFunction ( "sign" , NHibernateUtil . Int32 ) ) ;
69
+ RegisterFunction ( "round" , new SQLFunctionTemplate ( NHibernateUtil . Double , "round(cast(?1 as numeric), ?2)" ) ) ;
70
+
71
+ // Trigonometric functions.
72
+ RegisterFunction ( "acos" , new StandardSQLFunction ( "acos" , NHibernateUtil . Double ) ) ;
73
+ RegisterFunction ( "asin" , new StandardSQLFunction ( "asin" , NHibernateUtil . Double ) ) ;
74
+ RegisterFunction ( "atan" , new StandardSQLFunction ( "atan" , NHibernateUtil . Double ) ) ;
75
+ RegisterFunction ( "cos" , new StandardSQLFunction ( "cos" , NHibernateUtil . Double ) ) ;
76
+ RegisterFunction ( "cot" , new StandardSQLFunction ( "cot" , NHibernateUtil . Double ) ) ;
77
+ RegisterFunction ( "sin" , new StandardSQLFunction ( "sin" , NHibernateUtil . Double ) ) ;
78
+ RegisterFunction ( "tan" , new StandardSQLFunction ( "tan" , NHibernateUtil . Double ) ) ;
79
+ RegisterFunction ( "atan2" , new StandardSQLFunction ( "atan2" , NHibernateUtil . Double ) ) ;
80
+
81
+ RegisterFunction ( "power" , new StandardSQLFunction ( "power" , NHibernateUtil . Double ) ) ;
67
82
}
68
83
69
84
public override string AddColumnString
0 commit comments