Documentation ¶
Index ¶
- 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) IsTypeEqual(obj *Object) bool
- func (o *Object) Parse(pkgPath string, field *ast.Field, expr ast.Expr, dialect string, ...) error
- func (o *Object) ParseFunc(pkgPath string, params *ast.FieldList, results *ast.FieldList, dialect string, ...) error
- type Type
- func NewContextType() *Type
- func NewErrorType() *Type
- func NewFuncType() *Type
- func NewInterfaceType() *Type
- func NewPtrTimeType() *Type
- func NewPtrTypeByPkgAndName(pkg, name, pkgPath string, fnAddInterfacePackage func() (string, string)) *Type
- func NewTimeType() *Type
- func NewTypeByExpr(pkgPath string, expr ast.Expr, fnAddInterfacePackage func() (string, string)) *Type
- func NewTypeByPkgAndName(pkg, name, pkgPath string, fnAddInterfacePackage func() (string, string)) *Type
- func NewTypeFromStructField(field *reflect.StructField) *Type
- func ParseSelectorExprType(pkgPath string, 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) IsInterface() 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 ¶
func (*Object) IsTypeEqual ¶
type Type ¶
type Type struct { Package string PackagePath 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 NewInterfaceType ¶ added in v0.1.5
func NewInterfaceType() *Type
func NewPtrTimeType ¶
func NewPtrTimeType() *Type
func NewPtrTypeByPkgAndName ¶
func NewTimeType ¶
func NewTimeType() *Type
func NewTypeByExpr ¶
func NewTypeByPkgAndName ¶
func NewTypeFromStructField ¶
func NewTypeFromStructField(field *reflect.StructField) *Type
func ParseSelectorExprType ¶
func (*Type) IsGenericInt ¶
func (*Type) IsInterface ¶ added in v0.1.5
func (*Type) IsPrimitive ¶
Click to show internal directories.
Click to hide internal directories.