qlcache

package
v0.0.0-...-eef8a56 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: EPL-1.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToFloat32

func ByteToFloat32(bytes []byte) float32

func ByteToFloat64

func ByteToFloat64(bytes []byte) float64

func ByteToInt64

func ByteToInt64(b []byte) int64

func Float32ToByte

func Float32ToByte(float float32) []byte

func Float64ToByte

func Float64ToByte(float float64) []byte

func Int64ToByte

func Int64ToByte(v int64) []byte

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

func (*Cache) Add

func (c *Cache) Add(key interface{}, val interface{})

func (*Cache) Del

func (c *Cache) Del(key interface{})

func (*Cache) Get

func (c *Cache) Get(key interface{}) (interface{}, error)

type DB

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

func OpenFsDB

func OpenFsDB(path, name string) (*DB, error)

创建库

func (*DB) DelFsDB

func (d *DB) DelFsDB() error

删除库

func (*DB) DelTable

func (d *DB) DelTable(name string) error

表删除

func (*DB) OpenTable

func (d *DB) OpenTable(name string) *DBT

表创建

type DBT

type DBT struct {
	// contains filtered or unexported fields
}

func (*DBT) DelField

func (d *DBT) DelField(stat, key string)

删除字段

func (*DBT) ExField

func (d *DBT) ExField(stat, key string) bool

判断字段存在

func (*DBT) GetBool

func (d *DBT) GetBool(stat, key string) (bool, error)

取逻辑

func (*DBT) GetByt

func (d *DBT) GetByt(stat, key string) ([]byte, error)

取字节集

func (*DBT) GetFloat32

func (d *DBT) GetFloat32(stat, key string) (float32, error)

取单精度

func (*DBT) GetFloat64

func (d *DBT) GetFloat64(stat, key string) (float64, error)

取双精度

func (*DBT) GetInt

func (d *DBT) GetInt(stat, key string) (int64, error)

取整数

func (*DBT) GetObj

func (d *DBT) GetObj(stat, key string, val interface{}) error

取结构体

func (*DBT) GetStr

func (d *DBT) GetStr(stat, key string) (string, error)

取文本

func (*DBT) GetTime

func (d *DBT) GetTime(stat, key string) (time.Time, error)

取日期

func (*DBT) MustGetStr

func (d *DBT) MustGetStr(stat, key string) string

func (*DBT) MustSetStr

func (d *DBT) MustSetStr(stat, key, val string) *DBT

func (*DBT) SetBool

func (d *DBT) SetBool(stat, key string, val bool) error

置逻辑

func (*DBT) SetByt

func (d *DBT) SetByt(stat, key string, val []byte) error

置字节集

func (*DBT) SetFloat32

func (d *DBT) SetFloat32(stat, key string, val float32) error

置单精度

func (*DBT) SetFloat64

func (d *DBT) SetFloat64(stat, key string, val float64) error

置双精度

func (*DBT) SetInt

func (d *DBT) SetInt(stat, key string, val int64) error

置整数

func (*DBT) SetObj

func (d *DBT) SetObj(stat, key string, val interface{}) error

置结构体

func (*DBT) SetStr

func (d *DBT) SetStr(stat, key, val string) error

置文本

func (*DBT) SetTime

func (d *DBT) SetTime(stat, key string, val time.Time) error

置日期

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(path, name, qname string, sort bool) (*Queue, error)

创建队列

func OpenQueue

func OpenQueue(path, name, qname string, sort bool) (*Queue, error)

打开队列 sort 真为倒排

func (*Queue) CheckSelf

func (q *Queue) CheckSelf(参标识 int64)

自建测

func (*Queue) Count

func (q *Queue) Count() int64

func (*Queue) DelEnd

func (q *Queue) DelEnd() error

删除尾部

func (*Queue) DelEndNolock

func (q *Queue) DelEndNolock() error

删除尾部

func (*Queue) DelFlog

func (q *Queue) DelFlog(flog int64) error

删除指定标识的数据

func (*Queue) DelHead

func (q *Queue) DelHead() error

删除首部

func (*Queue) DelHeadNolock

func (q *Queue) DelHeadNolock() error

删除首部

func (*Queue) FlogExist

func (q *Queue) FlogExist(flog int64) bool

标识存在

func (*Queue) FlogRead

func (q *Queue) FlogRead(flog int64) string

标识 根据标识读取记录

func (*Queue) FlogWriter

func (q *Queue) FlogWriter(flog int64, str string) error

标识写 根据标识读取记录

func (*Queue) GetFlog

func (q *Queue) GetFlog() int64

标识取

func (*Queue) InsertAfter

func (q *Queue) InsertAfter(flog int64, content string) (int64, error)

在当前标识后插入数据,返回新标识,

func (*Queue) InsertBefore

func (q *Queue) InsertBefore(flog int64, content string) (int64, error)

在当前标识前插入数据,返回新标识,

func (*Queue) Next

func (q *Queue) Next() bool

下一条

func (*Queue) Prev

func (q *Queue) Prev() bool

上一条

func (*Queue) Read

func (q *Queue) Read() (string, int64, error)

队列读 读当前位置数据,默认首数据

func (*Queue) ToEnd

func (q *Queue) ToEnd() (int64, string, error)

到尾部

func (*Queue) Tohead

func (q *Queue) Tohead() (int64, error)

到首部 取出首记录,并读写位置设置为首记录 返回标识

func (*Queue) Write

func (q *Queue) Write(content string) (int64, error)

队列写 向队列内写入数据,比读取要慢

Jump to

Keyboard shortcuts

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