Skip to content

Map Firebird UDF functions to built-in functions - #3836

Draft
hazzik wants to merge 2 commits into
nhibernate:masterfrom
hazzik:firebird-udf-functions
Draft

Map Firebird UDF functions to built-in functions#3836
hazzik wants to merge 2 commits into
nhibernate:masterfrom
hazzik:firebird-udf-functions

Conversation

@hazzik

@hazzik hazzik commented Aug 28, 2026

Copy link
Copy Markdown
Member

Map the HQL function names that come from the ib_udf and fbudf external libraries to the equivalent Firebird built-in functions. The sqtr name was a spelling error and now calls sqrt.

These libraries are not installed by default, and Firebird 4 does not permit external functions. The names could not work on a standard installation.

@hazzik hazzik changed the title Map the Firebird UDF function names to built-in functions Map Firebird UDF function names to built-in functions Aug 28, 2026
@hazzik hazzik changed the title Map Firebird UDF function names to built-in functions Map Firebird UDF functions to built-in functions Aug 28, 2026
@hazzik
hazzik marked this pull request as draft August 28, 2026 20:14
RegisterFunction("rand", new NoArgSQLFunction("rand", NHibernateUtil.Double));
RegisterFunction("random", new NoArgSQLFunction("rand", NHibernateUtil.Double));
RegisterFunction("sign", new StandardSQLFunction("sign", NHibernateUtil.Int32));
RegisterFunction("sqtr", new StandardSQLFunction("sqtr", NHibernateUtil.Double));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this not working at all, since the spelling error was in the native name, too?

In such case, why keep the spelling error in HQL, if it was not functional? I mean, register sqrt in HQL if it is not already in the base dialect, and remove sqtr if it was not working at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants