Re: [Firebird-Java] Database Introspection with Jaybird
Author
Fidel Viegas
Post date
2008-02-06T22:41:04Z
On Feb 6, 2008 9:58 PM, Roman Rokytskyy <rrokytskyy@...> wrote:
Hi Roman,
> It's a bug which I missed when preparing 2.0.2
> (http://tracker.firebirdsql.org/browse/JDBC-106).
>
> I just checked the history, the issue was fixed for indexes
> (DatabaseMetaData.getIndexInfo method), but remains for getColumns. As
> workaround, you can check whether the name has lower-case characters and
> then quote the table name (prepend and append the double-quote character).
>
> I will, very likely, prepare 2.0.3 this weekend.
I figured that out after a lot of tests. What I did was check if the
string was all uppercase, which ends up being the same.
> Pass as types parameter new String[]{"TABLE"}.
Got that one sorted as well, but that is for getTables method. Which
patterns do you use for the getColumns? Let's say I want to get only
the user defined tables using getColumns. I used % for both
tableNamePattern and columnNamePattern, which obviously returns all
the tables (including system tables), which is not exactly what I
want.
Anyway, I am using the getTables, make a query on that table and get
the column names from the query.
Thanks a lot and I will be waiting for the new release.