Documentation ¶
Index ¶
- type GoLevelDriver
- func (s *GoLevelDriver) Connect() (err error)
- func (s *GoLevelDriver) Count(prefix string) (count int64, err error)
- func (s *GoLevelDriver) DeleteAll(ctx context.Context, pre string) error
- func (s *GoLevelDriver) DeleteOne(key string) error
- func (s *GoLevelDriver) FindAll(pre string, out interface{}) (err error)
- func (s *GoLevelDriver) FindAllSort(ctx context.Context, collection string, pre string, out interface{}) error
- func (s *GoLevelDriver) FindOne(key string, out interface{}) error
- func (s *GoLevelDriver) Insert(key string, doc interface{}) (err error)
- func (s *GoLevelDriver) UpdateOne(key string, doc interface{}) error
- type GoLevelOptions
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) 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 (*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
}
Click to show internal directories.
Click to hide internal directories.