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

Function txPush

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

Source from the content-addressed store, hash-verified

688}
689
690func txPush(t *testing.T, db *DB, bucket string, key, val []byte, isLeft bool, expectErr error, finalExpectErr error) {
691 err := db.Update(func(tx *Tx) error {
692 var err error
693
694 if isLeft {
695 err = tx.LPush(bucket, key, val)
696 } else {
697 err = tx.RPush(bucket, key, val)
698 }
699
700 AssertErr(t, err, expectErr)
701
702 return nil
703 })
704 AssertErr(t, err, finalExpectErr)
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 {

Callers 15

setupBucketFunction · 0.85
TestDB_ReopenWithDeleteFunction · 0.85
TestDB_WatchFunction · 0.85
TestDB_WatchTTLFunction · 0.85
TestDB_WatchDeleteBucketFunction · 0.85
pushDataByStartEndFunction · 0.85
pushDataByValuesFunction · 0.85
TestTx_LPushFunction · 0.85

Calls 4

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

Tested by

no test coverage detected