Documentation ¶
Index ¶
- Constants
- func CamelCased(s string) string
- func ConnWrapperTypeLives() []*dot.TypeLives
- func CreateSchema(db *pg.DB, ms []interface{}) error
- func DaoBaseTypeLives() []*dot.TypeLives
- func SQLLikeEscape(param string, special []rune, escape rune) string
- func SQLLikeEscapePostgres(param string) string
- func ToExported(s string) string
- func ToFirstLower(s string) string
- func ToFirstUpper(s string) string
- func ToMap(d interface{}, ex map[string]bool) map[string]string
- func Underscore(s string) string
- func UpperString(s string) string
- type ConnWrapper
- type DaoBase
Constants ¶
View Source
const (
//ConnWrapperTypeID type id
ConnWrapperTypeID = "ffc08507-dd5f-456c-84ea-cdae00b220bf"
)
View Source
const (
//DaoBaseTypeID type id
DaoBaseTypeID = "4d6adee7-7c10-4471-8885-a589688bac93"
)
Variables ¶
This section is empty.
Functions ¶
func ConnWrapperTypeLives ¶
ConnWrapperTypeLives make all type lives
func DaoBaseTypeLives ¶
DaoBaseTypeLives make all type lives
func SQLLikeEscape ¶
SQLLikeEscape like escape
func SQLLikeEscapePostgres ¶
SQLLikeEscapePostgres like escape
func ToFirstUpper ¶ added in v0.2.1
ToFirstUpper Uppercase for the first letter
func ToMap ¶
ToMap convert fields of struct to map, key is Lowercase for the first letter of the field name
func Underscore ¶
Underscore converts "CamelCasedString" to "camel_cased_string". Just work for ASCⅡ code
Types ¶
type ConnWrapper ¶
type ConnWrapper struct {
// contains filtered or unexported fields
}
ConnWrapper connect wrapper
func GenerateConnWrapper ¶
func GenerateConnWrapper(conf string) *ConnWrapper
GenerateConnWrapper this func is for test
func GenerateConnWrapperByDb ¶
func GenerateConnWrapperByDb(db *pg.DB) *ConnWrapper
GenerateConnWrapperByDb this func is for test
func (*ConnWrapper) AfterAllDestroy ¶
func (c *ConnWrapper) AfterAllDestroy(dot.Line)
type DaoBase ¶
type DaoBase struct {
Wrapper *ConnWrapper `dot:""`
}
DaoBase doa base
func GenerateDaoBase ¶
GenerateDaoBase this func is for test
func GenerateDaoBaseByDb ¶
func GenerateDaoBaseByDb(db *pg.DB) *DaoBase
GenerateDaoBaseByDb this func is for test
Click to show internal directories.
Click to hide internal directories.