func (db *GoLevelDB) Stats() map[string]string {
	return nil
}
Stats implements DB.
package tm_adapter
import (
	"github.com/syndtr/goleveldb/leveldb"
	"github.com/syndtr/goleveldb/leveldb/errors"
	"github.com/syndtr/goleveldb/leveldb/util"
	tmdb "github.com/tendermint/tm-db"
	"github.com/terra-project/mantle-sdk/db"
)
var (
	errBatchClosed = errors.New("batch has been written or closed")
	errKeyEmpty = errors.New("key cannot be empty")
	errValueNil = errors.New("value cannot be nil")
)
type GoLevelDB struct {
	db db.DB
}
var _ tmdb.DB = (*GoLevelDB)(nil)
func NewCosmosAdapter(db db.DB) *GoLevelDB {
	_, ok := db.DB().(*leveldb.DB)
	if !ok {
		panic("underlying db engine mismatch. expected leveldb.")
	}
	return &GoLevelDB{db: db}
}
func (db *GoLevelDB) Get(key []byte) ([]byte, error) {
	if len(key) == 0 {
		return nil, errKeyEmpty
	}
	res, err := db.db.Get(key)
	if err != nil {
		if err == errors.ErrNotFound {
			return nil, nil
		}
		return nil, err
	}
	return res, nil
}
func (db *GoLevelDB) Has(key []byte) (bool, error) {
	bytes, err := db.Get(key)
	if err != nil {
		return false, err
	}
	return bytes != nil, nil
}
func (db *GoLevelDB) Set(key []byte, value []byte) error {
	if len(key) == 0 {
		return errKeyEmpty
	}
	if value == nil {
		return errValueNil
	}
	if err := db.db.Set(key, value); err != nil {
		return err
	}
	return nil
}
func (db *GoLevelDB) SetSync(key []byte, value []byte) error {
	return db.db.Set(key, value)
}
func (db *GoLevelDB) Delete(key []byte) error {
	if len(key) == 0 {
		return errKeyEmpty
	}
	if err := db.db.Delete(key); err != nil {
		return err
	}
	return nil
}
func (db *GoLevelDB) DeleteSync(key []byte) error {
	return db.db.Delete(key)
}
func (db *GoLevelDB) Close() error {
	if err := db.db.Close(); err != nil {
		return err
	}
	return nil
}
func (db *GoLevelDB) Print() error {
	return nil
}