Package org.pgcodekeeper.core.schema.ms
Class MsDatabase
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractDatabase
org.pgcodekeeper.core.schema.ms.MsDatabase
- All Implemented Interfaces:
IHashable,IDatabase,IStatement,IStatementContainer
Represents a Microsoft SQL database with its schemas, assemblies, roles, and users.
Provides functionality for managing database-level objects and their relationships.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssembly(MsAssembly assembly) Adds an assembly to this database.voidaddChild(IStatement st) Adds a child statement to this container.voidAdds a role to this database.voidAdds a user to this database.booleanDeep part ofPgStatement.equals(Object).voidcomputeChildrenHash(Hasher hasher) Gets all assemblies in this database.getAssembly(String name) Returns assembly of given name or null if the assembly has not been found.Gets a child statement by name and type.Returns role of given name or null if the role has not been found.getRoles()Gets all roles in this database.Returns user of given name or null if the user has not been found.getUsers()Getter forusers.Methods inherited from class org.pgcodekeeper.core.schema.AbstractDatabase
addAnalysisLauncher, addLib, addReference, addSchema, appendAlterSQL, clearAnalysisLaunchers, compare, computeHash, containsSchema, copyLaunchers, getAnalysisLaunchers, getCreationSQL, getDatabase, getDefaultSchema, getDropSQL, getObjReferences, getObjReferences, getOverrides, getSchema, getSchemas, getStatement, getStatementType, getVersion, listPgObjects, setDefaultSchema, setVersion, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, appendOwnerSQL, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getDeps, getDescendants, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, isSubElement, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
Constructor Details
-
MsDatabase
public MsDatabase()
-
-
Method Details
-
getChild
Description copied from interface:IStatementContainerGets a child statement by name and type.- Parameters:
name- the name of the child to findtype- the type of the child to find- Returns:
- the child statement, or null if not found
-
addChild
Description copied from interface:IStatementContainerAdds a child statement to this container.- Parameters:
st- the child statement to add
-
getAssembly
Returns assembly of given name or null if the assembly has not been found.- Parameters:
name- assembly name- Returns:
- found assembly or null
-
getRole
Returns role of given name or null if the role has not been found.- Parameters:
name- role name- Returns:
- found role or null
-
getUser
Returns user of given name or null if the user has not been found.- Parameters:
name- user name- Returns:
- found user or null
-
getAssemblies
Gets all assemblies in this database.- Returns:
- unmodifiable collection of assemblies
-
getRoles
Gets all roles in this database.- Returns:
- unmodifiable collection of roles
-
getUsers
Getter forusers. The list cannot be modified.- Returns:
users
-
addAssembly
Adds an assembly to this database.- Parameters:
assembly- the assembly to add
-
addRole
Adds a role to this database.- Parameters:
role- the role to add
-
addUser
Adds a user to this database.- Parameters:
user- the user to add
-
compareChildren
Description copied from class:PgStatementDeep part ofPgStatement.equals(Object). Compares all object's child PgStatements for equality.- Overrides:
compareChildrenin classAbstractDatabase
-
computeChildrenHash
- Overrides:
computeChildrenHashin classAbstractDatabase
-
getDbType
- Overrides:
getDbTypein classPgStatement
-