Subject Re: [Firebird-Architect] Re: embedding Lua as procedural language
Author Jim Starkey
Adriano dos Santos Fernandes wrote:
> Roman Rokytskyy wrote:
>>> JavaScript may take longer, unless you already know how to embed
>>> them.
>> Embedding Rhino (JavaScript engine in Java, Mozilla) is a matter of 1-2
>> days of implementation incl. the usage scenario:
>> var results = connection.execute("select first_name, last_name from
>> people where town=?", "Manchester");
>> while (
>> doSomething(results.first_name, results.last_name);
>> delete results;
> What about javax.script package?
Don't know -- it's never come up.
> With some small (that I already plan) additions to FB Java Engine, it
> will be possible to implement an engine in Java that interfaces with
> javax.script engines.
> Would it be possible (and good) to directly call JDBC methods from
> Javascript functions?
That's the plan. The SQL engine in Netfrastructure and Nimbus is JDBC
based, so it should be easy. Basically build a C++ class that
implements Connection, ResultSet, and probably MetaDataResultSet for
JavaScript. The rest of like fall off a log.
> Certainly will not be the fast things, but easy enough to support and if
> desired, reimplemented in different ways.
There are an infinite ways to implement anything. The art is picking
the best way for a specific application.

Jim Starkey
President, NimbusDB, Inc.
978 526-1376