Skip to content

Commit 340333c

Browse files
Added back in unsupported error on parameterized query
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
1 parent 57723a3 commit 340333c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

connection.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ func (c *conn) ExecContext(ctx context.Context, query string, args []driver.Name
101101
defer log.Duration(msg, start)
102102

103103
ctx = driverctx.NewContextWithConnId(ctx, c.id)
104+
if len(args) > 0 {
105+
return nil, dbsqlerrint.NewDriverError(ctx, dbsqlerr.ErrParametersNotSupported, nil)
106+
}
107+
104108
exStmtResp, opStatusResp, err := c.runQuery(ctx, query, args)
105109

106110
if exStmtResp != nil && exStmtResp.OperationHandle != nil {
@@ -140,6 +144,9 @@ func (c *conn) QueryContext(ctx context.Context, query string, args []driver.Nam
140144
msg, start := log.Track("QueryContext")
141145

142146
ctx = driverctx.NewContextWithConnId(ctx, c.id)
147+
if len(args) > 0 {
148+
return nil, dbsqlerrint.NewDriverError(ctx, dbsqlerr.ErrParametersNotSupported, nil)
149+
}
143150

144151
// first we try to get the results synchronously.
145152
// at any point in time that the context is done we must cancel and return

0 commit comments

Comments
 (0)