Hi,

> If H2 instead of failing in advance when don't understand a sentence (in
> pass-t mode) just allow the other database handle the sentence for and
> act in regard of remote db exceptions or results, many things would work.
> In case some operation don't fill the conditions needed on H2 for
> handling such situation or results , at the end they will fail in the
> same way they fail now - so no loss.

How h2 will decide to which linked db send query if it can't even
parse it? Why it should parse the query at all if this query is
targeted to another db? I think the right solution is to use stored
procedures returning ResultSet. But to do it more convenient I think
it is possible to add to h2 new db object DBLINK with syntax like
CREATE DBLINK dblink_to_oracle (driver, url, user, password);
and function like
QUERY_DBLINK( dblink_to_oracle,
    SELECT xxx FROM some_oracle_table
    WHERE yyy = ?
    CONNECT BY PRIOR a = b
)
which can be used in more complex queries as function table. And the
query inside this function will not be parsed, only "?" should be
found to set parameters and execute it on this dblink. I think you
want something like this. But this will not be a one day work and I'm
not sure if Thomas will approve this feature..

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
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