Class Sequence

java.lang.Object
dev.frostlake.metastore.model.Sequence

public class Sequence extends Object
Represents a database SEQUENCE object
  • Constructor Details

    • Sequence

      public Sequence(String name, long startValue, long increment, boolean order, String comment)
  • Method Details

    • nextVal

      public long nextVal()
      Get the next value in the sequence (NEXTVAL)
    • currVal

      public long currVal()
      Get the current value of the sequence (CURRVAL) Returns the last value generated by NEXTVAL
    • getCurrentValueRaw

      public long getCurrentValueRaw()
      Get the current internal value (for cloning purposes) This does not check if NEXTVAL was called
    • peekNextValue

      public long peekNextValue()
      The value the NEXT call to nextVal() will return, without consuming it — the catalog's NEXT_VALUE. On a sequence nothing has drawn from yet this is its START value.
    • setCurrentValue

      public void setCurrentValue(long value)
      Set the current value (used by ALTER SEQUENCE)
    • getName

      public String getName()
    • getOwner

      public String getOwner()
    • setOwner

      public void setOwner(String owner)
    • getStartValue

      public long getStartValue()
    • getIncrement

      public long getIncrement()
    • setIncrement

      public void setIncrement(long increment)
      Change the step applied by future NEXTVAL calls (ALTER SEQUENCE … SET INCREMENT).
    • getCreatedTime

      public Instant getCreatedTime()
      When this sequence was created, as SHOW SEQUENCES reports it.
    • isOrder

      public boolean isOrder()
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • getObjectType

      public String getObjectType()
    • toString

      public String toString()
      Overrides:
      toString in class Object