mgolevel

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoLevelDriver

type GoLevelDriver struct {
	LevelDB   *leveldb.DB
	DbName    string // 数据库名称
	URI       string
	StorePath string
	Connected bool
}

func NewClient

func NewClient(uri string) *GoLevelDriver

func (*GoLevelDriver) Connect

func (s *GoLevelDriver) Connect() (err error)

func (*GoLevelDriver) Count

func (s *GoLevelDriver) Count(prefix string) (count int64, err error)

func (*GoLevelDriver) DeleteAll

func (s *GoLevelDriver) DeleteAll(ctx context.Context, pre string) error

func (*GoLevelDriver) DeleteOne

func (s *GoLevelDriver) DeleteOne(key string) error

func (*GoLevelDriver) FindAll

func (s *GoLevelDriver) FindAll(pre string, out interface{}) (err error)

func (*GoLevelDriver) FindAllSort

func (s *GoLevelDriver) FindAllSort(ctx context.Context, collection string, pre string, out interface{}) error

func (*GoLevelDriver) FindOne

func (s *GoLevelDriver) FindOne(key string, out interface{}) error

func (*GoLevelDriver) Insert

func (s *GoLevelDriver) Insert(key string, doc interface{}) (err error)

数据库,集合

func (*GoLevelDriver) UpdateOne

func (s *GoLevelDriver) UpdateOne(key string, doc interface{}) error

type GoLevelOptions

type GoLevelOptions struct {
	StorePath string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL