Documentation
¶
Index ¶
- type ColumnInfo
- type ConnectionParam
- type DBInfo
- type LoginUser
- type MysqlColumnInfo
- type SqlserverColumnInfo
- type TableInfo
- func (this *TableInfo) GetsFieldKeyName() string
- func (this *TableInfo) GetsFieldKeyType() string
- func (this *TableInfo) HasOnlyignColumn() int
- func (this *TableInfo) HasPath() int
- func (this *TableInfo) HasPid() int
- func (this *TableInfo) HasStateColumn() int
- func (this *TableInfo) HasVersionColumn() int
- func (this *TableInfo) SetColumnInfoList(columnInfoList []ColumnInfo)
- func (this *TableInfo) SetDefault()
- func (this *TableInfo) SetsDbName(sDbName string)
- func (this *TableInfo) SetsName(sName string)
- func (this *TableInfo) Supplementary()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct { GsTableName string `json:"sTableName" gorm:"column:sTableName; type:varchar; DEFAULT:''"` //字段所在表名 GiIndex int `json:"iIndex" gorm:"column:iIndex; type:int; DEFAULT:'99'"` //序号 GsField string `json:"sField" gorm:"column:sField; type:varchar; DEFAULT:''"` //在数据库中的名字段 GsName string `json:"sName" gorm:"column:sName; type:varchar; DEFAULT:''"` //字段名(驼峰名称头字母小写) GsType string `json:"sType" gorm:"column:sType; type:varchar; DEFAULT:''"` //字段类型 GiTypeLength int `json:"iTypeLength" gorm:"column:iTypeLength; type:int; DEFAULT:'1'"` //字段长度 GiNull int `json:"iNull" gorm:"column:iNull; type:int; DEFAULT:'1'"` //是否允许为空 GiKey int `json:"iKey" gorm:"column:iKey; type:int; DEFAULT:'2'"` //是否主键 GsDefaultData string `json:"sDefaultData" gorm:"column:sDefaultData; type:varchar; DEFAULT:''"` //默认值 GiExtra int `json:"iExtra" gorm:"column:iExtra; type:int; DEFAULT:'2'"` //是否自增长 GsComment string `json:"sComment" gorm:"column:sComment; type:varchar; DEFAULT:''"` //字段备注 GsTypeByDelphi string `json:"sTypeByDelphi" gorm:"column:sTypeByDelphi; type:varchar; DEFAULT:''"` //字段类型 GsTypeByJava string `json:"sTypeByJava" gorm:"column:sTypeByJava; type:varchar; DEFAULT:''"` //字段类型 GsTableObj string `json:"sTableObj" gorm:"column:sTableObj; type:varchar; DEFAULT:''"` //首字母小写的表名(用于java实体对象) GsKeyColumnName string `json:"sKeyColumnName" gorm:"column:sKeyColumnName; type:varchar; DEFAULT:''"` //主键列明 GiDecimal int `json:"iDecimal" gorm:"column:iDecimal; type:int; DEFAULT:'2'"` //类型是否有小数 GiIntegralLength int `json:"iIntegralLength" gorm:"column:iIntegralLength; type:int; DEFAULT:''"` //整数位的长度 GiDecimalLength int `json:"iDecimalLength" gorm:"column:iDecimalLength; type:int; DEFAULT:''"` //小数位的长度 GsSimplComment string `json:"sSimplComment" gorm:"column:sSimplComment; type:varchar; DEFAULT:''"` //字段简洁备注(去除括号的内容) GiDictionary int `json:"iDictionary" gorm:"column:iDictionary; type:int; DEFAULT:''"` //是否字典 GiDictionaryCommon int `json:"iDictionaryCommon" gorm:"column:iDictionaryCommon; type:int; DEFAULT:''"` //通用字典 GiEnum int `json:"iEnum" gorm:"column:iEnum; type:int; DEFAULT:''"` //枚举值 GsEnumArray map[string]string `json:"sEnumArray" gorm:"column:sEnumArray; type:varchaintr; DEFAULT:''"` //枚举值集合 GiBoolean int `json:"iBoolean" gorm:"column:iBoolean; type:int; DEFAULT:''"` //布尔值 GiRelTable int `json:"iRelTable" gorm:"column:iRelTable; type:int; DEFAULT:''"` //关联表 GsRelTableName string `json:"sRelTableName" gorm:"column:sRelTableName; type:varchar; DEFAULT:''"` //关联表名(带库名) GsRelColumnValue string `json:"sRelColumnValue" gorm:"column:sRelColumnValue; type:varchar; DEFAULT:''"` //关联字段值 GsRelColumnName string `json:"sRelColumnName" gorm:"column:sRelColumnName; type:varchar; DEFAULT:''"` //关联字段名 GsRelColumnAs string `json:"sRelColumnAs" gorm:"column:sRelColumnAs; type:varchar; DEFAULT:''"` //关联后的别名 GsNameObj string `json:"sNameObj"` //驼峰名称(头字母大写) }
*
- 表统一字段信息
- @author HuangXinBian
type ConnectionParam ¶
type DBInfo ¶
type DBInfo struct { Gsequence string `json:"sequence"` //序列(每次查询都重建) GsName string `json:"sName"` //库名 GsDbCodeName string `json:"sDbCodeName"` //数据库在代码中的应用名(去除标识如'dev_'等库前缀) GsSimplName string `json:"sSimplName"` //简化库名 (去除标识如'dev_'、'Bricks'等库前缀) GsPath string `json:"sPath"` //路径 GsType string `json:"sType"` //数据库类型 GtableInfoList []TableInfo `json:"tableInfoList"` //表集合 }
*
- 数据库信息
- @author HuangXinBian
type LoginUser ¶
type LoginUser struct { GsId string `json:"sId"` GsPass string `json:"sPass"` GsKey string `json:"sKey"` }
登录用户
type MysqlColumnInfo ¶
type MysqlColumnInfo struct { Field sql.NullString Type sql.NullString Collation sql.NullString Null sql.NullString Key sql.NullString Default sql.NullString Extra sql.NullString Privileges sql.NullString Comment sql.NullString }
type SqlserverColumnInfo ¶
type SqlserverColumnInfo struct { GsTableName string GiIndex int GsField string GsType string GiTypeLength int GisNull int Giskey int GsDefaultData string GsExtra string GsComment string GsTypeByDelphi string GsTypeByJava string GsTableObj string GsKeyColumnName string GisDecimal int GiIntegralLength int GiDecimalLength int }
type TableInfo ¶
type TableInfo struct { GsDbName string `json:"sDbName"` //库名 GsDbCodeName string `json:"sDbCodeName"` //数据库在代码中的应用名(去除标识如'dev_'等库前缀) GsDbCodeSimplName string `json:"sDbCodeSimplName"` //数据库在代码中的应用名(去除标识如'dev_'、'Bricks'等库前缀) GsName string `json:"sName"` //表名 GsEntityName string `json:"sEntityName"` //实体表名 GsLowerName string `json:"sLowerName"` //全小写表名 GsUpperName string `json:"sUpperName"` //全大写表名 GsObjName string `json:"sObjName"` //头字母小写实体名 GsUrl string `json:"sUrl"` //表名对应的url地址 GsComment string `json:"sComment"` //表备注 GiHasPid int `json:"iHasPid"` //是否为含有上下级关系的表,默认-1 GiHasPath int `json:"iHasPath"` //是否含有路径字段 GiHasOnlyignColumn int `json:"iHasOnlyignColumn"` //是否含有'唯一'字段 GiHasVersionColumn int `json:"iHasVersionColumn"` //是否含有'iVersion'字段 GiHasStateColumn int `json:"iHasStateColumn"` //是否含有'iState'字段 GsFieldKeyName string `json:"sFieldKeyName"` //主键字段名称 GsFieldKeyType string `json:"sFieldKeyType"` //主键字段类型 GcolumnInfoList []ColumnInfo `json:"columnInfoList"` //字段集合 GkeyColumnList []ColumnInfo `json:"keyColumnList"` //主键字段集合 GnotNullColumnList []ColumnInfo `json:"notNullColumnList"` //不允许为空字段集合 GnullColumnList []ColumnInfo `json:"nullColumnList"` //允许为空字段集合 }
*
- 数据库表结构
- @author HuangXinBian
func (*TableInfo) SetColumnInfoList ¶
func (this *TableInfo) SetColumnInfoList(columnInfoList []ColumnInfo)
*
- 设置 字段集合
- @param columnInfoList 字段集合
Click to show internal directories.
Click to hide internal directories.