Documentation ¶
Index ¶
- Constants
- func GetJdbcTypePart(tps string) string
- func GetShortName(name string) string
- func ParseJdbcTypeFrom(tps string) reflect.Type
- func ToJavaType(typ reflect.Type) string
- func ToJson(v interface{}) string
- func UpperFirst(s string) string
- type ColumnStucture
- type DatabaseStructure
- type QueryType
- type ResultItem
- type ResultMap
- type SqlElement
- type SqlFunction
- type SqlFunctionType
- type SqlMapper
- type SqlMappers
- type SqlParam
- type SqlParamType
- type SqlRenderer
- type SqlResult
- type TableStructure
Constants ¶
View Source
const ( DefaultResultMapName = "BaseResultMap" DefaultBCLName = "base_column_list" )
Variables ¶
This section is empty.
Functions ¶
func GetJdbcTypePart ¶
func GetShortName ¶
func ParseJdbcTypeFrom ¶
func ToJavaType ¶
func UpperFirst ¶
Types ¶
type ColumnStucture ¶ added in v0.2.11
type DatabaseStructure ¶ added in v0.2.11
type DatabaseStructure struct { Tables []*TableStructure TableList []string TableMap map[string]*TableStructure }
func (*DatabaseStructure) SaveToDir ¶ added in v0.2.11
func (ds *DatabaseStructure) SaveToDir(dir, prefix, tables string) error
type ResultItem ¶
type ResultMap ¶
type ResultMap struct { Id string TypeName string Results []*ResultItem ColumnMap map[string]*ResultItem PropertyMap map[string]*ResultItem }
func (*ResultMap) GenerateFile ¶
type SqlElement ¶
type SqlFunction ¶
type SqlFunction struct { Id string Owner string Type SqlFunctionType Param SqlParam Result SqlResult Items []*sqlFragment TotalUsage int64 FailedUsage int64 TotalDuration int64 MaxDuration int64 MinDuration int64 GenerateCount int64 GenerateDuration int64 }
func (*SqlFunction) GenerateSQL ¶
func (in *SqlFunction) GenerateSQL(args ...interface{}) (string, []interface{}, error)
GenerateSQL
func (*SqlFunction) PrepareSQL ¶
func (in *SqlFunction) PrepareSQL(args ...interface{}) (string, []string, error)
func (*SqlFunction) String ¶
func (in *SqlFunction) String() string
func (*SqlFunction) UpdateUsage ¶
func (in *SqlFunction) UpdateUsage(start time.Time, success bool)
type SqlFunctionType ¶
type SqlFunctionType string
const ( SelectFunction SqlFunctionType = "select" UpdateFunction SqlFunctionType = "update" DeleteFunction SqlFunctionType = "delete" InsertFunction SqlFunctionType = "insert" )
type SqlMapper ¶
type SqlMapper struct { Filename string Namespace string Maps []*ResultMap SqlNodes []*SqlElement Functions []*SqlFunction NamedMaps map[string]*ResultMap NamedSqls map[string]*SqlElement NamedFunctions map[string]*SqlFunction }
func (*SqlMapper) GenerateFiles ¶
type SqlMappers ¶
func NewSqlMappers ¶
func NewSqlMappers(dir string) *SqlMappers
func (*SqlMappers) GenerateFiles ¶
func (in *SqlMappers) GenerateFiles(dir, pkg string)
type SqlParamType ¶
type SqlParamType string
const ( BaseSqlParam SqlParamType = "base" SliceSqlParam SqlParamType = "slice" MapSqlParam SqlParamType = "map" StructSqlParam SqlParamType = "struct" )
type SqlRenderer ¶
type TableStructure ¶ added in v0.2.11
type TableStructure struct { Columns []*ColumnStucture ColumnMap map[string]*ColumnStucture Table string PrimaryColumn *ColumnStucture }
func NewTableStruct ¶ added in v0.2.11
func NewTableStruct(table string, res []map[string]interface{}) (*TableStructure, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.