Subject Re: [Firebird-Java] system tables
Author Roman Rokytskyy
> We load the drivers dynamically, therefore we cannot do any cast to database specific classes in our code.

Ok.

> It is more easy to have the queries ( for extracting procedures, execution plan, and check constraints ).

Queries to get source code:

Select RDB$RELATION_NAME, RDB$VIEW_SOURCE From RDB$RELATIONS
Select RDB$PROCEDURE_NAME, RDB$PROCEDURE_SOURCE From RDB$PROCEDURES
Select RDB$TRIGGER_NAME, RDB$TRIGGER_SOURCE From RDB$TRIGGERS

Check constraints I sent in previous email.

And forget the execution plan - you can't get it without casting to
driver's class.

> For constraints we would need only the check constraints and table related constraints, the pk's, fk's and indexes we read via JDBC.

The unique constraints are returned via getExportedKeys, the query is
quite complex, but I will check whether it can be simplified.

Roman