Documentation ¶
Index ¶
- Constants
- func ParseTag(tag string) (tagNums *[CRUDLen]TagInfo, err error)
- func ParseTagHandler(structName, fieldName, tag string)
- type Config
- func (Output *Config) Dsn(t string) *Config
- func (Output *Config) EnableCreate(t bool) *Config
- func (Output *Config) EnableDebug(t bool) *Config
- func (Output *Config) EnableDelete(t bool) *Config
- func (Output *Config) EnableOr(t bool) *Config
- func (Output *Config) EnableQuery(t bool) *Config
- func (Output *Config) EnableUpdate(t bool) *Config
- func (Output *Config) OrmPackageName(t string) *Config
- func (Output *Config) PackageName(t string) *Config
- func (Output *Config) SavePath(t string) *Config
- func (Output *Config) SqlPackageName(t string) *Config
- type Struct2DAO
- type TagInfo
- type TagInfoMap
Constants ¶
View Source
const ( KCreate = iota KQuery KUpdate KDelete CRUDLen )
CRUD internal flag
Variables ¶
This section is empty.
Functions ¶
func ParseTagHandler ¶
func ParseTagHandler(structName, fieldName, tag string)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func DefaultConfig ¶
func (*Config) EnableCreate ¶
func (*Config) EnableDebug ¶
func (*Config) EnableDelete ¶
func (*Config) EnableQuery ¶
func (*Config) EnableUpdate ¶
func (*Config) OrmPackageName ¶
func (*Config) PackageName ¶
func (*Config) SqlPackageName ¶
type Struct2DAO ¶
type Struct2DAO struct {
// contains filtered or unexported fields
}
func NewStruct2DAO ¶
func NewStruct2DAO(config *Config) *Struct2DAO
func (*Struct2DAO) AutoMigrate ¶
func (s *Struct2DAO) AutoMigrate(t ...interface{}) *Struct2DAO
func (*Struct2DAO) Config ¶
func (s *Struct2DAO) Config(config Config) *Struct2DAO
func (*Struct2DAO) Error ¶
func (s *Struct2DAO) Error() error
func (*Struct2DAO) Run ¶
func (s *Struct2DAO) Run() error
type TagInfo ¶
func (*TagInfo) ParseString ¶
type TagInfoMap ¶
func GetTagInfoMap ¶
func GetTagInfoMap() *TagInfoMap
func (*TagInfoMap) GetTag ¶
func (t *TagInfoMap) GetTag(structName, fieldName string) *[CRUDLen]TagInfo
func (*TagInfoMap) InsertTag ¶
func (t *TagInfoMap) InsertTag(structName, fieldName string, tag TagInfo)
Click to show internal directories.
Click to hide internal directories.