engine

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticEngine

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

func (*ElasticEngine) Digest

func (self *ElasticEngine) Digest(skma *schema.Digest) (*respond.Result, error)

func (*ElasticEngine) First

func (self *ElasticEngine) First(skma *schema.Input, record *respond.Record) error

func (*ElasticEngine) Search

func (self *ElasticEngine) Search(skma *schema.Table) (*respond.Result, error)

func (*ElasticEngine) Select

func (self *ElasticEngine) Select(schema *schema.Input, record []*respond.Record) error

func (*ElasticEngine) Store

func (self *ElasticEngine) Store(skma *schema.Input, record *respond.Record) error

func (*ElasticEngine) Update

func (self *ElasticEngine) Update(skma *schema.Input, data map[string]any) error

func (*ElasticEngine) Upsert

func (self *ElasticEngine) Upsert(skma *schema.Input, records []*respond.Record) error

func (*ElasticEngine) Using

func (self *ElasticEngine) Using(handle ICallable) IEngine

type ICallable

type ICallable interface {
	BeforeUpsert(*schema.Input, *respond.Record) error
	HandleUpsert(*schema.Input, *respond.Record) error
	SearchResult(*schema.Table, *respond.Result) error
	DigestResult(*schema.Digest, *respond.Result) error
}

type IEngine

type IEngine interface {
	Using(ICallable) IEngine
	First(*schema.Input, *respond.Record) error
	Store(*schema.Input, *respond.Record) error
	Update(*schema.Input, map[string]any) error
	Upsert(*schema.Input, []*respond.Record) error
	Select(*schema.Input, []*respond.Record) error
	Search(*schema.Table) (*respond.Result, error)
	Digest(*schema.Digest) (*respond.Result, error)
}

func NewEngine

func NewEngine(name string, client any) IEngine

type MemoryEngine

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

MemoryEngine 内存存储引擎,使用 map 存储数据

func NewMemoryEngine

func NewMemoryEngine() *MemoryEngine

NewMemoryEngine 创建新的内存引擎实例

func (*MemoryEngine) Digest

func (self *MemoryEngine) Digest(skma *schema.Digest) (*respond.Result, error)

func (*MemoryEngine) First

func (self *MemoryEngine) First(skma *schema.Input, record *respond.Record) error

func (*MemoryEngine) Search

func (self *MemoryEngine) Search(skma *schema.Table) (*respond.Result, error)

func (*MemoryEngine) Select

func (self *MemoryEngine) Select(skma *schema.Input, records []*respond.Record) error

func (*MemoryEngine) Store

func (self *MemoryEngine) Store(skma *schema.Input, record *respond.Record) error

func (*MemoryEngine) Update

func (self *MemoryEngine) Update(skma *schema.Input, data map[string]any) error

func (*MemoryEngine) Upsert

func (self *MemoryEngine) Upsert(skma *schema.Input, records []*respond.Record) error

func (*MemoryEngine) Using

func (self *MemoryEngine) Using(handle ICallable) IEngine

type MongoEngine

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

func (*MongoEngine) Digest

func (self *MongoEngine) Digest(skma *schema.Digest) (*respond.Result, error)

func (*MongoEngine) First

func (self *MongoEngine) First(skma *schema.Input, record *respond.Record) error

func (*MongoEngine) Search

func (self *MongoEngine) Search(skma *schema.Table) (*respond.Result, error)

func (*MongoEngine) Select

func (self *MongoEngine) Select(skma *schema.Input, records []*respond.Record) error

func (*MongoEngine) Store

func (self *MongoEngine) Store(skma *schema.Input, record *respond.Record) error

func (*MongoEngine) Update

func (self *MongoEngine) Update(skma *schema.Input, data map[string]any) error

func (*MongoEngine) Upsert

func (self *MongoEngine) Upsert(skma *schema.Input, records []*respond.Record) error

func (*MongoEngine) Using

func (self *MongoEngine) Using(handle ICallable) IEngine

type MySQLEngine

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

func (*MySQLEngine) Digest

func (self *MySQLEngine) Digest(skma *schema.Digest) (*respond.Result, error)

func (*MySQLEngine) First

func (self *MySQLEngine) First(skma *schema.Input, record *respond.Record) error

func (*MySQLEngine) Search

func (self *MySQLEngine) Search(skma *schema.Table) (*respond.Result, error)

func (*MySQLEngine) Select

func (self *MySQLEngine) Select(skma *schema.Input, records []*respond.Record) error

func (*MySQLEngine) Store

func (self *MySQLEngine) Store(skma *schema.Input, record *respond.Record) error

func (*MySQLEngine) Update

func (self *MySQLEngine) Update(skma *schema.Input, data map[string]any) error

func (*MySQLEngine) Upsert

func (self *MySQLEngine) Upsert(skma *schema.Input, records []*respond.Record) error

func (*MySQLEngine) Using

func (self *MySQLEngine) Using(handle ICallable) IEngine

Jump to

Keyboard shortcuts

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