Documentation ¶
Index ¶
- Constants
- func BuildQueryStringCountExist(req BuildQueryStringCountExist_Req) string
- func InitTable(req InitTableReq) (err error)
- func MustCreateCode(req MustCreateCode_Req)
- func ScanCount(result *sql.Rows) (cnt int64, err error)
- func ScanExist(result *sql.Rows) (exist bool, err error)
- type AddWhereAllField_Req
- type BuildQueryStringCountExist_Req
- type FieldSqlDefine
- type GoSourceWriter
- func (this *GoSourceWriter) AddDeclear_ORM_Type(info StructType)
- func (this *GoSourceWriter) AddFuncOrderBy(tName string, info StructType, isPointer bool)
- func (this *GoSourceWriter) AddFuncOrderByL1(tName string, info StructType, isPointer bool, ...)
- func (this *GoSourceWriter) AddFunc_DbType()
- func (this *GoSourceWriter) AddFunc_InitTable()
- func (this *GoSourceWriter) AddFunc_ORM_Create(info StructType)
- func (this *GoSourceWriter) AddFunc_ORM_Delete(info StructType)
- func (this *GoSourceWriter) AddFunc_ORM_Query(info StructType)
- func (this *GoSourceWriter) AddFunc_ORM_Update(info StructType)
- func (this *GoSourceWriter) AddFunc_View_Select(info StructType)
- func (this *GoSourceWriter) AddFunc_fillSelectFieldNameList(info StructType)
- func (this *GoSourceWriter) AddImportPath(importPath string)
- func (this *GoSourceWriter) AddImportPathHide(importPath string)
- func (this *GoSourceWriter) AddWhereAllField(info StructType, name string, isLeftJoinPart bool, needTableName bool)
- func (this *GoSourceWriter) AddWhereAllFieldL1(info StructType, name string, isLeftJoinPart bool, ...)
- func (this *GoSourceWriter) ChangeLinkOpBegin(name string, op string, req AddWhereAllField_Req)
- func (this *GoSourceWriter) ChangeLinkOpEnd(name string, req AddWhereAllField_Req)
- func (this *GoSourceWriter) FiledOp_AddWhere(name string, f StructFieldType, req AddWhereAllField_Req, ...)
- func (this *GoSourceWriter) FormatWriteSrc(to string)
- func (this *GoSourceWriter) GetImportList() []string
- func (this *GoSourceWriter) MustParsePkg(req MustCreateCode_Req)
- type InitTableReq
- type KORM_leftJoinNode
- type KORM_leftJoinRootInfo
- type MustCreateCode_Req
- type StructFieldType
- func (this *StructFieldType) GetSqlCreateTableDeclare() string
- func (this *StructFieldType) GetSqlDescDefaultV() string
- func (t StructFieldType) IsBoolType() bool
- func (this StructFieldType) IsBuildinTimeType() bool
- func (t StructFieldType) IsByteArrayType() bool
- func (t StructFieldType) IsIntOrUintType() bool
- func (t StructFieldType) IsIntType() bool
- func (this StructFieldType) IsStringOrIntUintType() bool
- func (t StructFieldType) IsUintType() bool
- func (this StructFieldType) ViewGetJoinObjPath() []string
- func (this StructFieldType) ViewGetJoinObjPath_LastBeLeftJoin(begin StructType, w *GoSourceWriter) string
- func (this StructFieldType) ViewGetJoinObj_CallDeclear() string
- type StructType
- func (info *StructType) BuildQueryString(this *GoSourceWriter, ret string) string
- func (info *StructType) BuildQueryStringL1(buf *bytes.Buffer, selectPrefixMysql string)
- func (info *StructType) BuildQueryStringOnConn() string
- func (t StructType) GetDotName() string
- func (t StructType) GetLeftJoinName() string
- func (t StructType) GetOrmSubType_Delete() string
- func (t StructType) GetOrmSubType_SelectName() string
- func (t StructType) GetOrmSubType_UpdateName() string
- func (t StructType) GetOrmTypeName() string
- func (info StructType) View_getQueryNode_ByFieldName(fn string) (nodeName string, fieldName2 string)
- func (info StructType) View_getQueryNode_ByFieldName2(fn string) (nodeName string, fieldName2 string)
Constants ¶
View Source
const ( SqlTypeChar255 = "CHAR(255)" SqlTypeBigInt = "bigint" SqlTypeLongBlob = "longblob" SqlTypeBool = "bool" )
View Source
const ( InitModeMysql = "mysql" InitModeSqlite = "sqlite" )
Variables ¶
This section is empty.
Functions ¶
func BuildQueryStringCountExist ¶
func BuildQueryStringCountExist(req BuildQueryStringCountExist_Req) string
func InitTable ¶
func InitTable(req InitTableReq) (err error)
func MustCreateCode ¶
func MustCreateCode(req MustCreateCode_Req)
Types ¶
type AddWhereAllField_Req ¶
type AddWhereAllField_Req struct {
// contains filtered or unexported fields
}
type FieldSqlDefine ¶
type GoSourceWriter ¶
type GoSourceWriter struct {
// contains filtered or unexported fields
}
func (*GoSourceWriter) AddDeclear_ORM_Type ¶
func (this *GoSourceWriter) AddDeclear_ORM_Type(info StructType)
func (*GoSourceWriter) AddFuncOrderBy ¶
func (this *GoSourceWriter) AddFuncOrderBy(tName string, info StructType, isPointer bool)
func (*GoSourceWriter) AddFuncOrderByL1 ¶
func (this *GoSourceWriter) AddFuncOrderByL1(tName string, info StructType, isPointer bool, getTableNameAndFieldNameFn func(fn string) (tn string, fn2 string))
func (*GoSourceWriter) AddFunc_DbType ¶
func (this *GoSourceWriter) AddFunc_DbType()
func (*GoSourceWriter) AddFunc_InitTable ¶
func (this *GoSourceWriter) AddFunc_InitTable()
func (*GoSourceWriter) AddFunc_ORM_Create ¶
func (this *GoSourceWriter) AddFunc_ORM_Create(info StructType)
func (*GoSourceWriter) AddFunc_ORM_Delete ¶
func (this *GoSourceWriter) AddFunc_ORM_Delete(info StructType)
func (*GoSourceWriter) AddFunc_ORM_Query ¶
func (this *GoSourceWriter) AddFunc_ORM_Query(info StructType)
func (*GoSourceWriter) AddFunc_ORM_Update ¶
func (this *GoSourceWriter) AddFunc_ORM_Update(info StructType)
func (*GoSourceWriter) AddFunc_View_Select ¶
func (this *GoSourceWriter) AddFunc_View_Select(info StructType)
func (*GoSourceWriter) AddFunc_fillSelectFieldNameList ¶
func (this *GoSourceWriter) AddFunc_fillSelectFieldNameList(info StructType)
func (*GoSourceWriter) AddImportPath ¶
func (this *GoSourceWriter) AddImportPath(importPath string)
func (*GoSourceWriter) AddImportPathHide ¶
func (this *GoSourceWriter) AddImportPathHide(importPath string)
func (*GoSourceWriter) AddWhereAllField ¶
func (this *GoSourceWriter) AddWhereAllField(info StructType, name string, isLeftJoinPart bool, needTableName bool)
func (*GoSourceWriter) AddWhereAllFieldL1 ¶
func (this *GoSourceWriter) AddWhereAllFieldL1(info StructType, name string, isLeftJoinPart bool, fnWField func(fieldName string, fnName string) string)
func (*GoSourceWriter) ChangeLinkOpBegin ¶
func (this *GoSourceWriter) ChangeLinkOpBegin(name string, op string, req AddWhereAllField_Req)
func (*GoSourceWriter) ChangeLinkOpEnd ¶
func (this *GoSourceWriter) ChangeLinkOpEnd(name string, req AddWhereAllField_Req)
func (*GoSourceWriter) FiledOp_AddWhere ¶
func (this *GoSourceWriter) FiledOp_AddWhere(name string, f StructFieldType, req AddWhereAllField_Req, fnWField func(fieldName string, fnName string) string)
func (*GoSourceWriter) FormatWriteSrc ¶
func (this *GoSourceWriter) FormatWriteSrc(to string)
func (*GoSourceWriter) GetImportList ¶
func (this *GoSourceWriter) GetImportList() []string
func (*GoSourceWriter) MustParsePkg ¶
func (this *GoSourceWriter) MustParsePkg(req MustCreateCode_Req)
type InitTableReq ¶
type KORM_leftJoinNode ¶
type KORM_leftJoinNode struct { ThisLevelJoinList []*KORM_leftJoinNode FieldName string TableName string // _0, _1, _2 Root *KORM_leftJoinRootInfo SelectFieldNameList []string }
func (*KORM_leftJoinNode) AddLeftJoin ¶
func (this *KORM_leftJoinNode) AddLeftJoin(rightTableName string, thisFieldName string, leftFieldName string, rightFieldName string) *KORM_leftJoinNode
func (*KORM_leftJoinNode) FillSelect ¶
func (this *KORM_leftJoinNode) FillSelect(buf2 *bytes.Buffer, isFirst bool)
type KORM_leftJoinRootInfo ¶
type MustCreateCode_Req ¶
type StructFieldType ¶
type StructFieldType struct { FiledName string TypeName string IsStarExpr bool IsPrimaryKeyPart bool LjField_This string // left join LjFiled_Other string // left join IndexList [][]string ViewJoinPath []string }
func (*StructFieldType) GetSqlCreateTableDeclare ¶
func (this *StructFieldType) GetSqlCreateTableDeclare() string
func (*StructFieldType) GetSqlDescDefaultV ¶
func (this *StructFieldType) GetSqlDescDefaultV() string
func (StructFieldType) IsBoolType ¶
func (t StructFieldType) IsBoolType() bool
func (StructFieldType) IsBuildinTimeType ¶
func (this StructFieldType) IsBuildinTimeType() bool
func (StructFieldType) IsByteArrayType ¶
func (t StructFieldType) IsByteArrayType() bool
func (StructFieldType) IsIntOrUintType ¶
func (t StructFieldType) IsIntOrUintType() bool
func (StructFieldType) IsIntType ¶
func (t StructFieldType) IsIntType() bool
func (StructFieldType) IsStringOrIntUintType ¶
func (this StructFieldType) IsStringOrIntUintType() bool
func (StructFieldType) IsUintType ¶
func (t StructFieldType) IsUintType() bool
func (StructFieldType) ViewGetJoinObjPath ¶
func (this StructFieldType) ViewGetJoinObjPath() []string
func (StructFieldType) ViewGetJoinObjPath_LastBeLeftJoin ¶
func (this StructFieldType) ViewGetJoinObjPath_LastBeLeftJoin(begin StructType, w *GoSourceWriter) string
func (StructFieldType) ViewGetJoinObj_CallDeclear ¶
func (this StructFieldType) ViewGetJoinObj_CallDeclear() string
type StructType ¶
type StructType struct { Name string FieldList []StructFieldType IsView bool ViewBeginD string View_VarNameCallList [][2]string View_HasCallMap map[string]string }
func (*StructType) BuildQueryString ¶
func (info *StructType) BuildQueryString(this *GoSourceWriter, ret string) string
func (*StructType) BuildQueryStringL1 ¶
func (info *StructType) BuildQueryStringL1(buf *bytes.Buffer, selectPrefixMysql string)
func (*StructType) BuildQueryStringOnConn ¶
func (info *StructType) BuildQueryStringOnConn() string
func (StructType) GetDotName ¶
func (t StructType) GetDotName() string
func (StructType) GetLeftJoinName ¶
func (t StructType) GetLeftJoinName() string
func (StructType) GetOrmSubType_Delete ¶
func (t StructType) GetOrmSubType_Delete() string
func (StructType) GetOrmSubType_SelectName ¶
func (t StructType) GetOrmSubType_SelectName() string
func (StructType) GetOrmSubType_UpdateName ¶
func (t StructType) GetOrmSubType_UpdateName() string
func (StructType) GetOrmTypeName ¶
func (t StructType) GetOrmTypeName() string
func (StructType) View_getQueryNode_ByFieldName ¶
func (info StructType) View_getQueryNode_ByFieldName(fn string) (nodeName string, fieldName2 string)
func (StructType) View_getQueryNode_ByFieldName2 ¶
func (info StructType) View_getQueryNode_ByFieldName2(fn string) (nodeName string, fieldName2 string)
Click to show internal directories.
Click to hide internal directories.