On Dec 10, 2007 8:38 PM, John Baker <[EMAIL PROTECTED]> wrote: > I'd like to export an instance of ResultSetMetaData as DDL in the same > format as produced by > DatabaseToDdlTask, except using Java. > > I can write my own, but I wonder if there's some example already available
The easiest way to achieve this is probably to create a subclass of JdbcModelReader (or the database specific subclass if this is a platform supported by DdlUtils), and override readTables to suit your needs. You could try to creating a subclass of DatabaseMetadataWrapper that wraps around your ResultSetMetaData object if it exposes enough information. You should be aware however that databases not always expose all necessary data via the meta data objects. In these cases, DdlUtils queries system tables to gather additional info. Tom
