From c2ff3013dae995dab4904e0fa27e169abf7b1696 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Sat, 5 Mar 2022 19:32:46 -0700 Subject: [PATCH] Support DBInterface v2.5 (#187) * Support DBInterface v2.5 * uncomment tests --- .travis.yml | 70 -------------------------------------------------- Project.toml | 2 +- src/prepare.jl | 2 ++ 3 files changed, 3 insertions(+), 71 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index daffc78..0000000 --- a/.travis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# # Documentation: http://docs.travis-ci.com/user/languages/julia/ -# language: julia - -# services: -# - mysql - -# os: -# - linux -# - osx -# - windows - -# arch: -# - x64 -# - x86 - -# julia: -# - 1.0 -# - 1 -# - nightly - -# env: -# - JULIA_PROJECT="@." - -# branches: -# only: -# - master -# - gh-pages # For building documentation -# - /^testing-.*$/ # testing branches -# - /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags - -# cache: -# directories: -# - $HOME/.julia/artifacts - -# matrix: -# exclude: -# - os: osx -# arch: x86 -# - os: linux -# arch: x86 -# allow_failures: -# - julia: nightly -# include: -# - stage: "Documentation" -# julia: 1 -# os: linux -# script: -# - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.build("MySQL")' -# - julia --project=docs/ docs/make.jl -# after_success: skip - -# before_install: -# - |- -# case $TRAVIS_OS_NAME in windows) -# choco install mysql -# dir C:\\tools\\mysql -# dir C:\\tools\\mysql\\current -# dir C:\\tools\\mysql\\current\\bin -# C:\\tools\\mysql\\current\\bin\\mysqld --install -# ;; -# esac - -# before_script: -# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install mysql; brew services start mysql; fi - -# notifications: -# email: false - -# after_success: -# - julia -e 'ENV["TRAVIS_JULIA_VERSION"] == "1.3" && ENV["TRAVIS_OS_NAME"] != "linux" && exit(); using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/Project.toml b/Project.toml index be2ab81..ede4c27 100644 --- a/Project.toml +++ b/Project.toml @@ -16,7 +16,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] julia = "1" BinaryProvider = "0.5" -DBInterface = "2" +DBInterface = "2.5" Tables = "1" DecFP = "0.4.9, 0.4.10, 1" MariaDB_Connector_C_jll = "3" diff --git a/src/prepare.jl b/src/prepare.jl index bc649d8..eaa51c7 100644 --- a/src/prepare.jl +++ b/src/prepare.jl @@ -22,6 +22,8 @@ end @noinline checkstmt(stmt::Statement) = checkstmt(stmt.stmt) @noinline checkstmt(stmt::API.MYSQL_STMT) = stmt.ptr == C_NULL && error("prepared mysql statement has been closed") +DBInterface.getconnection(stmt::Statement) = stmt.conn + """ DBInterface.close!(stmt)