Package org.pgcodekeeper.core.settings
Interface ISettings
- All Known Implementing Classes:
CoreSettings
public interface ISettings
Interface defining configuration settings for database comparison and migration operations.
Provides access to database type, formatting options, file paths, and various behavioral flags
that control how database schema comparisons and migrations are performed.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this settings instance.Gets the collection of allowed database object types for processing.Gets the database type for operations.Gets the format configuration for code formatting.Gets the input character encoding name.Gets the collection of post-processing file paths.Gets the collection of pre-processing file paths.Gets the time zone setting.booleanChecks if migration scripts should be wrapped in transactions.booleanChecks if object code should be automatically formatted.booleanChecks if comments should be moved to the end of generated scripts.booleanChecks if concurrent mode is enabled.booleanChecks if data movement mode is enabled for migrations.booleanChecks if function body checking should be disabled.booleanChecks if objects should be dropped before creating in migrations.booleanChecks if function body dependencies analysis is enabled.booleanChecks if constraints should be generated with NOT VALID option.booleanChecks if existence check DO blocks should be generated.booleanChecks if existence checks should be generated in migration scripts.booleanChecks if column order should be ignored during comparison.booleanChecks if concurrent modifications should be ignored.booleanChecks if privileges should be ignored during comparison.booleanChecks if newlines should be preserved in generated SQL.booleanChecks if USING clauses should be printed in generated SQL.booleanChecks if only selected objects should be processed.booleanChecks if view definitions should be simplified.booleanChecks if migration should stop when encountering not-allowed operations.voidsetIgnorePrivileges(boolean ignorePrivileges) Sets whether privileges should be ignored during comparison.
-
Method Details
-
getDbType
DatabaseType getDbType()Gets the database type for operations.- Returns:
- the database type
-
isConcurrentlyMode
boolean isConcurrentlyMode()Checks if concurrent mode is enabled.- Returns:
- true if concurrent mode is enabled
-
isAddTransaction
boolean isAddTransaction()Checks if migration scripts should be wrapped in transactions.- Returns:
- true if transaction wrapping is enabled
-
isGenerateExists
boolean isGenerateExists()Checks if existence checks should be generated in migration scripts.- Returns:
- true if existence checks are enabled
-
isGenerateConstraintNotValid
boolean isGenerateConstraintNotValid()Checks if constraints should be generated with NOT VALID option.- Returns:
- true if NOT VALID constraints are enabled
-
isGenerateExistDoBlock
boolean isGenerateExistDoBlock()Checks if existence check DO blocks should be generated.- Returns:
- true if DO block generation is enabled
-
isPrintUsing
boolean isPrintUsing()Checks if USING clauses should be printed in generated SQL.- Returns:
- true if USING clause printing is enabled
-
isKeepNewlines
boolean isKeepNewlines()Checks if newlines should be preserved in generated SQL.- Returns:
- true if newline preservation is enabled
-
isCommentsToEnd
boolean isCommentsToEnd()Checks if comments should be moved to the end of generated scripts.- Returns:
- true if comments are moved to end
-
isAutoFormatObjectCode
boolean isAutoFormatObjectCode()Checks if object code should be automatically formatted.- Returns:
- true if auto-formatting is enabled
-
isIgnorePrivileges
boolean isIgnorePrivileges()Checks if privileges should be ignored during comparison.- Returns:
- true if privileges are ignored
-
isIgnoreColumnOrder
boolean isIgnoreColumnOrder()Checks if column order should be ignored during comparison.- Returns:
- true if column order is ignored
-
isEnableFunctionBodiesDependencies
boolean isEnableFunctionBodiesDependencies()Checks if function body dependencies analysis is enabled.- Returns:
- true if function body dependencies are enabled
-
isDataMovementMode
boolean isDataMovementMode()Checks if data movement mode is enabled for migrations.- Returns:
- true if data movement mode is enabled
-
isDropBeforeCreate
boolean isDropBeforeCreate()Checks if objects should be dropped before creating in migrations.- Returns:
- true if drop-before-create is enabled
-
isStopNotAllowed
boolean isStopNotAllowed()Checks if migration should stop when encountering not-allowed operations.- Returns:
- true if stop-on-not-allowed is enabled
-
isSelectedOnly
boolean isSelectedOnly()Checks if only selected objects should be processed.- Returns:
- true if selected-only mode is enabled
-
isIgnoreConcurrentModification
boolean isIgnoreConcurrentModification()Checks if concurrent modifications should be ignored.- Returns:
- true if concurrent modifications are ignored
-
isSimplifyView
boolean isSimplifyView()Checks if view definitions should be simplified.- Returns:
- true if view simplification is enabled
-
isDisableCheckFunctionBodies
boolean isDisableCheckFunctionBodies()Checks if function body checking should be disabled.- Returns:
- true if function body checking is disabled
-
getInCharsetName
String getInCharsetName()Gets the input character encoding name.- Returns:
- the character encoding name
-
getTimeZone
String getTimeZone()Gets the time zone setting.- Returns:
- the time zone string
-
getFormatConfiguration
FormatConfiguration getFormatConfiguration()Gets the format configuration for code formatting.- Returns:
- the format configuration instance
-
getAllowedTypes
Collection<DbObjType> getAllowedTypes()Gets the collection of allowed database object types for processing.- Returns:
- collection of allowed object types
-
getPreFilePath
Collection<String> getPreFilePath()Gets the collection of pre-processing file paths.- Returns:
- collection of pre-processing file paths
-
getPostFilePath
Collection<String> getPostFilePath()Gets the collection of post-processing file paths.- Returns:
- collection of post-processing file paths
-
copy
ISettings copy()Creates a copy of this settings instance.- Returns:
- a new settings instance with the same configuration
-
setIgnorePrivileges
void setIgnorePrivileges(boolean ignorePrivileges) Sets whether privileges should be ignored during comparison.- Parameters:
ignorePrivileges- true to ignore privileges
-