Documentation
¶
Overview ¶
Package wdb contains the realm databases. For server content, in-memory databases are utilized to maximize performance. For character-generated data, a SQL backend is used.
Index ¶
- func GetField(fieldName string, value reflect.Value, locale i18n.Locale) (text string)
- func GetID(value reflect.Value) string
- func GetName(value reflect.Value, locale i18n.Locale) (text string)
- func SetEntry(value reflect.Value, entry uint32)
- func SortNamedTemplates(locale i18n.Locale, value reflect.Value)
- type Bucket
- type BucketKey
- type BucketKeyType
- type Cache
- func (c *Cache) Bucket(typeOf reflect.Type) (*Bucket, error)
- func (c *Cache) BucketPath(typeOf reflect.Type) string
- func (c *Cache) Clear(typeOf reflect.Type)
- func (c *Cache) IndexPath(typeOf reflect.Type) string
- func (c *Cache) Lookup(indexType BucketKeyType, key, value any)
- func (c *Cache) QueryField(locale i18n.Locale, field string, regex string, limit int64, sliceptr any) error
- func (c *Cache) QueryNames(locale i18n.Locale, regex string, limit int64, sliceptr any) error
- func (c *Cache) Range(fn interface{})
- func (c *Cache) Size() uint64
- func (c *Cache) Store(value reflect.Value)
- type Core
- func (c *Core) AsyncTx(fn func(*Tx))
- func (c *Core) GetGameObjectTemplate(id string) (*models.GameObjectTemplate, error)
- func (c *Core) GetGameObjectTemplateByEntry(entry uint32) (*models.GameObjectTemplate, error)
- func (c *Core) GetItemTemplate(id string) (*models.ItemTemplate, error)
- func (c *Core) GetItemTemplateByEntry(entry uint32) (*models.ItemTemplate, error)
- func (c *Core) InitCache(dir string) error
- func (c *Core) Println(args ...any)
- func (db *Core) Query() *Query
- type Query
- type QueryCondition
- type QueryFlags
- type Store
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BucketKey ¶
type BucketKey struct { Type BucketKeyType Data []byte }
type BucketKeyType ¶
type BucketKeyType uint8
const ( BucketKeyStringID BucketKeyType = iota BucketKeyUint32ID BucketKeySequence BucketKeyEntry BucketIndexSequence )
type Cache ¶
func (*Cache) Lookup ¶
func (c *Cache) Lookup(indexType BucketKeyType, key, value any)
func (*Cache) QueryField ¶
func (*Cache) QueryNames ¶
type Core ¶
func (*Core) GetGameObjectTemplate ¶
func (c *Core) GetGameObjectTemplate(id string) (*models.GameObjectTemplate, error)
func (*Core) GetGameObjectTemplateByEntry ¶
func (c *Core) GetGameObjectTemplateByEntry(entry uint32) (*models.GameObjectTemplate, error)
func (*Core) GetItemTemplate ¶
func (c *Core) GetItemTemplate(id string) (*models.ItemTemplate, error)
func (*Core) GetItemTemplateByEntry ¶
func (c *Core) GetItemTemplateByEntry(entry uint32) (*models.ItemTemplate, error)
type Query ¶
type Query struct { Core *Core Conditions []*QueryCondition OrderByField int ResultLimit int Asc bool }
type QueryCondition ¶
type QueryCondition struct { Field string Flags QueryFlags Param1 reflect.Value Likeness float64 }
type QueryFlags ¶
type QueryFlags uint8
const ( QueryIs QueryFlags = 1 << iota QueryNot QueryExact QueryGt QueryLt QueryEq )
Click to show internal directories.
Click to hide internal directories.