Skip to content

Commit 1c348fa

Browse files
committed
Got code working
Signed-off-by: nithinkdb <nithin.krishnamurthi@databricks.com>
1 parent ddd0e53 commit 1c348fa

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

connection.go

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

102102
ctx = driverctx.NewContextWithConnId(ctx, c.id)
103-
if len(args) > 0 {
104-
return nil, dbsqlerrint.NewDriverError(ctx, dbsqlerr.ErrParametersNotSupported, nil)
105-
}
106103

107104
exStmtResp, opStatusResp, err := c.runQuery(ctx, query, args)
108105

@@ -143,9 +140,6 @@ func (c *conn) QueryContext(ctx context.Context, query string, args []driver.Nam
143140
msg, start := log.Track("QueryContext")
144141

145142
ctx = driverctx.NewContextWithConnId(ctx, c.id)
146-
if len(args) > 0 {
147-
return nil, dbsqlerrint.NewDriverError(ctx, dbsqlerr.ErrParametersNotSupported, nil)
148-
}
149143

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

errors/errors.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const (
1212
// Driver errors
1313
ErrNotImplemented = "not implemented"
1414
ErrTransactionsNotSupported = "transactions are not supported"
15-
ErrParametersNotSupported = "query parameters are not supported"
1615
ErrReadQueryStatus = "could not read query status"
1716
ErrSentinelTimeout = "sentinel timed out waiting for operation to complete"
1817

parameters.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const (
3535

3636
func (s SqlType) String() string {
3737
switch s {
38-
case Void:
39-
return "VOID"
4038
case String:
4139
return "STRING"
4240
case Date:
@@ -87,7 +85,7 @@ func inferTypes(params []DbSqlParam) {
8785
param.Value = strconv.FormatBool(value)
8886
param.Type = Boolean
8987
case string:
90-
param.Value = &value
88+
param.Value = value
9189
param.Type = String
9290
case int:
9391
param.Value = strconv.Itoa(value)

0 commit comments

Comments
 (0)