We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I'm using the master branch since it has the fix of batch inserts on named arguments. Still, when using a map it seems to still fail:
_, err := tx.NamedExec( "INSERT INTO state (state_id, name, created_at) VALUES (:id, :name, :time) ON DUPLICATE KEY UPDATE state_id=state_id", []map[string]interface{}{ {"id": "MX-MEX", "name": "Ciudad de México", "time": time.Now()}, {"id": "BR-SP", "name": "São Paulo", "time": time.Now()}, }, )
Seems to fail with error: sql: expected 3 arguments, got 6
sql: expected 3 arguments, got 6
Any idea why?
The text was updated successfully, but these errors were encountered:
Nothing to add here, but I just ran into this exact issue as well.
I can get the above query to run if you omit ON DUPLICATE KEY UPDATE state_id=state_id. However, I also need that same clause in my query.
ON DUPLICATE KEY UPDATE state_id=state_id
Edit: Just noticed there are a couple of other issues relating to this: #694
Sorry, something went wrong.
I have same issue. Pinned to 1.2.0 for now.
1.2.0
Hesitantly going to call this fixed with #734, which is tagged with 1.3.4
1.3.4
No branches or pull requests
Hi, I'm using the master branch since it has the fix of batch inserts on named arguments. Still, when using a map it seems to still fail:
Seems to fail with error:
sql: expected 3 arguments, got 6
Any idea why?
The text was updated successfully, but these errors were encountered: