Class AbstractModelExporter
java.lang.Object
org.pgcodekeeper.core.database.base.project.AbstractModelExporter
- All Implemented Interfaces:
IModelExporter
- Direct Known Subclasses:
AbstractOverridesModelExporter,ChModelExporter,MsModelExporter,PgModelExporter
Abstract base class for database model exporters that provides common export functionality
for different database types (PostgreSQL, MS SQL, ClickHouse).
Subclasses must implement database-specific methods for directory structure and file paths.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidExports the complete database schema to directory structure.voidExports only changed objects based on comparison between old and new schemas.voidExports selected objects as a new project structure.getDumpSql(IStatement statement) static StringgetExportedFilenameSql(String name) Gets the SQL filename with .sql extension.static voidwriteProjVersion(Path path) Writes project version marker file.
-
Field Details
-
GROUP_DELIMITER
- See Also:
-
-
Method Details
-
exportFull
Description copied from interface:IModelExporterExports the complete database schema to directory structure. Creates output directory and exports all database objects as SQL files.- Specified by:
exportFullin interfaceIModelExporter- Throws:
IOException- if export operation fails
-
exportPartial
Description copied from interface:IModelExporterExports only changed objects based on comparison between old and new schemas. Handles object additions, deletions, and modifications.- Specified by:
exportPartialin interfaceIModelExporter- Throws:
IOException- if export operation failsPgCodeKeeperException- if old database is null or directory issues occur
-
exportProject
Description copied from interface:IModelExporterExports selected objects as a new project structure. Creates clean directory structure with only specified objects.- Specified by:
exportProjectin interfaceIModelExporter- Throws:
IOException- if export operation fails
-
getDumpSql
-
getExportedFilenameSql
Gets the SQL filename with .sql extension.- Parameters:
name- the base name- Returns:
- filename with .sql extension
-
writeProjVersion
Writes project version marker file.- Parameters:
path- the path to write version file- Throws:
IOException- if writing fails
-