Package org.pgcodekeeper.core.schema.ms
Class MsAssembly
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.ms.MsAssembly
- All Implemented Interfaces:
IHashable,IStatement
Represents a Microsoft SQL assembly.
Assemblies allow running .NET code within SQL Server.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a binary to this assembly.appendAlterSQL(PgStatement newCondition, SQLScript script) Fill script with object changes and return change typebooleancompare(PgStatement obj) This method does not account for nested child PgStatements.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.voidgetCreationSQL(SQLScript script) Generates the SQL statements needed to create this database object.Gets the database that contains this statement.voidgetDropSQL(SQLScript script, boolean optionExists) Generates DROP SQL for this statement.getPreview(ISettings settings) Returns assembly definition without full binaries for preview purposes.Gets the type of this database object.voidsetPermission(String permission) voidsetVisible(boolean isVisible) Copies all object properties into a new object and leaves all its children empty.Methods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, appendOwnerSQL, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, compareChildren, 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, toString
-
Constructor Details
-
MsAssembly
-
-
Method Details
-
getStatementType
Description copied from interface:IStatementGets the type of this database object.- Returns:
- the database object type
-
getDatabase
Description copied from interface:IStatementGets the database that contains this statement.- Returns:
- the containing database
-
getCreationSQL
Description copied from class:PgStatementGenerates the SQL statements needed to create this database object. This is an abstract method that must be implemented by subclasses to provide the specific CREATE SQL for each object type.- Specified by:
getCreationSQLin classPgStatement- Parameters:
script- the SQL script to append creation statements to
-
getPreview
Returns assembly definition without full binaries for preview purposes.- Parameters:
settings- the settings for SQL generation- Returns:
- the preview SQL string with truncated binaries
-
getDropSQL
Description copied from class:PgStatementGenerates DROP SQL for this statement.- Overrides:
getDropSQLin classPgStatement- Parameters:
script- the SQL script to append the DROP statement tooptionExists- whether to include "IF EXISTS" in the DROP statement
-
appendAlterSQL
Description copied from class:PgStatementFill script with object changes and return change type- Specified by:
appendAlterSQLin classPgStatement- Parameters:
newCondition- new object statescript- script to collect changes- Returns:
- object change type
-
computeHash
Description copied from interface:IHashableComputes the hash of the implementing object using the provided hasher. The implementation should call appropriateputmethods on the hasher for all fields that should contribute to the hash value.- Parameters:
hasher- the hasher instance to use for hash computation
-
shallowCopy
Description copied from class:PgStatementCopies all object properties into a new object and leaves all its children empty.- Specified by:
shallowCopyin classPgStatement- Returns:
- shallow copy of a DB object.
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classPgStatement
-
setPermission
-
addBinary
Adds a binary to this assembly.- Parameters:
binary- the binary data or file path
-
setVisible
public void setVisible(boolean isVisible) -
getDbType
- Overrides:
getDbTypein classPgStatement
-