Class Delimiter

java.lang.Object
migratedb.v1.core.api.internal.sqlscript.Delimiter

public class Delimiter extends Object
Represents a sql statement delimiter.
  • Field Details

    • SEMICOLON

      public static final Delimiter SEMICOLON
    • GO

      public static final Delimiter GO
  • Constructor Details

    • Delimiter

      public Delimiter(String delimiter, boolean aloneOnLine)
      Creates a new delimiter.
      Parameters:
      delimiter - The actual delimiter string.
      aloneOnLine - Whether the delimiter sits alone on a new line or not.
  • Method Details

    • getDelimiter

      public String getDelimiter()
      Returns:
      The actual delimiter string.
    • shouldBeAloneOnLine

      public boolean shouldBeAloneOnLine()
      Returns:
      Whether the delimiter sits alone on a new line or not.
    • getEscape

      public @Nullable String getEscape()
      Returns:
      The escape string for the delimiter, if any.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object