github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/sqlDBQuery/replacement.go (about)

     1  package sqlDBQuery
     2  
     3  import (
     4  	"database/sql"
     5  	"github.com/HXSecurity/DongTai-agent-go/model/request"
     6  )
     7  
     8  func Query(db *sql.DB, query string, args ...interface{}) (*sql.Rows, error) {
     9  	rows, sql := QueryT(db, query, args...)
    10  	request.FmtHookPool(request.PoolReq{
    11  		Args:            request.Collect(query, args),
    12  		Reqs:            request.Collect(rows, sql),
    13  		Source:          false,
    14  		OriginClassName: "sql.(*DB)",
    15  		MethodName:      "Query",
    16  		ClassName:       "sql.(*DB)",
    17  	})
    18  
    19  	return rows, sql
    20  }
    21  
    22  func QueryT(db *sql.DB, query string, args ...interface{}) (*sql.Rows, error) {
    23  	return nil, nil
    24  }