LevelDB

package
v0.0.0-...-3e87f45 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

* @Author: NyanCatda * @Date: 2022-03-24 14:04:35 * @LastEditTime: 2022-03-24 15:09:05 * @LastEditors: NyanCatda * @Description: LevelDB封装 * @FilePath: \Momizi\Internal\Plugin\Tools\LevelDB\LevelDB.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Path string
	// contains filtered or unexported fields
}

func Open

func Open(Path string) *DB

*

  • @description: 打开数据库连接
  • @param {string} Path 数据库路径
  • @return {*DB} 数据库连接

func (DB) Close

func (DB DB) Close() error

*

  • @description: 关闭连接
  • @param {*}
  • @return {*}

func (DB) Delete

func (DB DB) Delete(Key string) error

*

  • @description: 删除值
  • @param {string} Key 键
  • @return {error} 错误信息

func (DB) Get

func (DB DB) Get(Key string) (string, error)

*

  • @description: 读取值
  • @param {string} Key 键
  • @return {string} 值
  • @return {error} 错误信息

func (DB) Key

func (DB DB) Key(Prefix, Suffix string) ([]string, error)

*

  • @description: 获取键列表
  • @param {Prefix} Prefix 前缀
  • @return {[]string} 键
  • @return {error} 错误信息

func (DB) Set

func (DB DB) Set(Key, Value string) error

*

  • @description: 写入值
  • @param {string} Key 键
  • @param {string} Value 值
  • @return {error} 错误信息

Jump to

Keyboard shortcuts

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