Documentation ¶
Index ¶
- type Context
- func (c Context) Copy() *Context
- func (c *Context) Delete(key string) *Context
- func (c *Context) Get(key string) interface{}
- func (c *Context) GetBool(key string) bool
- func (c *Context) GetDate(key string) dates.Date
- func (c *Context) GetDateTime(key string) dates.DateTime
- func (c *Context) GetFloat(key string) float64
- func (c *Context) GetFloatSlice(key string) []float64
- func (c *Context) GetInteger(key string) int64
- func (c *Context) GetIntegerSlice(key string) []int64
- func (c *Context) GetString(key string) string
- func (c *Context) GetStringSlice(key string) []string
- func (c *Context) HasKey(key string) bool
- func (c Context) IsEmpty() bool
- func (c *Context) MarshalJSON() ([]byte, error)
- func (c *Context) Pop(key string) interface{}
- func (c *Context) Scan(src interface{}) error
- func (c Context) String() string
- func (c Context) ToMap() map[string]interface{}
- func (c *Context) UnmarshalJSON(data []byte) error
- func (c *Context) UnmarshalXMLAttr(attr xml.Attr) error
- func (c Context) Value() (driver.Value, error)
- func (c Context) WithKey(key string, value interface{}) *Context
- type RecordSet
- type Selection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
A Context is a map of objects that is passed along from function to function during a transaction. A Context is read only.
func (*Context) Delete ¶ added in v0.0.6
Delete removes the content pointed by the given key from the context.
func (*Context) Get ¶
Get returns the value of the given key in this Context It returns nil if the key is not in this context
func (*Context) GetBool ¶
GetBool returns the value of the given key in this Context as a bool. It returns false if there is no such key in the context. It panics if the value cannot be casted to bool
func (*Context) GetDate ¶
GetDate returns the value of the given key in this Context as a Date. It returns an null Date if there is no such key in the context. It panics if the value is not of type Date
func (*Context) GetDateTime ¶
GetDateTime returns the value of the given key in this Context as a DateTime. It returns an null DateTime if there is no such key in the context. It panics if the value is not of type DateTime
func (*Context) GetFloat ¶
GetFloat returns the value of the given key in this Context as a float64. It returns 0 if there is no such key in the context. It panics if the value cannot be casted to float64
func (*Context) GetFloatSlice ¶
GetFloatSlice returns the value of the given key in this Context as a []float64. It returns an empty slice if there is no such key in the context. It panics if the value is not a slice or if any value cannot be casted to float64
func (*Context) GetInteger ¶
GetInteger returns the value of the given key in this Context as an int64. It returns 0 if there is no such key in the context. It panics if the value cannot be casted to int64
func (*Context) GetIntegerSlice ¶
GetIntegerSlice returns the value of the given key in this Context as a []int64. It returns an empty slice if there is no such key in the context. It panics if the value is not a slice or if any value cannot be casted to int64
func (*Context) GetString ¶
GetString returns the value of the given key in this Context as a string. It returns an empty string if there is no such key in the context. It panics if the value is not of type string
func (*Context) GetStringSlice ¶
GetStringSlice returns the value of the given key in this Context as a []string. It returns an empty slice if there is no such key in the context. It panics if the value is not a slice or if any value is not a string
func (*Context) MarshalJSON ¶
MarshalJSON method for Context
func (*Context) Pop ¶ added in v0.0.6
Pop removes the content pointed by the given key from the context. and returns the value
func (*Context) UnmarshalJSON ¶
UnmarshalJSON method for Context
func (*Context) UnmarshalXMLAttr ¶
UnmarshalXMLAttr is the XML unmarshalling method of Context.
type RecordSet ¶
type RecordSet interface { // ModelName returns the name of the model of this RecordSet ModelName() string // Ids returns the ids in this set of Records Ids() []int64 // Len returns the number of records in this RecordSet Len() int // IsEmpty returns true if this RecordSet has no records IsEmpty() bool // IsNotEmpty returns true if this RecordSet has at least one record IsNotEmpty() bool // Call executes the given method (as string) with the given arguments Call(string, ...interface{}) interface{} }
RecordSet identifies a type that holds a set of records of a given model. Dummy interface in types module.