But are there not *already* two mechanisms of querying "customized"
tables?  I know them as:

- User-defined functions: "Using Functions as Tables" (
http://www.h2database.com/html/features.html#user_defined_functions)
- TableEngine (I extend RegularTable for my current purposes)

To Sergey and Thomas' credit, the second option works quite well, I guess
my needs are overly specific.

On Tue, Aug 7, 2012 at 10:14 AM, Noel Grandin <[email protected]> wrote:

> Hmm, that makes me think that it might be a nice feature to extend the
> existing User-Defined-Functions feature to create some kind of
> User-Defined-Tables feature.
>
>
>
> On 2012-08-07 16:07, Atul Chowdhury wrote:
>
>> Yes, I've been down that road - the problem with functions is that my
>> data sources are generated twice --  during the registration  (?) and
>> actual invocation of the table-valued function that wraps my POJOs.
>> Re: stored procedures; One of the constraints in my application is that
>> the SQL must be simple; meaning, I cannot issue "select * from
>> CALL('my_sp_here')" nor can I do "select * from myfunction()" as the driver
>> will be adapted by query tools that impose a typical "select  <columns>
>> from <tables> where <conditions>" syntax.  (even if I could get around
>> syntax, the double-query that happens on my datasource via java functions
>> is too costly).
>> TableEngine lends itself best to this, but because I need to pre-process
>> parts of the query, having access to the Parser tree and thus the
>> expression conditions, visible select columns, etc, would make life easier.
>>  Still, the hooks I have today work OK in Select.queryWithoutCache() so
>> I'll probably just go down that road.
>> Thanks for your input.
>>
>>
>>
>

-- 
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