askalt opened a new issue, #3249:
URL: https://github.com/apache/arrow-adbc/issues/3249

   ### What happened?
   
   Version 1.7.0 is used and the following code example (uri is a global 
variable):
   
   ```
   // connect establishes a database connection.
   func connect() (*sql.DB, error) {
        dsn := fmt.Sprintf("uri=%s; username=user;password=pass", *uri)
        db, err := sql.Open("flightsql", dsn)
        if err != nil {
                return nil, fmt.Errorf("failed to open database connection: 
%v", err)
        }
        return db, nil
   }
   
   func TestExecuteNoPrepared(t * testing.T) {
        db, err := connect()
        require.NoError(t, err)
   
        rows, err := db.Query("SELECT * FROM t WHERE a = $1", 1)
        require.NoError(t, err)
   }
   ```
   
   Got:
   
   ```
   Invalid State: [Flight SQL Statement] must call Prepare before calling Bind
   ```
   
   Looks like error comes from 
https://github.com/apache/arrow-adbc/blob/c48f6fb7e206f3fd1c9d863a997726d428788d6c/go/adbc/driver/flightsql/flightsql_statement.go#L526-L530
   
   
   
   ### Stack Trace
   
   _No response_
   
   ### How can we reproduce the bug?
   
   _No response_
   
   ### Environment/Setup
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to