Package org.pgcodekeeper.core.schema.ms
Class MsStatistics
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractStatistics
org.pgcodekeeper.core.schema.ms.MsStatistics
- All Implemented Interfaces:
IHashable,ISearchPath,IStatement
Represents Microsoft SQL table statistics.
Statistics are used by the query optimizer to create efficient query execution plans.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a column to this statistics object.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.Gets the schema that contains this object.voidgetCreationSQL(SQLScript script) Generates the SQL statements needed to create this database object.booleanChecks if this statement is a sub-element of another statement.voidAdds an option to this statistics object.voidMethods inherited from class org.pgcodekeeper.core.schema.AbstractStatistics
getStatementType, shallowCopyMethods 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, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
Constructor Details
-
MsStatistics
Creates a new Microsoft SQL statistics object.- Parameters:
name- the statistics name
-
-
Method Details
-
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
-
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
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classPgStatement
-
isSubElement
public boolean isSubElement()Description copied from class:PgStatementChecks if this statement is a sub-element of another statement.- Overrides:
isSubElementin classPgStatement- Returns:
- true if this is a sub-element
-
getDbType
- Overrides:
getDbTypein classPgStatement
-
getContainingSchema
Description copied from interface:ISearchPathGets the schema that contains this object.- Specified by:
getContainingSchemain interfaceISearchPath- Overrides:
getContainingSchemain classAbstractStatistics- Returns:
- the containing schema
-
setFilter
-
addCol
Adds a column to this statistics object.- Parameters:
col- the column name to add
-
putOption
Adds an option to this statistics object.- Parameters:
key- the option namevalue- the option value
-