Documentation ¶
Overview ¶
Package dao
Index ¶
- func Register(name string, dao Dao)
- type Dao
- type DaoContainer
- type PeanutContainer
- func (this *PeanutContainer) AddResult(p *Result) error
- func (this *PeanutContainer) Close() error
- func (this *PeanutContainer) Debug(is_debug bool)
- func (this *PeanutContainer) DelResult(id interface{})
- func (this *PeanutContainer) GetResultById(id uint64) (*Result, error)
- func (this *PeanutContainer) GetResults() ([]*Result, error)
- func (this *PeanutContainer) Search(q string, limit, start int, sort string, asc bool) (int, float64, []Result)
- type PeanutDao
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao interface {
NewDaoImpl(dsn string) (DaoContainer, error)
}
type DaoContainer ¶
type DaoContainer interface { AddResult(p *Result) error DelResult(id interface{}) GetResults() ([]*Result, error) GetResultById(id uint64) (*Result, error) Search(q string, limit, start int, sort string, asc bool) (int, float64, []Result) Debug(is_debug bool) Close() error }
func NewDao ¶
func NewDao(dao_name, dsn string) (DaoContainer, error)
type PeanutContainer ¶
type PeanutContainer struct {
// contains filtered or unexported fields
}
func (*PeanutContainer) AddResult ¶
func (this *PeanutContainer) AddResult(p *Result) error
func (*PeanutContainer) Close ¶ added in v1.0.4
func (this *PeanutContainer) Close() error
func (*PeanutContainer) Debug ¶
func (this *PeanutContainer) Debug(is_debug bool)
func (*PeanutContainer) DelResult ¶
func (this *PeanutContainer) DelResult(id interface{})
func (*PeanutContainer) GetResultById ¶
func (this *PeanutContainer) GetResultById(id uint64) (*Result, error)
func (*PeanutContainer) GetResults ¶
func (this *PeanutContainer) GetResults() ([]*Result, error)
type PeanutDao ¶
type PeanutDao struct { }
func (*PeanutDao) NewDaoImpl ¶
func (this *PeanutDao) NewDaoImpl(dsn string) (DaoContainer, error)
Click to show internal directories.
Click to hide internal directories.