Interface IDatabaseProvider
- All Known Implementing Classes:
ChDatabaseProvider,MsDatabaseProvider,PgDatabaseProvider
public interface IDatabaseProvider
Interface for DBMS
-
Method Summary
Modifier and TypeMethodDescriptiongetDumpLoader(Path path, DiffSettings diffSettings) getDumpLoader(InputStreamProvider input, String name, DiffSettings diffSettings) getJdbcConnector(String url) getJdbcLoader(String url, DiffSettings diffSettings) getJdbcLoader(IJdbcConnector connector, DiffSettings diffSettings) getModelExporter(Path outDir, IDatabase newDb, Collection<TreeElement> changedObjects, ISettings settings) getName()getProjectLoader(Path path, DiffSettings diffSettings) getProjectLoader(Path path, DiffSettings diffSettings, Collection<String> libXmls, Collection<String> libs, Collection<String> libsWithoutPriv, Path metaPath) getProjectUpdater(IDatabase newDb, IDatabase oldDb, Collection<TreeElement> changedObjects, Path projectPath, boolean overridesOnly, ISettings settings) default IProjectUpdatergetProjectUpdater(IDatabase newDb, IDatabase oldDb, Collection<TreeElement> changedObjects, Path projectPath, ISettings settings) getScriptBuilder(DiffSettings diffSettings)
-
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
- 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 projectnewDb- the database schema to exportchangedObjects- list of changed tree elements to include in exportsettings- 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 changesoldDb- the old database versionchangedObjects- list of changed tree elements to applyprojectPath- path to the project directory to updatesettings- 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 changesoldDb- the old database versionchangedObjects- list of changed tree elements to applyprojectPath- path to the project directory to updateoverridesOnly- update overrides onlysettings- configuration settings- Returns:
- project updater for the DBMS
-
getJdbcLoader
- Parameters:
url- full jdbc urldiffSettings- unified context object containing settings, monitor, ignore schema list, and error accumulator- Returns:
- jdbc loader for the DBMS
- See Also:
-
getJdbcLoader
- Parameters:
connector- jdbc connector for the DBMSdiffSettings- unified context object containing settings, monitor, ignore schema list, and error accumulator- Returns:
- jdbc loader for the DBMS
- See Also:
-
getDumpLoader
- Parameters:
path- path to dump filediffSettings- unified context object containing settings, monitor, and error accumulator- Returns:
- dump loader for the DBMS
- See Also:
-
getDumpLoader
- Parameters:
input- input stream provider for SQL contentname- name of the source (for error reporting)diffSettings- configuration settings- Returns:
- dump loader for DBMS
-
getProjectLoader
- Parameters:
path- path to project directorydiffSettings- 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 directorydiffSettings- unified context object containing settings, monitor, ignore schema list, and error accumulatorlibXmls- paths to XML files with library dependency definitionslibs- paths to library dependencieslibsWithoutPriv- paths to library dependencies with ignored privilegesmetaPath- 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
- Parameters:
diffSettings- configuration settings- Returns:
- return script builder
-