Package dev.frostlake.metastore.model
Class Sequence
java.lang.Object
dev.frostlake.metastore.model.Sequence
Represents a database SEQUENCE object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcurrVal()Get the current value of the sequence (CURRVAL) Returns the last value generated by NEXTVALWhen this sequence was created, as SHOW SEQUENCES reports it.longGet the current internal value (for cloning purposes) This does not check if NEXTVAL was calledlonggetName()getOwner()longbooleanisOrder()longnextVal()Get the next value in the sequence (NEXTVAL)longThe value the NEXT call tonextVal()will return, without consuming it — the catalog's NEXT_VALUE.voidsetComment(String comment) voidsetCurrentValue(long value) Set the current value (used by ALTER SEQUENCE)voidsetIncrement(long increment) Change the step applied by future NEXTVAL calls (ALTER SEQUENCE … SET INCREMENT).voidtoString()
-
Constructor Details
-
Sequence
-
-
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 tonextVal()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
-
getOwner
-
setOwner
-
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
When this sequence was created, as SHOW SEQUENCES reports it. -
isOrder
public boolean isOrder() -
getComment
-
setComment
-
getObjectType
-
toString
-