Documentation ¶
Index ¶
- type DbController
- func (ctrl *DbController) BindNamed(query string, arg interface{}) (string, []interface{})
- func (ctrl *DbController) Get(dest interface{}, query string, args ...interface{})
- func (ctrl *DbController) GetOrNoRow(dest interface{}, query string, args ...interface{}) bool
- func (ctrl *DbController) InTx(txCallback TxCallback)
- func (ctrl *DbController) NamedExec(query string, arg interface{}) sql.Result
- func (ctrl *DbController) NamedQuery(query string, arg interface{}) *sqlx.Rows
- func (ctrl *DbController) PrepareNamed(query string) *sqlx.NamedStmt
- func (ctrl *DbController) PrepareNamedExt(query string) *NamedStmtExt
- func (ctrl *DbController) Preparex(query string) *sqlx.Stmt
- func (ctrl *DbController) PreparexExt(query string) *StmtExt
- func (ctrl *DbController) QueryRowxAndMapScan(dest map[string]interface{}, query string, args ...interface{})
- func (ctrl *DbController) QueryRowxAndScan(query string, args []interface{}, dest ...interface{})
- func (ctrl *DbController) QueryRowxAndSliceScan(query string, args ...interface{}) []interface{}
- func (ctrl *DbController) QueryRowxAndStructScan(dest interface{}, query string, args ...interface{})
- func (ctrl *DbController) QueryRowxExt(query string, args ...interface{}) *RowExt
- func (ctrl *DbController) Queryx(query string, args ...interface{}) *sqlx.Rows
- func (ctrl *DbController) QueryxExt(query string, args ...interface{}) *RowsExt
- func (ctrl *DbController) Select(dest interface{}, query string, args ...interface{})
- func (ctrl *DbController) SelectWithFoundRows(txCallback TxCallback, paging *commonModel.Paging)
- func (ctrl *DbController) SqlxDb() *sqlx.DB
- type NamedStmtExt
- func (s *NamedStmtExt) Get(dest interface{}, arg interface{})
- func (s *NamedStmtExt) GetOrNoRow(dest interface{}, args interface{}) bool
- func (s *NamedStmtExt) QueryRowxAndMapScan(dest map[string]interface{}, args interface{})
- func (s *NamedStmtExt) QueryRowxAndScan(args []interface{}, dest ...interface{})
- func (s *NamedStmtExt) QueryRowxAndSliceScan(args interface{}) []interface{}
- func (s *NamedStmtExt) QueryRowxAndStructScan(dest interface{}, args interface{})
- func (s *NamedStmtExt) QueryRowxExt(args interface{}) *RowExt
- func (s *NamedStmtExt) Queryx(args interface{}) *sqlx.Rows
- func (s *NamedStmtExt) QueryxExt(args interface{}) *RowsExt
- func (s *NamedStmtExt) Select(dest interface{}, arg interface{})
- func (s *NamedStmtExt) SqlxNamedStmt() *sqlx.NamedStmt
- type RowExt
- type RowsExt
- type StmtExt
- func (s *StmtExt) Get(dest interface{}, args ...interface{})
- func (s *StmtExt) GetOrNoRow(dest interface{}, args ...interface{}) bool
- func (s *StmtExt) QueryRowxAndMapScan(dest map[string]interface{}, args ...interface{})
- func (s *StmtExt) QueryRowxAndScan(args []interface{}, dest ...interface{})
- func (s *StmtExt) QueryRowxAndSliceScan(args ...interface{}) []interface{}
- func (s *StmtExt) QueryRowxAndStructScan(dest interface{}, args ...interface{})
- func (s *StmtExt) QueryRowxExt(args ...interface{}) *RowExt
- func (s *StmtExt) Queryx(args ...interface{}) *sqlx.Rows
- func (s *StmtExt) QueryxExt(args ...interface{}) *RowsExt
- func (s *StmtExt) Select(dest interface{}, args ...interface{})
- func (s *StmtExt) SqlxStmt() *sqlx.Stmt
- type TxCallback
- type TxCallbackFunc
- type TxExt
- func (txExt *TxExt) BindNamed(query string, arg interface{}) (string, []interface{})
- func (txExt *TxExt) Get(dest interface{}, query string, args ...interface{})
- func (txExt *TxExt) GetOrNoRow(dest interface{}, query string, args ...interface{}) bool
- func (txExt *TxExt) NamedExec(query string, arg interface{}) sql.Result
- func (txExt *TxExt) NamedQuery(query string, arg interface{}) *sqlx.Rows
- func (txExt *TxExt) PrepareNamed(query string) *sqlx.NamedStmt
- func (txExt *TxExt) PrepareNamedExt(query string) *NamedStmtExt
- func (txExt *TxExt) Preparex(query string) *sqlx.Stmt
- func (txExt *TxExt) PreparexExt(query string) *StmtExt
- func (txExt *TxExt) QueryRowAndScan(query string, args []interface{}, dest []interface{})
- func (txExt *TxExt) QueryRowxAndMapScan(dest map[string]interface{}, query string, args ...interface{})
- func (txExt *TxExt) QueryRowxAndScan(query string, args []interface{}, dest ...interface{})
- func (txExt *TxExt) QueryRowxAndSliceScan(query string, args ...interface{}) []interface{}
- func (txExt *TxExt) QueryRowxAndStructScan(dest interface{}, query string, args ...interface{})
- func (txExt *TxExt) QueryRowxExt(query string, args ...interface{}) *RowExt
- func (txExt *TxExt) Queryx(query string, args ...interface{}) *sqlx.Rows
- func (txExt *TxExt) QueryxExt(query string, args ...interface{}) *RowsExt
- func (txExt *TxExt) Select(dest interface{}, query string, args ...interface{})
- func (txExt *TxExt) SqlxTx() *sqlx.Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbController ¶
type DbController struct {
// contains filtered or unexported fields
}
func NewDbController ¶
func NewDbController(newSqlxDb *sqlx.DB) *DbController
func (*DbController) BindNamed ¶
func (ctrl *DbController) BindNamed(query string, arg interface{}) (string, []interface{})
func (*DbController) Get ¶
func (ctrl *DbController) Get(dest interface{}, query string, args ...interface{})
func (*DbController) GetOrNoRow ¶
func (ctrl *DbController) GetOrNoRow(dest interface{}, query string, args ...interface{}) bool
func (*DbController) InTx ¶
func (ctrl *DbController) InTx(txCallback TxCallback)
Prepares transaction and feed it to callback function
func (*DbController) NamedExec ¶
func (ctrl *DbController) NamedExec(query string, arg interface{}) sql.Result
func (*DbController) NamedQuery ¶
func (ctrl *DbController) NamedQuery(query string, arg interface{}) *sqlx.Rows
func (*DbController) PrepareNamed ¶
func (ctrl *DbController) PrepareNamed(query string) *sqlx.NamedStmt
func (*DbController) PrepareNamedExt ¶
func (ctrl *DbController) PrepareNamedExt(query string) *NamedStmtExt
func (*DbController) PreparexExt ¶
func (ctrl *DbController) PreparexExt(query string) *StmtExt
func (*DbController) QueryRowxAndMapScan ¶
func (ctrl *DbController) QueryRowxAndMapScan(dest map[string]interface{}, query string, args ...interface{})
func (*DbController) QueryRowxAndScan ¶
func (ctrl *DbController) QueryRowxAndScan(query string, args []interface{}, dest ...interface{})
func (*DbController) QueryRowxAndSliceScan ¶
func (ctrl *DbController) QueryRowxAndSliceScan(query string, args ...interface{}) []interface{}
func (*DbController) QueryRowxAndStructScan ¶
func (ctrl *DbController) QueryRowxAndStructScan(dest interface{}, query string, args ...interface{})
func (*DbController) QueryRowxExt ¶
func (ctrl *DbController) QueryRowxExt(query string, args ...interface{}) *RowExt
func (*DbController) Queryx ¶
func (ctrl *DbController) Queryx(query string, args ...interface{}) *sqlx.Rows
func (*DbController) QueryxExt ¶
func (ctrl *DbController) QueryxExt(query string, args ...interface{}) *RowsExt
func (*DbController) Select ¶
func (ctrl *DbController) Select(dest interface{}, query string, args ...interface{})
func (*DbController) SelectWithFoundRows ¶
func (ctrl *DbController) SelectWithFoundRows(txCallback TxCallback, paging *commonModel.Paging)
func (*DbController) SqlxDb ¶
func (ctrl *DbController) SqlxDb() *sqlx.DB
type NamedStmtExt ¶
Extensions for *sqlx.NamedStmt
func ToNamedStmtExt ¶
func ToNamedStmtExt(stmt *sqlx.NamedStmt) *NamedStmtExt
func (*NamedStmtExt) Get ¶
func (s *NamedStmtExt) Get(dest interface{}, arg interface{})
func (*NamedStmtExt) GetOrNoRow ¶
func (s *NamedStmtExt) GetOrNoRow(dest interface{}, args interface{}) bool
func (*NamedStmtExt) QueryRowxAndMapScan ¶
func (s *NamedStmtExt) QueryRowxAndMapScan(dest map[string]interface{}, args interface{})
func (*NamedStmtExt) QueryRowxAndScan ¶
func (s *NamedStmtExt) QueryRowxAndScan(args []interface{}, dest ...interface{})
func (*NamedStmtExt) QueryRowxAndSliceScan ¶
func (s *NamedStmtExt) QueryRowxAndSliceScan(args interface{}) []interface{}
func (*NamedStmtExt) QueryRowxAndStructScan ¶
func (s *NamedStmtExt) QueryRowxAndStructScan(dest interface{}, args interface{})
func (*NamedStmtExt) QueryRowxExt ¶
func (s *NamedStmtExt) QueryRowxExt(args interface{}) *RowExt
func (*NamedStmtExt) Queryx ¶
func (s *NamedStmtExt) Queryx(args interface{}) *sqlx.Rows
func (*NamedStmtExt) QueryxExt ¶
func (s *NamedStmtExt) QueryxExt(args interface{}) *RowsExt
func (*NamedStmtExt) Select ¶
func (s *NamedStmtExt) Select(dest interface{}, arg interface{})
func (*NamedStmtExt) SqlxNamedStmt ¶
func (s *NamedStmtExt) SqlxNamedStmt() *sqlx.NamedStmt
type RowExt ¶
func (*RowExt) MapScanOrNoRow ¶
func (*RowExt) ScanOrNoRow ¶
func (*RowExt) SliceScanOrNoRow ¶
func (*RowExt) StructScanOrNoRow ¶
type RowsExt ¶
func (*RowsExt) StructScan ¶
func (r *RowsExt) StructScan(dest interface{})
type StmtExt ¶
Extensions for *sqlx.Stmt
func (*StmtExt) GetOrNoRow ¶
func (*StmtExt) QueryRowxAndMapScan ¶
func (*StmtExt) QueryRowxAndScan ¶
func (s *StmtExt) QueryRowxAndScan(args []interface{}, dest ...interface{})
func (*StmtExt) QueryRowxAndSliceScan ¶
func (s *StmtExt) QueryRowxAndSliceScan(args ...interface{}) []interface{}
func (*StmtExt) QueryRowxAndStructScan ¶
func (s *StmtExt) QueryRowxAndStructScan(dest interface{}, args ...interface{})
func (*StmtExt) QueryRowxExt ¶
type TxCallback ¶
The interface of transaction callback for sqlx package
type TxCallbackFunc ¶
The function object delegates the TxCallback interface
type TxExt ¶
Extentsion for *sqlx.Tx
func (*TxExt) GetOrNoRow ¶
func (*TxExt) PrepareNamedExt ¶
func (txExt *TxExt) PrepareNamedExt(query string) *NamedStmtExt
func (*TxExt) PreparexExt ¶
func (*TxExt) QueryRowAndScan ¶
func (*TxExt) QueryRowxAndMapScan ¶
func (*TxExt) QueryRowxAndScan ¶
func (*TxExt) QueryRowxAndSliceScan ¶
func (*TxExt) QueryRowxAndStructScan ¶
func (*TxExt) QueryRowxExt ¶
Click to show internal directories.
Click to hide internal directories.