Documentation ¶
Index ¶
- Variables
- type DB
- type Store
- func (p *Store) Create(data interface{}) ([]string, error)
- func (p *Store) Delete(data interface{}, ids ...string) error
- func (p *Store) Read(data interface{}, ftr []string, ids ...string) ([]interface{}, error)
- func (p *Store) Select(x interface{}, ftr []string) ([]interface{}, error)
- func (p *Store) Take(table interface{}, filter []string, seek string, limit int) ([]interface{}, error)
- func (p *Store) Tidy()
- func (p *Store) Update(data interface{}, ids ...string) error
- func (p *Store) WithDB(f func(*badger.DB) error) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidParameter ... ErrInvalidParameter = errors.New("invalid parameter") // ErrTypeConversion ... ErrTypeConversion = errors.New("type conversion") // ErrNoRecord ... ErrNoRecord = errors.New("record does not exist") // ErrReservedWord ... ErrReservedWord = errors.New("reserved identifier used") // ErrNoPrimaryID ... ErrNoPrimaryID = errors.New("primary ID field does not exist") // ErrMalformedKey ... ErrMalformedKey = errors.New("malformed key or zero key fields") )
Functions ¶
This section is empty.
Types ¶
type Store ¶ added in v0.2.0
type Store struct {
// contains filtered or unexported fields
}
Store ...
func (*Store) Create ¶ added in v0.2.0
Create accepts struct or slice of struct pointers Returns slice of record IDs saved
func (*Store) Delete ¶ added in v0.2.0
Delete removes one or many records with given IDs Accepts a struct and variadic IDs
func (*Store) Read ¶ added in v0.2.0
Read retrieves one or many records with given IDs Returns slice of interfaces
func (*Store) Select ¶ added in v0.2.0
Select retrieves records ANDing non zero values Returns slice of interfaces
func (*Store) Take ¶ added in v0.2.0
func (p *Store) Take(table interface{}, filter []string, seek string, limit int) ([]interface{}, error)
Take ...
Click to show internal directories.
Click to hide internal directories.