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

Method ambiguity error introduced in 2.3 for MySQL #32

Closed
angusmoore opened this issue Jan 14, 2021 · 2 comments · Fixed by #33
Closed

Method ambiguity error introduced in 2.3 for MySQL #32

angusmoore opened this issue Jan 14, 2021 · 2 comments · Fixed by #33

Comments

@angusmoore
Copy link

Using DBInterface 2.3.0 and MySQL 1.1.2 and executing a query that doesn't take parameters (possibly other types of queries too, this is just where I hit the ambiguity error in my code):

import DBInterface, MySQL
con = DBInterface.connect(MySQL.Connection, "0.0.0.0", "user", "password", db = "fizzbuzz")
DBInterface.execute(con, "DROP DATABASE IF EXISTS fizzbuzz;")

Results in the following method ambiguity:

ERROR: MethodError: execute(::MySQL.Connection, ::String, ::Array{Any,1}) is ambiguous. Candidates:
  execute(conn::MySQL.Connection, sql::AbstractString, params; mysql_store_result) in MySQL at /home/angus/.julia/packages/MySQL/pLoSZ/src/execute.jl:132
  execute(conn::DBInterface.Connection, sql::AbstractString, params::Union{Tuple, AbstractDict, AbstractArray{T,1} where T, NamedTuple}) in DBInterface at /home/angus/.julia/packages/DBInterface/YRJF9/src/DBInterface.jl:119
Possible fix, define
  execute(::MySQL.Connection, ::AbstractString, ::Union{Tuple, AbstractDict, AbstractArray{T,1} where T, NamedTuple})

Downgrading DBInterface to 2.2 eliminates the ambiguity error and behaves as expected.

@quinnj
Copy link
Member

quinnj commented Jan 14, 2021

Thanks for the report; this PR should fix it: #33.

@angusmoore
Copy link
Author

Amazing, thanks for the quick response @quinnj, appreciate all the work you do!

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

Successfully merging a pull request may close this issue.

2 participants