Skip to content

Commit 6a15c46

Browse files
committed
Fix locate function for SQLite
1 parent 4def0d0 commit 6a15c46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/NHibernate/Dialect/SQLiteDialect.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ protected virtual void RegisterFunctions()
105105
RegisterFunction("current_date", new SQLFunctionTemplate(NHibernateUtil.LocalDate, "datetime(date(current_timestamp, 'localtime'))"));
106106

107107
RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String));
108+
RegisterFunction("locate", new StandardSQLFunction("instr", NHibernateUtil.Int32));
108109
RegisterFunction("left", new SQLFunctionTemplate(NHibernateUtil.String, "substr(?1,1,?2)"));
109110
RegisterFunction("trim", new AnsiTrimEmulationFunction());
110111
RegisterFunction("replace", new StandardSafeSQLFunction("replace", NHibernateUtil.String, 3));

0 commit comments

Comments
 (0)