Documentation ¶
Index ¶
- Constants
- Variables
- func ConnectionMysql(dataSource *msystem.Mysql) *sqlx.DB
- func ConnectionSqlite3(dataSource *msystem.Sqlite3) *sqlx.DB
- func InitMysql()
- func InitSqlIte3()
- func NewInsert(tableName string, ignore ...string) *insert
- func NewSelect(tableName string) *query
- func NewUpdate(tableName string) *update
- type Counter
- type SQLExecute
- func (domain *SQLExecute) Commit() *SQLExecute
- func (domain *SQLExecute) Count(tableName string, where map[string]any) (count Counter)
- func (domain *SQLExecute) Delete(tableName string, where map[string]any) (rowsAffect int64)
- func (domain *SQLExecute) Exists(tableName string, where map[string]any) (exists bool)
- func (domain *SQLExecute) Insert(insertSql string, params ...any) (rowsAffect int64, lastId int64)
- func (domain *SQLExecute) InsertMap(tableName string, entity any) (rowsAffect int64, lastId int64)
- func (domain *SQLExecute) NotFound(tableName string, where map[string]any) (notFound bool)
- func (domain *SQLExecute) OpenTransactional() *SQLExecute
- func (domain *SQLExecute) Rollback() *SQLExecute
- func (domain *SQLExecute) SelectById(entity any, tableName string, idName string, idValue any)
- func (domain *SQLExecute) SelectList(entity any, sql string, params ...any)
- func (domain *SQLExecute) SelectPage(entity []any, query *query, searchPage mmodel.CmdPage) *mmodel.Pageable
- func (domain *SQLExecute) SelectRow(entity any, sql string, params ...any)
- func (domain *SQLExecute) Update(updateSql string, params ...any) (rowsAffect int64)
- func (domain *SQLExecute) UpdateMap(tableName string, update map[string]any, where map[string]any) (rowsAffect int64)
Constants ¶
View Source
const ShowSql = false
Variables ¶
View Source
var Insert insert
View Source
var Scan = &scan{}
View Source
var Update update
Functions ¶
func InitSqlIte3 ¶
func InitSqlIte3()
Types ¶
type SQLExecute ¶
var MySql *SQLExecute
var SqlIte3 *SQLExecute
func (*SQLExecute) Commit ¶
func (domain *SQLExecute) Commit() *SQLExecute
func (*SQLExecute) Count ¶
func (domain *SQLExecute) Count(tableName string, where map[string]any) (count Counter)
func (*SQLExecute) Delete ¶
func (domain *SQLExecute) Delete(tableName string, where map[string]any) (rowsAffect int64)
func (*SQLExecute) Exists ¶
func (domain *SQLExecute) Exists(tableName string, where map[string]any) (exists bool)
func (*SQLExecute) Insert ¶
func (domain *SQLExecute) Insert(insertSql string, params ...any) (rowsAffect int64, lastId int64)
func (*SQLExecute) InsertMap ¶
func (domain *SQLExecute) InsertMap(tableName string, entity any) (rowsAffect int64, lastId int64)
func (*SQLExecute) NotFound ¶
func (domain *SQLExecute) NotFound(tableName string, where map[string]any) (notFound bool)
func (*SQLExecute) OpenTransactional ¶
func (domain *SQLExecute) OpenTransactional() *SQLExecute
func (*SQLExecute) Rollback ¶
func (domain *SQLExecute) Rollback() *SQLExecute
func (*SQLExecute) SelectById ¶
func (domain *SQLExecute) SelectById(entity any, tableName string, idName string, idValue any)
func (*SQLExecute) SelectList ¶
func (domain *SQLExecute) SelectList(entity any, sql string, params ...any)
func (*SQLExecute) SelectPage ¶
func (*SQLExecute) SelectRow ¶
func (domain *SQLExecute) SelectRow(entity any, sql string, params ...any)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.