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

Function txMPush

db_test.go:707–722  ·  view source on GitHub ↗
(t *testing.T, db *DB, bucket string, key []byte, vals [][]byte, isLeft bool, expectErr error, finalExpectErr error)

Source from the content-addressed store, hash-verified

705}
706
707func txMPush(t *testing.T, db *DB, bucket string, key []byte, vals [][]byte, isLeft bool, expectErr error, finalExpectErr error) {
708 err := db.Update(func(tx *Tx) error {
709 var err error
710
711 if isLeft {
712 err = tx.LPush(bucket, key, vals...)
713 } else {
714 err = tx.RPush(bucket, key, vals...)
715 }
716
717 AssertErr(t, err, expectErr)
718
719 return nil
720 })
721 AssertErr(t, err, finalExpectErr)
722}
723
724func txPushRaw(t *testing.T, db *DB, bucket string, key, val []byte, isLeft bool, expectErr error, finalExpectErr error) {
725 err := db.Update(func(tx *Tx) error {

Callers 1

TestTx_MPushFunction · 0.85

Calls 4

UpdateMethod · 0.80
AssertErrFunction · 0.70
LPushMethod · 0.45
RPushMethod · 0.45

Tested by

no test coverage detected