MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Export

Method Export

pkg/sql/sessiondata/sequence_state.go:95–103  ·  view source on GitHub ↗

Export returns a copy of the SequenceState's state - the latestValues and lastSequenceIncremented. lastSequenceIncremented is only defined if latestValues is non-empty.

()

Source from the content-addressed store, hash-verified

93// lastSequenceIncremented.
94// lastSequenceIncremented is only defined if latestValues is non-empty.
95func (ss *SequenceState) Export() (map[uint32]int64, uint32) {
96 ss.mu.Lock()
97 defer ss.mu.Unlock()
98 res := make(map[uint32]int64, len(ss.mu.latestValues))
99 for k, v := range ss.mu.latestValues {
100 res[k] = v
101 }
102 return res, ss.mu.lastSequenceIncremented
103}

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected