Documentation
¶
Index ¶
- func NewDbCtl(dbType, dsn string) (iface.DbCtl, error)
- func NewDbCtlWhitCache(dbType, dsn string, redisAddr, redisPassword string, redisDB int) (iface.DbCtl, error)
- type DbCtl
- func (d *DbCtl) AddRecord(inf interface{}) error
- func (d *DbCtl) AddRecordWithPKey(inf interface{}) error
- func (d *DbCtl) CheckRecord(inf interface{}) bool
- func (d *DbCtl) ConditionalQuery(inf interface{}, conditional ...interface{}) error
- func (d *DbCtl) CreateTable(inf interface{}) error
- func (d *DbCtl) GetAllRecords(inf interface{}) error
- func (d *DbCtl) GetAllRecordsCount(inf interface{}) int64
- func (d *DbCtl) GetLastRecord(inf interface{}) error
- func (d *DbCtl) GetRandomRecords(inf interface{}, amount int) error
- func (d *DbCtl) RemoveRecord(inf interface{}) error
- func (d *DbCtl) UpdateRecord(inf interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DbCtl ¶
type DbCtl struct {
// contains filtered or unexported fields
}
func (*DbCtl) AddRecordWithPKey ¶
func (*DbCtl) CheckRecord ¶
CheckRecord 根据主键查询,如果主键存在的话
func (*DbCtl) ConditionalQuery ¶
func (*DbCtl) CreateTable ¶
func (*DbCtl) GetAllRecords ¶
func (*DbCtl) GetAllRecordsCount ¶
func (*DbCtl) GetLastRecord ¶
func (*DbCtl) GetRandomRecords ¶
func (*DbCtl) RemoveRecord ¶
func (*DbCtl) UpdateRecord ¶
Click to show internal directories.
Click to hide internal directories.