Skip to content

Commit

Permalink
Big rewrite of package (#263)
Browse files Browse the repository at this point in the history
* Big rewrite of package

Some of the big changes include:
  * This will be a breaking, 1.0 release
  * Use of BinaryBuilder for source driver managers
  * Streamlines resultset fetching process supporting super-efficient
  direct column fetching for native types
  * More robust/useful statement preparation and parameter binding by
  conforming to the `DBInterface` interface
  * Moving the package to own it's own config; the aim here is to cut
  down on all the crazy config stuff available across the various driver
  managers and attempt to keep it close and sane; additional methods for
  adding/getting/deleting drivers and datasources have been added
  * Enhance debugging capabilities via `ODBC.setdebug` and passing
  `debug=true` when executing statements.
  • Loading branch information
quinnj committed May 23, 2020
1 parent b8271f1 commit a8b1148
Show file tree
Hide file tree
Showing 35 changed files with 1,813 additions and 77,501 deletions.
78 changes: 52 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,73 @@
dist: trusty
# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia

sudo: false

addons:
apt:
packages:
- unixodbc
- unixodbc-dev
- libmyodbc
- libsqliteodbc
- odbc-postgresql
services:
- mysql

os:
- linux
- osx
- windows

arch:
- x64
#- x86

julia:
- 1.0
- 1.3
- 1.4
- nightly

env:
- ODBC_TEST_DRIVERS="mysql, postgresql"
- JULIA_PROJECT="@."

matrix:
fast_finish: true
exclude:
- os: osx
arch: x86
- os: windows
arch: x86
allow_failures:
- julia: nightly
- julia: nightly
include:
- stage: "Documentation"
julia: 1.4
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.build("ODBC")'
- julia --project=docs/ docs/make.jl
after_success: skip

services:
- mysql
- postgresql
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

before_install:
- cp ./test/setup/.odbcinst.ini $HOME
- odbcinst -i -s -h -f ./test/setup/mysqltest.odbc.ini
- odbcinst -i -s -h -f ./test/setup/postgresqltest.odbc.ini
- odbcinst -i -s -h -f ./test/setup/mssqltest.odbc.ini
- echo -e "\n[odbc]\nlocal-infile=1\n" >> $HOME/.my.cnf
- |-
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
choco install lessmsi
;;
esac
before_script:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install mysql; brew services start mysql; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then curl -O https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.7/mariadb-connector-odbc-3.1.7-ga-debian-x86_64.tar.gz; mkdir mariadb64; tar xfz mariadb-connector-odbc-3.1.7-ga-debian-x86_64.tar.gz -C mariadb64; curl -O https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.7/mariadb-connector-odbc-3.1.7-ga-debian-i686.tar.gz; mkdir mariadb32; tar xfz mariadb-connector-odbc-3.1.7-ga-debian-i686.tar.gz -C mariadb32; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then curl -O https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.7/mariadb-connector-odbc-3.1.7-win64.msi; echo 'making dir'; mkdir /c/mariadb64; echo 'msiexecing'; lessmsi x mariadb-connector-odbc-3.1.7-win64.msi; fi

notifications:
email: false

after_success:
- julia -e 'using Pkg; cd(Pkg.dir("ODBC")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
- julia -e 'using Pkg; Pkg.add("Documenter")'
- julia -e 'using Pkg; cd(Pkg.dir("ODBC")); include(joinpath("docs", "make.jl"))'
- 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())'
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ODBC.jl is licensed under the MIT License:

Copyright (c) 2013: Jacob Quinn
Copyright (c) 2013-2020: Jacob Quinn and JuliaData GitHub organization

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 12 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name = "ODBC"
uuid = "be6f12e9-ca4f-5eb2-a339-a4f995cc0291"
version = "0.9.0"
version = "1.0.0"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"
DecFP = "55939f99-70c6-5e9b-8bb0-5071ed7d61fd"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
WeakRefStrings = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
iODBC_jll = "80337aba-e645-5151-a517-44b13a626b79"
unixODBC_jll = "1841a5aa-d9e2-579c-8226-32ed2af93ab1"

[compat]
CategoricalArrays = "0.7"
DataFrames = "0.20"
DecFP = "0.4"
DBInterface = "2"
DecFP = "0.4.10"
Tables = "1"
WeakRefStrings = "0.6"
iODBC_jll = "3.52"
unixODBC_jll = "2.3"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
MariaDB_Connector_ODBC_jll = "1124d457-72a3-5205-9757-36a127c7d0f8"
MariaDB_Connector_C_jll = "aabc7e14-95f1-5e66-9f32-aea603782360"

[targets]
test = ["Test"]
test = ["Test", "MariaDB_Connector_ODBC_jll", "MariaDB_Connector_C_jll"]
5 changes: 5 additions & 0 deletions config/odbc.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[ODBC Data Sources]

[ODBC]
Trace = 0
TraceFile = stderr
1 change: 1 addition & 0 deletions config/odbcinst.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ODBC Drivers]
6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ODBC = "be6f12e9-ca4f-5eb2-a339-a4f995cc0291"

[compat]
Documenter = "~0.22"
18 changes: 0 additions & 18 deletions docs/build/assets/Documenter.css

This file was deleted.

25 changes: 0 additions & 25 deletions docs/build/assets/mathjaxhelper.js

This file was deleted.

Empty file removed docs/build/index.md
Empty file.
7 changes: 1 addition & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ using Documenter, ODBC

makedocs(
modules = [ODBC],
format = :html,
sitename = "ODBC.jl",
pages = ["Home" => "index.md"]
)

deploydocs(
repo = "github.com/JuliaDatabases/ODBC.jl.git",
target = "build",
deps = nothing,
make = nothing,
julia = "0.5",
osname = "linux"
target = "build"
)
29 changes: 0 additions & 29 deletions docs/mkdocs.yml

This file was deleted.

0 comments on commit a8b1148

Please sign in to comment.