cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: DbMerger/MySQL compatibility
Date Thu, 28 Aug 2008 19:34:17 GMT
Not sure if that's helpful at all, but we have a mechanism to detect  
the default table type on a given DB. See MySQLSniffer for details  
("SHOW VARIABLES LIKE 'table_type'"). Maybe not that helpful, as (1)  
it is not using metadata, but rather a MySQL specific command and (2)  
DB default doesn't necessarily means all tables will follow that. I  
have schemas that mix and match InnoDB and MyISAM (for no good reason  
IMO, but still).


On Aug 28, 2008, at 10:19 PM, Tore Halset wrote:

> On Aug 28, 2008, at 21:03, Scott Anderson wrote:
>>> Is it possible to detect this via jdbc?
>> A rather long-winded way to detect table type is:
>> SHOW CREATE TABLE [table name];
>> This will return the full CREATE TABLE instruction required to  
>> rebuild
>> that table. If this is already how you determine what the fields look
>> like, it should be trivial to add logic to parse the ENGINE  
>> parameter.
> Currently, I use jdbc metadata only.
> - Tore.

View raw message