Documentation ¶
Index ¶
- func GetName(names []*ast.Ident) string
- func ParseSQL(comment, dialect string) string
- type Object
- func (o *Object) AddParam(obj *Object)
- func (o *Object) AddResult(obj *Object)
- func (o *Object) FindParam(names []string) *Object
- func (o *Object) GetSQLTypeByType() (st *types.SQLType)
- func (o *Object) Parse(field *ast.Field, expr ast.Expr, dialect string, ...) error
- func (o *Object) ParseFunc(params *ast.FieldList, results *ast.FieldList, dialect string, ...) error
- type Type
- func NewContextType() *Type
- func NewErrorType() *Type
- func NewFuncType() *Type
- func NewPtrTimeType() *Type
- func NewPtrType(pkg, name string) *Type
- func NewPtrTypeByPkgAndName(pkg, name string) *Type
- func NewTimeType() *Type
- func NewType(pkg, name string) *Type
- func NewTypeByExpr(expr ast.Expr) *Type
- func NewTypeByPkgAndName(pkg, name string) *Type
- func NewTypeFromStructField(field *reflect.StructField) *Type
- func ParseSelectorExprType(se *ast.SelectorExpr, ptr bool) *Type
- func (typ *Type) Equals(t *Type) bool
- func (typ *Type) EqualsExactly(t *Type) bool
- func (typ *Type) IsByte() bool
- func (typ *Type) IsContext() bool
- func (typ *Type) IsCustom() bool
- func (typ *Type) IsError() bool
- func (typ *Type) IsGenericInt() bool
- func (typ *Type) IsInt64() bool
- func (typ *Type) IsPrimitive() bool
- func (typ *Type) IsTime() bool
- func (typ *Type) String() string
- func (typ *Type) StringExt() string
- type TypeClass
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Object ¶
type Object struct { Name string // 名称 Type Type // 类型 Key *Type // map 时 key 的类型 IsSlice bool // 是否数组 IsMap bool IsFunc bool Params []*Object Results []*Object ParamsMap map[string]*Object Extra interface{} }
func NewEmptyObject ¶
func NewEmptyObject() *Object
func NewObjectFromStructField ¶
func NewObjectFromStructField(field *reflect.StructField) *Object
func (*Object) GetSQLTypeByType ¶
type Type ¶
type Type struct { Package string Name string IsPtr bool // contains filtered or unexported fields }
func NewContextType ¶
func NewContextType() *Type
func NewErrorType ¶
func NewErrorType() *Type
func NewFuncType ¶
func NewFuncType() *Type
func NewPtrTimeType ¶
func NewPtrTimeType() *Type
func NewPtrType ¶
func NewPtrTypeByPkgAndName ¶
func NewTimeType ¶
func NewTimeType() *Type
func NewTypeByExpr ¶
func NewTypeByPkgAndName ¶
func NewTypeFromStructField ¶
func NewTypeFromStructField(field *reflect.StructField) *Type
func ParseSelectorExprType ¶
func ParseSelectorExprType(se *ast.SelectorExpr, ptr bool) *Type
func (*Type) IsGenericInt ¶
func (*Type) IsPrimitive ¶
Click to show internal directories.
Click to hide internal directories.