Hi,

> Would it be a good thing if we could store any Java code that could be used 
> within H2, within H2 itself?

Yes. I will add a feature requests:

- Trigger: allow declaring as source code (like functions).
- User defined aggregate: allow declaring as source code (like functions).

I'm not so sure about database event listeners. I guess usually they
are set when connecting, and you probably don't want to pass the
source code within the database URL. And I don't think it's required
for other components such as TableEngine and FileSystem.

> does not require all org.h2.api.Trigger interface methods to be implemented

I suggest it should extend the new org.h2.tools.TriggerAdapter.

> built in procedural language

I thought about that as well. I guess at some point it should be
supported for compatibility (PL/SQL, Transact-SQL). So a parser is
needed. Writing a interpreter or compiler however may not be required.
Instead, the parser could generate Java source code. The advantages
would be: faster execution speed, smaller H2 jar file, less source
code, easier to maintain. The disadvantage is that you need a Java
compiler at runtime, but so far this doesn't seem to be a problem for
most people. As an alternative to Java source code, the Java 6
scripting engine (javax.script) could be used.

> creating a whole new programming language

There are already quite many programming languages... I would like to
avoid that, except for compatibility.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-datab...@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to