Documentation ¶
Index ¶
- Constants
- func HandleErrorRepository(errRepo error, errMsg error) error
- func InitDatabase(config *contract.Config) (*sqlx.DB, error)
- func PrepareNamed(db *sqlx.DB, query string) *sqlx.NamedStmt
- func PrepareStmt(db *sqlx.DB, query string) *sqlx.Stmt
- func PrepareStmtRebind(db *sqlx.DB, queryFmt string, args ...interface{}) *sqlx.Stmt
- func ReleaseTx(tx *sqlx.Tx, err *error)
Constants ¶
View Source
const ( DriverMySQL = "mysql" DriverPostgreSQL = "postgres" DriverMSSQL = "mssql" Null = `null` )
Variables ¶
This section is empty.
Functions ¶
func HandleErrorRepository ¶
func PrepareNamed ¶
PrepareNamed prepare sql statements with named bindvars or exit cmd if fails or error
func PrepareStmt ¶
PrepareNamed prepare sql statements with named bindvars or exit cmd if fails or error
func PrepareStmtRebind ¶
PrepareFmtRebind prepare sql statements from string format and rebind variable or exit cmd if fails or error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.