Interface SourceStatement

All Superinterfaces:
ISearchPath, IStatement
All Known Implementing Classes:
AbstractMsFunction, MsFunction, MsProcedure, MsTrigger, MsView

public interface SourceStatement extends ISearchPath
Interface for database statements that are represented by their full source code. The source is separated into two parts by the CREATE/ALTER statement keywords, allowing for flexible SQL generation while preserving the original formatting.
  • Method Details

    • getFirstPart

      String getFirstPart()
      Gets the first part of the source statement (before CREATE/ALTER).
      Returns:
      the first part of the source
    • setFirstPart

      void setFirstPart(String firstPart)
      Sets the first part of the source statement.
      Parameters:
      firstPart - the first part to set
    • getSecondPart

      String getSecondPart()
      Gets the second part of the source statement (after the object name).
      Returns:
      the second part of the source
    • setSecondPart

      void setSecondPart(String secondPart)
      Sets the second part of the source statement.
      Parameters:
      secondPart - the second part to set
    • appendSourceStatement

      default void appendSourceStatement(boolean isCreate, StringBuilder sb)
      Assembles entire statement from source parts
      Parameters:
      isCreate - do CREATE or ALTER
    • appendName

      default StringBuilder appendName(StringBuilder sb)
      Appends the only normalized statement part: its name and location, always qualifies and quotes.