|
|
|
@ -35,6 +35,24 @@ func newSqlxSrv(db *sqlx.DB) *sqlxSrv {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//lint:ignore U1000 stmtGet
|
|
|
|
|
func stmtGet[T any](stmt *sqlx.Stmt, dest *T, args ...any) error {
|
|
|
|
|
*dest = *new(T)
|
|
|
|
|
return stmt.Get(dest, args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//lint:ignore U1000 stmtGetContext
|
|
|
|
|
func stmtGetContext[T any](ctx context.Context, stmt *sqlx.Stmt, dest *T, args ...any) error {
|
|
|
|
|
*dest = *new(T)
|
|
|
|
|
return stmt.GetContext(ctx, dest, args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//lint:ignore U1000 inGet
|
|
|
|
|
func inGet[T any](q sqlx.Queryable, dest *T, query string, args ...any) error {
|
|
|
|
|
*dest = *new(T)
|
|
|
|
|
return q.InGet(dest, query, args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//lint:ignore U1000 r
|
|
|
|
|
func r(query string) string {
|
|
|
|
|
return _db.Rebind(t(query))
|
|
|
|
|