Class PgAbstractStatement

java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.pg.schema.PgAbstractStatement
All Implemented Interfaces:
IStatement, IHashable
Direct Known Subclasses:
PgAbstractFunction, PgAbstractStatementContainer, PgAbstractType, PgCast, PgCollation, PgColumn, PgConstraint, PgDatabase, PgDomain, PgEventTrigger, PgExtension, PgForeignDataWrapper, PgFtsConfiguration, PgFtsDictionary, PgFtsParser, PgFtsTemplate, PgIndex, PgOperator, PgPolicy, PgRule, PgSchema, PgSequence, PgServer, PgStatistics, PgTrigger, PgUserMapping

public abstract class PgAbstractStatement extends AbstractStatement
  • Method Details

    • 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
    • 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
    • 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
    • appendDefaultPrivileges

      public void appendDefaultPrivileges(IStatement statement, SQLScript script)
    • 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
    • addPrivilege

      public void addPrivilege(IPrivilege privilege)
      Description copied from class: AbstractStatement
      Adds a privilege to this statement.
      Overrides:
      addPrivilege in class AbstractStatement
      Parameters:
      privilege - the privilege to add