Documentation ¶
Overview ¶
Package db genereated with github.com/microo8/mimir DO NOT MODIFY!
Index ¶
- Constants
- type DB
- type Iter
- type IterIndexPerson
- type IterPerson
- type Person
- type PersonCollection
- func (col *PersonCollection) Add(obj *Person) (int, error)
- func (col *PersonCollection) AgeEq(val int) *IterIndexPerson
- func (col *PersonCollection) AgeRange(start, limit *int) *IterIndexPerson
- func (col *PersonCollection) All() *IterPerson
- func (col *PersonCollection) Delete(id int) error
- func (col *PersonCollection) Get(id int) (*Person, error)
- func (col *PersonCollection) Update(id int, obj *Person) error
Constants ¶
const ( IntMin = 0x80 IntMax = 0xfd )
Constants for int encoding
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { Persons *PersonCollection // contains filtered or unexported fields }
DB handler to the db
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
Iter implemenst basic iterator functions
type IterIndexPerson ¶
type IterIndexPerson struct {
IterPerson
}
IterIndexPerson iterates trough an index for Person in db
func (*IterIndexPerson) Value ¶
func (it *IterIndexPerson) Value() (*Person, error)
Value returns the Person on witch is the iterator
type IterPerson ¶
type IterPerson struct { *Iter // contains filtered or unexported fields }
IterPerson iterates trough all Person in db
func (*IterPerson) Value ¶
func (it *IterPerson) Value() (*Person, error)
Value returns the Person on witch is the iterator
type PersonCollection ¶
type PersonCollection struct {
// contains filtered or unexported fields
}
PersonCollection represents the collection of Persons
func (*PersonCollection) Add ¶
func (col *PersonCollection) Add(obj *Person) (int, error)
Add inserts new Person to the db
func (*PersonCollection) AgeEq ¶
func (col *PersonCollection) AgeEq(val int) *IterIndexPerson
AgeEq iterates trough Person Age index with equal values
func (*PersonCollection) AgeRange ¶
func (col *PersonCollection) AgeRange(start, limit *int) *IterIndexPerson
AgeRange iterates trough Person Age index in the specified range
func (*PersonCollection) All ¶
func (col *PersonCollection) All() *IterPerson
All returns an iterator witch iterates trough all Persons
func (*PersonCollection) Delete ¶
func (col *PersonCollection) Delete(id int) error
Delete remoces Person from the db with specified id