Class MetaDataCache

java.lang.Object
net.sf.jailer.modelbuilder.MetaDataCache

public class MetaDataCache extends Object
Reads database meta data directly from meta data views.
Author:
Wisser
  • Constructor Details

    • MetaDataCache

      public MetaDataCache()
  • Method Details

    • readPrimaryKeys

      public static MetaDataCache readPrimaryKeys(Session session, String schema)
      Reads primary keys.
      Parameters:
      session - the session
      schema - name of the schema
      Returns:
      cache
    • readIndexInfo

      public static MetaDataCache readIndexInfo(Session session, String schema)
      Reads index infos.
      Parameters:
      session - the session
      schema - name of the schema
      Returns:
      cache
    • readImportedKeys

      public static MetaDataCache readImportedKeys(Session session, String schema)
      Reads imported keys (FKs).
      Parameters:
      session - the session
      schema - name of the schema
      Returns:
      cache
    • readColumns

      public static MetaDataCache readColumns(Session session, String schema)
      Reads column infos.
      Parameters:
      session - the session
      schema - name of the schema
      Returns:
      cache
    • forTable

      public ResultSet forTable(String tableName)
      Returns a result set containing the cached meta data rows for the given table name.
      Parameters:
      tableName - the unqualified table name to look up
      Returns:
      a ResultSet with the cached rows, or null if the cache is empty
    • info

      public String info(String subject)
      Returns a diagnostic string describing the cache contents for the given subject table.
      Parameters:
      subject - the table name to include in the diagnostic output
      Returns:
      a string with cache statistics and the rows for the given subject table