hi!

i'd like to propose a simple but effective methodology to auto register 
additional db-functions to h2 just by having the user/admin making 
additional jar files available on the classpath.

The H2-DB Engine would have to use the classloader to lookup all files 
named '/META-INF/org.h2.ext.FunctionClass' (or similar) which would be a 
simple text file containing one class-name by line to be considered.

then:

for each $class
{
  if $class instanceof org.h2.api.AggregateFunction 
  {
    registerFunctionClass($class)
  }
  else
  {
    scan $class for methods starting with 'FN_' 
      then registerFunctionMethod($class, $method, $fname)
  }
}

for the MODE-Support already in H2 a filename 
like '/META-INF/org.h2.ext.FunctionClass.$MODE' could be used.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/NXzf0yf1S8AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to