Interface SchemaProvider

All Known Implementing Classes:
DefaultSchemaProvider

public interface SchemaProvider
  • Method Details

    • findTables

      List<QualifiedName> findTables(String dbName, String tableNamePattern) throws SQLException
      Find all tables matching the specified pattern.
      Parameters:
      dbName - May be null to search in all databases, empty to search in "temp" and "main".
      tableNamePattern - LIKE pattern. May be null to retrieve all tables.
      Throws:
      SQLException
    • getDbName

      String getDbName(String dbName, String tableName) throws SQLException
      Find the database containing this table.
      Parameters:
      dbName - May be null to search in all databases, empty to search in "temp" and "main".
      tableName - Table name
      Returns:
      "temp" or "main" or attached database name. If there is no table matching tableName, the returned value is undefined.
      Throws:
      SQLException
    • getSchema

      String getSchema(String dbName, String tableName) throws SQLException
      Parameters:
      dbName - null means "main".
      tableName - Table name
      Returns:
      SQL used to create the specified table
      Throws:
      SQLException
    • getDbNames

      List<String> getDbNames(String dbName) throws SQLException
      PRAGMA database_list
      Parameters:
      dbName - May be null to search in all databases, empty to search in "temp" and "main".
      Throws:
      SQLException