mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-24 21:29:00 +08:00
* 文档:补充会话上报一期后端方案 * 文档:补充会话上报管理后台方案 * 功能:实现会话上报一期后端与管理页面 * 功能:开放管理员审计清除并限制占位会话 * 功能:会话上报开关生效并增加数据库限速
33 lines
566 B
Go
33 lines
566 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
|
|
package sqlc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/jackc/pgx/v5"
|
|
"github.com/jackc/pgx/v5/pgconn"
|
|
)
|
|
|
|
type DBTX interface {
|
|
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
|
|
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
|
|
QueryRow(context.Context, string, ...interface{}) pgx.Row
|
|
}
|
|
|
|
func New(db DBTX) *Queries {
|
|
return &Queries{db: db}
|
|
}
|
|
|
|
type Queries struct {
|
|
db DBTX
|
|
}
|
|
|
|
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
|
|
return &Queries{
|
|
db: tx,
|
|
}
|
|
}
|