I'm (re)writing an SQL Database Management System ( DeveelDB ) oriented to the .NET and Mono frameworks. Being a standard SQL-99 database system, it also provides functions and procedures.
The old implementation of the system resolved functions only against their name, assuming function names were unique (a shortcut) and delegating to the function object the resolution of arguments at Run-Time.
In the new version I'm allowing the dynamic definition of functions and procedures and their resolve against a combination of name, argument number and argument types.
Anyway, I feel the algorithm I'm using now is pretty bad and I'm looking for a better one.
In fact, SQL Functions allow the definition of DETERMINISTIC
types (eg. Dynamic types resolved at run-time). Furthermore, they allow UNBOUNDED
last parameter (eg. params
notation in C#), which allows an unlimited number of arguments to be provided.
Programming languages such as Java and C# have a fast function resolving, and I'm wondering if are there generic algorithms that I can study to implement the code needed for such resolution.
Thank you all!