Interface IDatabaseProvider

All Known Implementing Classes:
ChDatabaseProvider, MsDatabaseProvider, PgDatabaseProvider

public interface IDatabaseProvider
Interface for DBMS
  • Method Details

    • getName

      String getName()
      Returns:
      short name of DBMS
    • getFullName

      String getFullName()
      Returns:
      full name of DBMS
    • createDatabase

      IDatabase createDatabase()
      Returns:
      new empty database instance for this DBMS
    • getJdbcConnector

      IJdbcConnector getJdbcConnector(String url)
      Parameters:
      url - full jdbc url
      Returns:
      jdbc connector for DBMS
      See Also:
    • getModelExporter

      IModelExporter getModelExporter(Path outDir, IDatabase newDb, Collection<TreeElement> changedObjects, ISettings settings)
      Parameters:
      outDir - target directory for the exported project
      newDb - the database schema to export
      changedObjects - list of changed tree elements to include in export
      settings - configuration settings
      Returns:
      model exporter for the DBMS
    • getProjectUpdater

      default IProjectUpdater getProjectUpdater(IDatabase newDb, IDatabase oldDb, Collection<TreeElement> changedObjects, Path projectPath, ISettings settings)
      Parameters:
      newDb - the new database version with changes
      oldDb - the old database version
      changedObjects - list of changed tree elements to apply
      projectPath - path to the project directory to update
      settings - configuration settings
      Returns:
      project updater for the DBMS
    • getProjectUpdater

      IProjectUpdater getProjectUpdater(IDatabase newDb, IDatabase oldDb, Collection<TreeElement> changedObjects, Path projectPath, boolean overridesOnly, ISettings settings)
      Parameters:
      newDb - the new database version with changes
      oldDb - the old database version
      changedObjects - list of changed tree elements to apply
      projectPath - path to the project directory to update
      overridesOnly - update overrides only
      settings - configuration settings
      Returns:
      project updater for the DBMS
    • getJdbcLoader

      IJdbcLoader getJdbcLoader(String url, DiffSettings diffSettings)
      Parameters:
      url - full jdbc url
      diffSettings - unified context object containing settings, monitor, ignore schema list, and error accumulator
      Returns:
      jdbc loader for the DBMS
      See Also:
    • getJdbcLoader

      IJdbcLoader getJdbcLoader(IJdbcConnector connector, DiffSettings diffSettings)
      Parameters:
      connector - jdbc connector for the DBMS
      diffSettings - unified context object containing settings, monitor, ignore schema list, and error accumulator
      Returns:
      jdbc loader for the DBMS
      See Also:
    • getDumpLoader

      IDumpLoader getDumpLoader(Path path, DiffSettings diffSettings)
      Parameters:
      path - path to dump file
      diffSettings - unified context object containing settings, monitor, and error accumulator
      Returns:
      dump loader for the DBMS
      See Also:
    • getDumpLoader

      IDumpLoader getDumpLoader(InputStreamProvider input, String name, DiffSettings diffSettings)
      Parameters:
      input - input stream provider for SQL content
      name - name of the source (for error reporting)
      diffSettings - configuration settings
      Returns:
      dump loader for DBMS
    • getProjectLoader

      IProjectLoader getProjectLoader(Path path, DiffSettings diffSettings)
      Parameters:
      path - path to project directory
      diffSettings - unified context object containing settings, monitor, ignore schema list, and error accumulator
      Returns:
      project loader for the DBMS
      See Also:
    • getProjectLoader

      IProjectLoader getProjectLoader(Path path, DiffSettings diffSettings, Collection<String> libXmls, Collection<String> libs, Collection<String> libsWithoutPriv, Path metaPath)
      Parameters:
      path - path to project directory
      diffSettings - unified context object containing settings, monitor, ignore schema list, and error accumulator
      libXmls - paths to XML files with library dependency definitions
      libs - paths to library dependencies
      libsWithoutPriv - paths to library dependencies with ignored privileges
      metaPath - path to metadata directory for storing downloaded and unzipped library files, may be null if no ZIP or URI libraries are expected
      Returns:
      project loader for the DBMS
      See Also:
    • getScriptBuilder

      IScriptBuilder getScriptBuilder(DiffSettings diffSettings)
      Parameters:
      diffSettings - configuration settings
      Returns:
      return script builder