MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / getTxID

Method getTxID

tx.go:158–161  ·  view source on GitHub ↗

getTxID returns the tx id. Uses cached snowflake node to avoid recreating for every transaction.

()

Source from the content-addressed store, hash-verified

156// getTxID returns the tx id.
157// Uses cached snowflake node to avoid recreating for every transaction.
158func (tx *Tx) getTxID() uint64 {
159 node := tx.db.getSnowflakeNode()
160 return uint64(node.Generate().Int64())
161}
162
163// Commit commits the transaction, following these steps:
164//

Callers 1

newTxFunction · 0.80

Calls 1

getSnowflakeNodeMethod · 0.80

Tested by

no test coverage detected