Documentation ¶
Index ¶
- Variables
- func InitStore(ctx *cli.Context)
- type Store
- func (s *Store) AddStoreInfo(tp int, tblName, keyName, indexName string)
- func (s *Store) DeleteObject(storeType int, x StoreObjector) error
- func (s *Store) Exit()
- func (s *Store) LoadArray(storeType int, storeIndex int64, pool *sync.Pool) ([]interface{}, error)
- func (s *Store) LoadObject(storeType int, keyValue interface{}, x StoreObjector) error
- func (s *Store) MigrateDbTable(tblName string, indexNames ...string) error
- func (s *Store) SaveFields(storeType int, x StoreObjector, fields map[string]interface{}) error
- func (s *Store) SaveObject(storeType int, x StoreObjector) error
- type StoreInfo
- type StoreObjector
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResult = errors.New("store return no result")
store find no result
Functions ¶
Types ¶
type Store ¶
Store combines memory, cache and database
func (*Store) AddStoreInfo ¶
func (*Store) DeleteObject ¶
func (s *Store) DeleteObject(storeType int, x StoreObjector) error
DeleteObject delete object cache and database with async call. it won't delete from memory
func (*Store) LoadObject ¶
func (s *Store) LoadObject(storeType int, keyValue interface{}, x StoreObjector) error
LoadObject loads object from cache at first, if didn't hit, it will search from database. it neither search nor save with memory.
func (*Store) MigrateDbTable ¶
func (*Store) SaveFields ¶
func (s *Store) SaveFields(storeType int, x StoreObjector, fields map[string]interface{}) error
SaveFields save fields to cache and database with async call. it won't save to memory
func (*Store) SaveObject ¶
func (s *Store) SaveObject(storeType int, x StoreObjector) error
SaveObject save object cache and database with async call. it won't save to memory
type StoreObjector ¶
StoreObjector save and load with all structure
Click to show internal directories.
Click to hide internal directories.