Documentation ¶
Index ¶
- Constants
- type DbMapping
- func (v *DbMapping) FirstById(model interface{}, id string, options ...FuncFirstOption) error
- func (v *DbMapping) FirstByWhere(model interface{}, whereMap map[string][]interface{}, ...) error
- func (v *DbMapping) FlushByIds(model interface{}, ids []string, options ...FuncFirstOption) error
- func (v *DbMapping) FlushByWhere(model interface{}, whereMap map[string][]interface{}, ...) error
- func (v *DbMapping) Key(model interface{}, whereMap map[string][]interface{}, ...) string
- func (v *DbMapping) KeyById(model interface{}, id string, options ...FuncFirstOption) string
- func (v *DbMapping) ListByIds(model interface{}, results interface{}, ids []string, ...) error
- func (v *DbMapping) MapByID(model, list interface{}, mp interface{}, ids []string, ...) error
- type FirstOption
- type FuncFirstOption
- type IDetailExpired
Constants ¶
View Source
const ( StringDetailPrefix = "string:detail" RecordNotFoundPlaceholder = "@-1" // 数据库为空的占位符 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbMapping ¶
type DbMapping struct {
// contains filtered or unexported fields
}
DbMapping 数据库模型的映射
func GetDbMapping ¶
func (*DbMapping) FirstById ¶
func (v *DbMapping) FirstById(model interface{}, id string, options ...FuncFirstOption) error
func (*DbMapping) FirstByWhere ¶
func (v *DbMapping) FirstByWhere(model interface{}, whereMap map[string][]interface{}, options ...FuncFirstOption) error
func (*DbMapping) FlushByIds ¶
func (v *DbMapping) FlushByIds(model interface{}, ids []string, options ...FuncFirstOption) error
func (*DbMapping) FlushByWhere ¶
func (v *DbMapping) FlushByWhere(model interface{}, whereMap map[string][]interface{}, options ...FuncFirstOption) error
func (*DbMapping) Key ¶
func (v *DbMapping) Key(model interface{}, whereMap map[string][]interface{}, options ...FuncFirstOption) string
func (*DbMapping) KeyById ¶
func (v *DbMapping) KeyById(model interface{}, id string, options ...FuncFirstOption) string
type FirstOption ¶
type FirstOption struct {
// contains filtered or unexported fields
}
type FuncFirstOption ¶
type FuncFirstOption func(*FirstOption)
func WithOrder ¶
func WithOrder( order string, ) FuncFirstOption
type IDetailExpired ¶
type IDetailExpired interface {
DetailExpiredSecond() int
}
Click to show internal directories.
Click to hide internal directories.