Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement driver.ExecerContext #137

Open
john8329 opened this issue May 26, 2019 · 5 comments
Open

Implement driver.ExecerContext #137

john8329 opened this issue May 26, 2019 · 5 comments

Comments

@john8329
Copy link

Hi, it seems that the driver doesn't implement the driver.ExecerContext interface. The Execer one is going to be deprecated soon. Apparently there is no way to cancel a request, as it is now.

@alexbrainman
Copy link
Owner

Hi, it seems that the driver doesn't implement the driver.ExecerContext interface.

It does not.

The Execer one is going to be deprecated soon.

What do you mean deprecated soon? How soon? Do you have references?

Apparently there is no way to cancel a request, as it is now.

True.

I don't need this feature. I am not planing to implement it.

Feel free to change it yourself. I will be happy to answer any questions, and review you change, if you like.

Thank you.

Alex

@john8329
Copy link
Author

// Exec executes a query that doesn't return rows, such

// as an INSERT or UPDATE.//// Deprecated: Drivers should implement StmtExecContext instead (or additionally).

Exec(args []Value) (Result, error)


From the driver.go standard interface. How soon? Ask the Go folks.
I need some deep knowledge of how ODBC works for this, and It needs time. That's why I use a library. If this becomes a critical feat, I'd be happy to try implementing it.

@alexbrainman
Copy link
Owner

```go

// Exec executes a query that doesn't return rows, such

// as an INSERT or UPDATE.

//

// Deprecated: Drivers should implement StmtExecContext instead (or additionally).

Exec(args []Value) (Result, error)


From the driver.go standard interface.

Thanks for the reference. This just says don't use Exec, if you could use StmtExecContext. But we could not use StmtExecContext, so we will use Exec for now.

How soon? Ask the Go folks.

Will do.

I need some deep knowledge of how ODBC works for this, and It needs time. That's why I use a library. If this becomes a critical feat, I'd be happy to try implementing it.

Same. I don't have spare time to spend on this. So, if you really need it, just have a go.

And I am not ODBC expert myself, I needed to access data in my MS SQL Server, so I built this.

Alex

@john8329
Copy link
Author

Please explore the driver.go file, you'll find that every call that doesn't use context.Context{} is deprecated.
I'm too no expert, and used it for FileMaker, I guess we're on the same line then.

@ninthclowd
Copy link

ninthclowd commented Mar 1, 2021

I've decided to take a stab at this and have submitted pull request #151 to add context support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants