Documentation
¶
Overview ¶
github.com/whatap/go-api/sql
github.com/whatap/go-api/sql
Index ¶
- Constants
- func CloseSqlContext(ctx *SqlCtx)
- func End(sqlCtx *SqlCtx, err error) error
- func Trace(ctx context.Context, dbhost, sql string, param []interface{}, elapsed int, ...) error
- type SqlCtx
- func NewSqlCtx() *SqlCtx
- func PoolSqlContext() *SqlCtx
- func Start(ctx context.Context, dbhost, sql string) (*SqlCtx, error)
- func StartOpen(ctx context.Context, dbhost string) (*SqlCtx, error)
- func StartWithParam(ctx context.Context, dbhost, sql string, param ...interface{}) (*SqlCtx, error)
- func StartWithParamArray(ctx context.Context, dbhost, sql string, param []interface{}) (*SqlCtx, error)
Constants ¶
View Source
const ( SQL_TYPE_DBC = 1 SQL_TYPE_SQL = 2 SQL_TYPE_SQL_PARAM = 3 SQL_PARAM_MAX_COUNT = 20 SQL_PARAM_VALUE_MAX_SIZE = 256 )
Variables ¶
This section is empty.
Functions ¶
func CloseSqlContext ¶ added in v0.2.0
func CloseSqlContext(ctx *SqlCtx)
Types ¶
type SqlCtx ¶
type SqlCtx struct { Txid int64 ServiceName string StartTime int64 Dbc string Sql string Param string Type uint8 Cpu int64 Mem int64 // contains filtered or unexported fields }
func PoolSqlContext ¶ added in v0.2.0
func PoolSqlContext() *SqlCtx
func StartWithParam ¶
func StartWithParamArray ¶
Click to show internal directories.
Click to hide internal directories.