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

Function bigIntIncr

tx_btree.go:554–559  ·  view source on GitHub ↗
(a string, b string)

Source from the content-addressed store, hash-verified

552}
553
554func bigIntIncr(a string, b string) string {
555 bigIntA, _ := new(big.Int).SetString(a, 10)
556 bigIntB, _ := new(big.Int).SetString(b, 10)
557 bigIntA.Add(bigIntA, bigIntB)
558 return bigIntA.String()
559}
560
561func (tx *Tx) integerIncr(bucket string, key []byte, increment int64) error {
562 return tx.update(bucket, key, func(value []byte) ([]byte, error) {

Callers 1

integerIncrMethod · 0.85

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected