Documentation ¶
Overview ¶
Package qna provides an implementation of rt.Runtime. ( Its name derives from "questions and answers" - because its the thing that talks to the database. )
Index ¶
- type Options
- func (m Options) IsOption(opt meta.Options) (okay bool)
- func (m Options) Option(opt meta.Options) (ret rt.Value, err error)
- func (m Options) OptionByName(name string) (ret rt.Value, err error)
- func (m *Options) SetOption(opt meta.Options, v rt.Value) (err error)
- func (m *Options) SetOptionByName(name string, v rt.Value) (err error)
- type Runner
- func (run *Runner) ActivateDomain(domain string) (err error)
- func (run *Runner) Call(name string, aff affine.Affinity, keys []string, vals []rt.Value) (ret rt.Value, err error)
- func (run *Runner) DynamicData() *query.Cache
- func (run *Runner) GetField(target, rawField string) (ret rt.Value, err error)
- func (run *Runner) GetKindByName(rawName string) (ret *rt.Kind, err error)
- func (run *Runner) PluralOf(singular string) (ret string)
- func (run *Runner) PopScope()
- func (run *Runner) PushScope(top rt.Scope)
- func (run *Runner) Random(inclusiveMin, exclusiveMax int) int
- func (run *Runner) ReciprocalsOf(b, rel string) (ret rt.Value, err error)
- func (run *Runner) RelateTo(a, b, rel string) (err error)
- func (run *Runner) RelativesOf(a, rel string) (ret rt.Value, err error)
- func (run *Runner) SetField(target, rawField string, val rt.Value) (err error)
- func (run *Runner) SetNotifier(n rt.Notifier) (prev rt.Notifier)
- func (run *Runner) SingularOf(plural string) (ret string)
- type UserValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
uses its own cache to preserve values across domain changes
func NewOptions ¶
func NewOptions() Options
func (Options) OptionByName ¶
return an existing option.
type Runner ¶
type Runner struct { writer.Sink // target for game output // contains filtered or unexported fields }
an implementation of rt.Runtime
func NewRuntime ¶
func (*Runner) ActivateDomain ¶
func (*Runner) Call ¶
func (run *Runner) Call(name string, aff affine.Affinity, keys []string, vals []rt.Value) (ret rt.Value, err error)
note: this is mirrored/mimicked in package testpat note: in order to generate appropriate defaults ( ex. a record of the right type ) can return both a both meaningful value *and* an error
func (*Runner) DynamicData ¶ added in v0.24.7
exposed for save-load fix? look at moving this into the query layer
func (*Runner) GetKindByName ¶
func (*Runner) PopScope ¶
func (run *Runner) PopScope()
remove most recently pushed set of variables. ( implements rt.Runtime )
func (*Runner) PushScope ¶
add the passed set of variables to the pool of current variables ( implements rt.Runtime )
func (*Runner) ReciprocalsOf ¶
func (*Runner) RelativesOf ¶
func (*Runner) SingularOf ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package qdb asks specific questions of the play.db for the package qna runtime.
|
Package qdb asks specific questions of the play.db for the package qna runtime. |
Package decode unpacks stored programs and values from byte slices
|
Package decode unpacks stored programs and values from byte slices |
a non-sql data format for use by the qna runtime
|
a non-sql data format for use by the qna runtime |