Class MySQLMetaDataDialect

All Implemented Interfaces:
RevengDialect

public class MySQLMetaDataDialect extends JDBCMetaDataDialect
  • Constructor Details

    • MySQLMetaDataDialect

      public MySQLMetaDataDialect()
  • Method Details

    • getSuggestedPrimaryKeyStrategyName

      public Iterator<Map<String,Object>> getSuggestedPrimaryKeyStrategyName(String catalog, String schema, String table)
      Based on info from http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html Should work on pre-mysql 5 too since it uses the "old" SHOW TABLE command instead of SELECT from infotable.
      Specified by:
      getSuggestedPrimaryKeyStrategyName in interface RevengDialect
      Overrides:
      getSuggestedPrimaryKeyStrategyName in class AbstractMetaDataDialect
      Parameters:
      catalog -
      schema -
      Returns:
      iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "HIBERNATE_STRATEGY" (null if no possible to determine strategy, otherwise return hibernate identifier strategy name/classname)
    • getTables

      public Iterator<Map<String,Object>> getTables(String xcatalog, String xschema, String xtable)
      Description copied from interface: RevengDialect
      Return iterator over the tables that mathces catalog, schema and table
      Specified by:
      getTables in interface RevengDialect
      Overrides:
      getTables in class JDBCMetaDataDialect
      Parameters:
      xcatalog - name or null
      xschema - name or null
      xtable - name or null
      Returns:
      iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "TABLE_TYPE" keys.
    • getColumns

      public Iterator<Map<String,Object>> getColumns(String xcatalog, String xschema, String xtable, String xcolumn)
      Description copied from interface: RevengDialect
      Return iterator over the columns that mathces catalog, schema and table
      Specified by:
      getColumns in interface RevengDialect
      Overrides:
      getColumns in class JDBCMetaDataDialect
      Parameters:
      xcatalog - name or null
      xschema - name or null
      xtable - name or null
      xcolumn - name or null
      Returns:
      iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "DATA_TYPE", "TYPE_NAME", "COLUMN_NAME", "NULLABLE", "COLUMN_SIZE", "DECIMAL_DIGITS"