Versions in this module Expand all Collapse all v1 v1.0.3 Oct 22, 2019 Changes in this version + const ConnAnd + const ConnOr + const OpEqual + const OpGreaterThan + const OpGreaterThanEqual + const OpIn + const OpLessThan + const OpLessThanEqual + const OpLike + const OpNotEqual + type Condition struct + Conn string + Items []ConditionItem + Subs []Condition + func (m Condition) Fields() (result []string) + func (m Condition) QuerySql() (whereSql string, whereArgs []interface{}, err error) + type ConditionItem struct + Left string + Op string + Right interface{} + func (m ConditionItem) QuerySql() (whereSql string, whereArgs interface{}, err error) v1.0.2 Oct 22, 2019 Changes in this version + func IsGormTx(db *gorm.DB) (err error) v1.0.1 Sep 30, 2019 v1.0.0 Jul 15, 2019 Changes in this version + func GeneralInsert(db basic.SQLCommon, tableName string, data map[string]interface{}) (rsp sql.Result, err error) + func GeneralListGORM(database *gorm.DB, params ListByPageParams) (db *gorm.DB) + func GeneralListSQL(db basic.SQLCommon, tableName string, params ListByPageParams, whereSql string, ...) (rsp []interface{}, err error) + func GetGormMySQLConnection(config MySqlConfig) (db *gorm.DB, err error) + func TransactionGORM(db *gorm.DB, f TransactionFuncGORM) (data interface{}, err error) + type ListByPageParams struct + Fields []string + IgnoreFields []string + PageNumber uint64 + PageSize uint64 + SortBy string + SortDirection bool + type MySqlConfig struct + Host string + MaxIdleConnection int + MaxOpenConnection int + Params map[string]string + Password string + Port int + Scheme string + User string + type TransactionFuncGORM func(*gorm.DB) (interface{}, error)