Documentation
¶
Index ¶
- Constants
- func BatchInsert(obj Domain, objs []interface{}) error
- func Close(conn sqlbuilder.Database, tx sqlbuilder.Tx)
- func Generate(savePath string, tables []string) error
- func GetConnect() (sqlbuilder.Database, error)
- func GetFileSplit() string
- func InitSess() (sqlbuilder.Database, error)
- func Insert(obj Domain) error
- func InsertReturnId(obj Domain) (interface{}, error)
- func IsExistByCond(table string, cond db.Cond) (bool, error)
- func Rollback(tx sqlbuilder.Tx)
- func SelectAllByCond(table string, cond db.Cond, objs interface{}) error
- func SelectAllByCondWithNumAndOrder(table string, cond db.Cond, union *db.Union, page int, size int, ...) error
- func SelectAllByCondWithPageAndOrder(table string, cond db.Cond, union *db.Union, page int, size int, ...) (uint64, error)
- func SelectById(table string, id interface{}, obj interface{}) error
- func SelectByQuery(query string, objs interface{}, args ...interface{}) error
- func SelectCountByCond(table string, cond db.Cond) (uint64, error)
- func SelectOneByCond(table string, cond db.Cond, obj interface{}) error
- func TransBatchInsert(tx sqlbuilder.Tx, obj Domain, objs []interface{}) error
- func TransInsert(tx sqlbuilder.Tx, obj Domain) error
- func TransInsertReturnId(tx sqlbuilder.Tx, obj Domain) (interface{}, error)
- func TransSelectAllByCond(tx sqlbuilder.Tx, table string, cond db.Cond, objs interface{}) error
- func TransSelectAllByCondWithNumAndOrder(tx sqlbuilder.Tx, table string, cond db.Cond, union *db.Union, page int, ...) error
- func TransSelectAllByCondWithPageAndOrder(tx sqlbuilder.Tx, table string, cond db.Cond, union *db.Union, page int, ...) (uint64, error)
- func TransSelectById(tx sqlbuilder.Tx, table string, id interface{}, obj interface{}) error
- func TransSelectByQuery(tx sqlbuilder.Tx, query string, objs interface{}, args ...interface{}) error
- func TransSelectCountByCond(tx sqlbuilder.Tx, table string, cond db.Cond) (uint64, error)
- func TransSelectOneByCond(tx sqlbuilder.Tx, table string, cond db.Cond, obj interface{}) error
- func TransUpdate(tx sqlbuilder.Tx, obj Domain) error
- func TransUpdateSmart(tx sqlbuilder.Tx, table string, id int64, upd Upd) error
- func TransUpdateSmartWithCond(tx sqlbuilder.Tx, table string, cond db.Cond, upd Upd) (int64, error)
- func TransX(txFunc func(tx sqlbuilder.Tx) error) error
- func Update(obj Domain) error
- func UpdateSmart(table string, id int64, upd Upd) error
- func UpdateSmartWithCond(table string, cond db.Cond, upd Upd) (int64, error)
- type Domain
- type Hooks
- type Upd
Constants ¶
View Source
const ( OssConfigMissingSentence = "oss configuration is missing!" DBOpenErrorSentence = "db.Open(): %q\n" TxOpenErrorSentence = "tx.Open(): %q\n" )
View Source
const ( TableMessageQueue = "ppm_mqs_message_queue" TableMessageQueueConsumer = "ppm_mqs_message_queue_consumer" TableMessageQueueConsumerFail = "ppm_mqs_message_queue_consumer_fail" )
View Source
const ( TcId = "id" TcIsDelete = "is_delete" TcTopic = "topic" TcGroupName = "group_name" TcMessageId = "message_id" )
Variables ¶
This section is empty.
Functions ¶
func BatchInsert ¶
func Close ¶
func Close(conn sqlbuilder.Database, tx sqlbuilder.Tx)
func GetConnect ¶
func GetConnect() (sqlbuilder.Database, error)
func GetFileSplit ¶
func GetFileSplit() string
func InitSess ¶
func InitSess() (sqlbuilder.Database, error)
func InsertReturnId ¶
func Rollback ¶
func Rollback(tx sqlbuilder.Tx)
func SelectById ¶
func SelectByQuery ¶
func TransBatchInsert ¶
func TransBatchInsert(tx sqlbuilder.Tx, obj Domain, objs []interface{}) error
func TransInsert ¶
func TransInsert(tx sqlbuilder.Tx, obj Domain) error
func TransInsertReturnId ¶
func TransInsertReturnId(tx sqlbuilder.Tx, obj Domain) (interface{}, error)
func TransSelectAllByCond ¶
func TransSelectById ¶
func TransSelectById(tx sqlbuilder.Tx, table string, id interface{}, obj interface{}) error
func TransSelectByQuery ¶
func TransSelectByQuery(tx sqlbuilder.Tx, query string, objs interface{}, args ...interface{}) error
func TransSelectCountByCond ¶
func TransSelectOneByCond ¶
func TransUpdate ¶
func TransUpdate(tx sqlbuilder.Tx, obj Domain) error
func TransUpdateSmart ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.