Skip to content

Commit 8338b35

Browse files
committed
Register more string functions (NH-3193)
1 parent a38f80a commit 8338b35

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/NHibernate/Dialect/MsSqlCeDialect.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ public MsSqlCeDialect()
5454
RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(year, ?1)"));
5555

5656
RegisterFunction("length", new StandardSQLFunction("len", NHibernateUtil.Int32));
57+
RegisterFunction("locate", new StandardSQLFunction("charindex", NHibernateUtil.Int32));
58+
RegisterFunction("replace", new StandardSafeSQLFunction("replace", NHibernateUtil.String, 3));
59+
RegisterFunction("rtrim", new StandardSQLFunction("rtrim"));
60+
RegisterFunction("ltrim", new StandardSQLFunction("ltrim"));
61+
RegisterFunction("upper", new StandardSQLFunction("upper"));
62+
RegisterFunction("lower", new StandardSQLFunction("lower"));
63+
64+
RegisterFunction("trim", new AnsiTrimEmulationFunction());
5765

5866
RegisterFunction("concat", new VarArgsSQLFunction(NHibernateUtil.String, "(", "+", ")"));
5967

0 commit comments

Comments
 (0)