@@ -43,46 +43,6 @@ func (c *ATConn) PrepareContext(ctx context.Context, query string) (driver.Stmt,
43
43
return c .Conn .PrepareContext (ctx , query )
44
44
}
45
45
46
- // QueryContext
47
- func (c * ATConn ) QueryContext (ctx context.Context , query string , args []driver.NamedValue ) (driver.Rows , error ) {
48
- if c .createOnceTxContext (ctx ) {
49
- defer func () {
50
- c .txCtx = types .NewTxCtx ()
51
- }()
52
- }
53
-
54
- ret , err := c .createNewTxOnExecIfNeed (ctx , func () (types.ExecResult , error ) {
55
- executor , err := exec .BuildExecutor (c .res .dbType , c .txCtx .TransactionMode , query )
56
- if err != nil {
57
- return nil , err
58
- }
59
-
60
- execCtx := & types.ExecContext {
61
- TxCtx : c .txCtx ,
62
- Query : query ,
63
- NamedValues : args ,
64
- Conn : c .targetConn ,
65
- DBName : c .dbName ,
66
- DbVersion : c .GetDbVersion (),
67
- IsSupportsSavepoints : true ,
68
- IsAutoCommit : c .GetAutoCommit (),
69
- }
70
-
71
- return executor .ExecWithNamedValue (ctx , execCtx ,
72
- func (ctx context.Context , query string , args []driver.NamedValue ) (types.ExecResult , error ) {
73
- ret , err := c .Conn .QueryContext (ctx , query , args )
74
- if err != nil {
75
- return nil , err
76
- }
77
- return types .NewResult (types .WithRows (ret )), nil
78
- })
79
- })
80
- if err != nil {
81
- return nil , err
82
- }
83
- return ret .GetRows (), nil
84
- }
85
-
86
46
// ExecContext
87
47
func (c * ATConn ) ExecContext (ctx context.Context , query string , args []driver.NamedValue ) (driver.Result , error ) {
88
48
if c .createOnceTxContext (ctx ) {
0 commit comments