Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLSequence ¶
type MySQLSequence struct {
// contains filtered or unexported fields
}
MySQLSequence struct of sequence number with specific sequence name
func NewMySQLSequence ¶
func NewMySQLSequence(slice *backend.Slice, seqName, pkName string) *MySQLSequence
NewMySQLSequence init sequence item TODO: 直接注入slice需要考虑关闭的问题, 目前是在Namespace中管理Slice的关闭的. 如果单独使用MySQLSequence, 需要注意.
func (*MySQLSequence) GetPKName ¶
func (s *MySQLSequence) GetPKName() string
GetPKName return sequence column
func (*MySQLSequence) NextSeq ¶
func (s *MySQLSequence) NextSeq() (int64, error)
NextSeq get next sequence number
type SequenceManager ¶
type SequenceManager struct {
// contains filtered or unexported fields
}
func NewSequenceManager ¶
func NewSequenceManager() *SequenceManager
func (*SequenceManager) GetSequence ¶
func (s *SequenceManager) GetSequence(db, table string) (Sequence, bool)
func (*SequenceManager) SetSequence ¶
func (s *SequenceManager) SetSequence(db, table string, seq Sequence) error
Click to show internal directories.
Click to hide internal directories.