Class MsAbstractStatement

java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
All Implemented Interfaces:
IStatement, IHashable
Direct Known Subclasses:
MsAbstractCommonFunction, MsAbstractStatementContainer, MsAssembly, MsColumn, MsConstraint, MsDatabase, MsIndex, MsRole, MsSchema, MsSequence, MsStatistics, MsTrigger, MsType, MsUser

public abstract class MsAbstractStatement extends AbstractStatement
  • Method Details

    • formatSql

      public String formatSql(String sql, int offset, int length, IFormatConfiguration formatConfiguration)
      Description copied from interface: IStatement
      Formats string
      Parameters:
      sql - The source SQL text to format
      offset - Starting offset in the source text
      length - Length of text to format
      formatConfiguration - Formatting configuration options
      Returns:
      formatted string
    • getQuoter

      public UnaryOperator<String> getQuoter()
      Returns:
      a function that quotes name
    • appendOwnerSQL

      public void appendOwnerSQL(SQLScript script)
      Description copied from interface: IStatement
      Appends ALTER OWNER SQL statement to the script for this database object.
      Parameters:
      script - the SQL script to append the owner statement to
    • isOwned

      public boolean isOwned()
      Description copied from interface: IStatement
      Checks if this statement type supports ownership.
      Returns:
      true if the statement can have an owner
    • getRenameCommand

      public String getRenameCommand(String newName)
      Description copied from interface: IStatement
      Returns sql command to rename the given object.
      Parameters:
      newName - the new name for given object
      Returns:
      sql command to rename the given object
    • getSeparator

      public String getSeparator()
      Specified by:
      getSeparator in interface IStatement
      Overrides:
      getSeparator in class AbstractStatement