Documentation
¶
Index ¶
- type DBSet
- func (set *DBSet) Add(entity interface{}) error
- func (set *DBSet) CreateTable() error
- func (set *DBSet) Delete(entity interface{}) error
- func (set *DBSet) Get(valueMap map[string]interface{}, entity interface{}) error
- func (set *DBSet) GetAsc(valueMap map[string]interface{}, orderBy string, entity interface{}) error
- func (set *DBSet) GetDesc(valueMap map[string]interface{}, orderBy string, entity interface{}) error
- func (set *DBSet) TableName() string
- func (set *DBSet) Type() reflect.Type
- func (set *DBSet) Update(entity interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBSet ¶
type DBSet struct {
// contains filtered or unexported fields
}
DBSet lets you add, get and delete entities of a given model
func (*DBSet) CreateTable ¶
CreateTable generates a database table from a given model
func (*DBSet) Get ¶
Get will fetch an entity from the database according to the valueMap. valueMap should contain the struct field as a string for the key and the value being queried; this is done as AND statements
func (*DBSet) GetDesc ¶
func (set *DBSet) GetDesc(valueMap map[string]interface{}, orderBy string, entity interface{}) error
GetDesc gets the first entity in descending order
Click to show internal directories.
Click to hide internal directories.