Hi,

> I encounter some function visibility problems

Yes, you are the first one that wants to implement the auto-complete
feature outside of the H2 Console :-)

> May be I should write my own ?

It depends. If you basically want the same feature as in the H2 Console,
then it doesn't make sense to write your own. I found auto-complete for SQL
is quite complex. Of course the current visibility of the feature can be
changed. It may make sense to move some classes to different directories,
for example to org.h2.bnf.autocomplete, and then export this package.

Regards,
Thomas



On Sunday, September 1, 2013, Nicolas Fortin (OrbisGIS) wrote:

> Hi,
>
> Ok for syntax error position. I encounter some function visibility
> problems in
> http://code.google.com/p/h2database/source/browse/trunk/h2/src/main/org/h2/server/web/DbContents.javaas
>  it use default visibility (protected) and it is not exported in OSGi.
> May be I should write my own ?
>
> Thank you
>
> -Nicolas Fortin
> Atelier SIG
> IRSTV FR CNRS 2488
>
> Le dimanche 1 septembre 2013 09:16:27 UTC+2, Thomas Mueller a écrit :
>>
>> Hi,
>>
>> So, I guess I will remove the JdbcParseSQLException interface. It's a bit
>> problematic as it doesn't work for the client/server case (of course it
>> could be made to work, but I would like to avoid this added complexity).
>>
>> I will try to add the "syntaxErrorPosition" field in the JdbcSQLException
>> however. The "expectedTokens" I will not add right now.
>>
>> Regards,
>> Thomas
>>
>>
>>
>> On Fri, Aug 30, 2013 at 9:45 AM, Nicolas Fortin (OrbisGIS) <
>> [email protected]> wrote:
>>
>>  Hi,
>>
>> Ouch, yes I missed this package, thank you ! I have to update the csv
>> file to synchronize with the last update of the h2 parser. It seems that I
>> can feed the bnf with DatabaseMetaData, great.
>>
>> I'm on it.
>>
>>
>> -Nicolas Fortin
>> Atelier SIG
>> IRSTV FR CNRS 2488
>>
>>
>> Le jeudi 29 août 2013 17:16:23 UTC+2, Thomas Mueller a écrit :
>>
>> Hi,
>>
>> Do you want to do something like the H2 Console autocomplete feature? If
>> yes, then it would be better to use the BNF tool, like the H2 Console does.
>> That way, you can add table names / column names and so on.
>>
>> Regards,
>> Thomas
>>
>>
>>
>> On Thu, Aug 29, 2013 at 4:44 PM, Nicolas Fortin (OrbisGIS) <
>> [email protected]> wrote:
>>
>> Hi,
>>
>> Yes I need this, as it will feed the console auto-completion.
>>
>>
>> -Nicolas Fortin
>> Atelier SIG
>> IRSTV FR CNRS 2488
>>
>> Le jeudi 29 août 2013 16:31:28 UTC+2, Thomas Mueller a écrit :
>>
>>  Hi,
>>
>> > this is why the Noel's PARSE sql request seems to be a better solution.
>>
>> I'm not yet convinced this is the best solution.
>>
>> Do you really need the method "getExpectedTokens"? If yes, then
>> JdbcSQLException could parse the error message and search for "expected:".
>>
>>
>> > I can't as this message can be translated or changed later.
>>
>> My question was: do you need it?
>>
>> You don't need to implement it yourself. This can be implemented in H2
>> itself (I can implement it). Translation is not a problem.
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>> On Thu, Aug 29, 2013 at 4:01 PM, Nicolas Fortin (OrbisGIS) <
>> [email protected]> wrote:
>>
>> Hi,
>>
>> The current solution doesn't work for the client/server case.
>>
>>
>> It's true, this is why the Noel's PARSE sql request seems to be a better
>> solution.
>>
>>
>> Do you really need the method "getExpectedTokens"? If yes, then
>> JdbcSQLException could parse the error message and search for "expected:".
>>
>>
>> I can't as this message can be translated or changed later.
>>
>>
>> -Nicolas Fortin
>> Atelier SIG
>> IRSTV FR CNRS 2488
>>
>> Le jeudi 29 août 2013 14:34:02 UTC+2, Thomas Mueller a écrit :
>>
>> Hi,
>>
>> The current solution doesn't work for the client/server case.
>>
>> What about removing the JdbcParseSQLException interface, and extending
>> JdbcSQLException with getSyntaxErrorPosition? It would return -1 if it's
>> not a syntax exception, and would return the position if it is.
>>
>> Internally, JdbcSQLException could detect the
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:_e({},
> 'cvml', 'h2-database%[email protected]');>.
> To post to this group, send email to 
> [email protected]<javascript:_e({}, 'cvml', 
> '[email protected]');>
> .
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to