memory

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Value 数值对象,通过 ? 代替
	Value elemType = iota
	// Field 结构体字段对象
	Field
	// Operator 操作符
	Operator
)
View Source
const (
	Greater operatorType = iota
	EqualOrGreater
	Less
	EqualOrLess
	Equal
	NotEqual
	And
	Or
	Not
)
View Source
const (
	Hash keyType = iota
	HashRange
)
View Source
const (
	DefaultTickTime = time.Second
	MinTickTime     = time.Millisecond * 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(maxLength int, tick time.Duration) *Storage

func (*Storage) Create

func (s *Storage) Create(value interface{}, tableName string) error

func (*Storage) CreateTable

func (s *Storage) CreateTable(value interface{}, tableName string) error

func (*Storage) Delete

func (s *Storage) Delete(value interface{}, tableName string, hash interface{}, args ...interface{}) error

func (*Storage) Find

func (s *Storage) Find(value interface{}, tableName string, limit int64, expr string, args ...interface{}) error

Find 支持 > ; < ; >= ; <= ; <> ; = ; and ; or ; () ; not 本地存储需要新增,可以按照上述计算符添加

func (*Storage) First

func (s *Storage) First(value interface{}, tableName string, hash interface{}, args ...interface{}) error

func (*Storage) Save

func (s *Storage) Save(value interface{}, tableName string) error

Jump to

Keyboard shortcuts

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