Interface IWorkDirs
- All Known Implementing Classes:
AbstractWorkDirs,ChWorkDirs,MsWorkDirs,PgWorkDirs
public interface IWorkDirs
Project directory layout. Describes which directory name is associated with
each database object type and resolves per-object file locations.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the mapping of configurable type names to their placement rules.getDirNameForType(DbObjType type) Returns the current directory name of the generic rule for the given type.Computes the relative path (inside a project directory) where the given statement should be stored.booleanReturnstrueif objects are organized into subdirectories per schema/database container,falseif the schema name is encoded in the filename instead.voidsaveAltDirs(Path projectPath) Persists the current directory layout overrides to the given project.
-
Field Details
-
SCHEMA_KEY
- See Also:
-
-
Method Details
-
isSplitBySchema
boolean isSplitBySchema()Returnstrueif objects are organized into subdirectories per schema/database container,falseif the schema name is encoded in the filename instead. -
getDirMapping
Returns the mapping of configurable type names to their placement rules. Defines which object types participate in the project layout and may be overridden by external configuration.Keys are type names (e.g.
TABLE,VIEW,TRIGGER_FUNC). Values areIDirRuleinstances carrying the current directory name (default or overridden) together with matching metadata.- Returns:
- map of type names to their placement rules
-
getRelativeFilePath
Computes the relative path (inside a project directory) where the given statement should be stored. Walks upISubElementchains so that sub-elements share the file of their parent.- Parameters:
st- statement to locate- Returns:
- project-relative path to the statement's SQL file
-
getDirNameForType
Returns the current directory name of the generic rule for the given type. Specific-subset rules (e.g.MAT_VIEW,TRIGGER_FUNC) are skipped so the result reflects where the "regular" objects of the type live.- Parameters:
type- object type- Returns:
- directory name, or
nullif no generic rule is registered
-
saveAltDirs
Persists the current directory layout overrides to the given project. Implementations write only entries that differ from the defaults, so an unchanged layout may produce an empty file.- Parameters:
projectPath- target project directory; must exist- Throws:
IOException- if the configuration file cannot be written
-