Documentation ¶
Index ¶
- Variables
- func NewUUID() string
- type Bolteo
- type Bucket
- func (b *Bucket) As(elementsType interface{}) *Query
- func (b *Bucket) Delete(key interface{}) error
- func (b *Bucket) Drop() error
- func (b *Bucket) Get(key interface{}, value interface{}) error
- func (b *Bucket) GetAll(objType interface{}) (result interface{}, ok bool)
- func (b *Bucket) InitBucket() error
- func (b *Bucket) NextID() int
- func (b *Bucket) Put(key, val interface{}) error
- func (b *Bucket) PutBulk(data map[interface{}]interface{}) error
- type Iterator
- type Query
- func (q *Query) Any() bool
- func (q *Query) Collect() interface{}
- func (q *Query) Count() int
- func (q *Query) First() interface{}
- func (q *Query) Last() interface{}
- func (q *Query) OrderBy(field string) *Query
- func (q *Query) Reverse() *Query
- func (q *Query) Skip(count int) *Query
- func (q *Query) Take(count int) *Query
- func (q *Query) Where(field string, fn filter, what interface{}) *Query
Constants ¶
This section is empty.
Variables ¶
View Source
var Fl = filters{ GetAll: func(first, second interface{}) bool { return true }, Equals: func(first, second interface{}) bool { return first == second }, StringEquals: func(first, second interface{}) bool { if !isString(first) || !isString(second) { return false } a, b := first.(string), second.(string) return strings.EqualFold(a, b) }, NotEquals: func(first, second interface{}) bool { return first != second }, GreaterThan: func(first, second interface{}) bool { if !isNumber(first) || !isNumber(second) { return false } if !isTypeEquals(first, second) { return false } return compareNumbers(first, second) }, LessThan: func(first, second interface{}) bool { if !isNumber(first) || !isNumber(second) { return false } if !isTypeEquals(first, second) { return false } return compareNumbers(second, first) }, StringHasPrefix: func(first, second interface{}) bool { if !isString(first) || isString(second) { return false } return strings.HasPrefix(first.(string), second.(string)) }, StringHasSuffix: func(first, second interface{}) bool { if !isString(first) || isString(second) { return false } return strings.HasSuffix(first.(string), second.(string)) }, TimeBefore: func(first, second interface{}) bool { a, ok := first.(time.Time) b, ak := second.(time.Time) if !ok || !ak { return false } return a.Before(b) }, TimeAfter: func(first, second interface{}) bool { a, ok := first.(time.Time) b, ak := second.(time.Time) if !ok || !ak { return false } return a.After(b) }, }
Functions ¶
Types ¶
type Bolteo ¶
type Bolteo struct {
// contains filtered or unexported fields
}
func (*Bolteo) DropBucket ¶
type Bucket ¶ added in v1.5.4
type Bucket struct {
// contains filtered or unexported fields
}
func (*Bucket) InitBucket ¶ added in v1.5.4
type Iterator ¶ added in v1.5.0
type Iterator interface { MoveNext() bool Current() interface{} Close() // TODO: ??? }
Click to show internal directories.
Click to hide internal directories.