Skip to content
Snippets Groups Projects
Unverified Commit 20c0902e authored by Cam Saul's avatar Cam Saul
Browse files

Update driver deps [ci drivers]

parent e07bcc5b
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
[org.clojure/core.memoize "0.5.9"] ; needed by core.match; has useful FIFO, LRU, etc. caching mechanisms
[org.clojure/data.csv "0.1.3"] ; CSV parsing / generation
[org.clojure/java.classpath "0.2.3"] ; examine the Java classpath from Clojure programs
[org.clojure/java.jdbc "0.7.5"] ; basic JDBC access from Clojure
[org.clojure/java.jdbc "0.7.6"] ; basic JDBC access from Clojure
[org.clojure/math.combinatorics "0.1.4"] ; combinatorics functions
[org.clojure/math.numeric-tower "0.0.4"] ; math functions like `ceil`
[org.clojure/tools.logging "0.3.1"] ; logging framework
......@@ -38,8 +38,8 @@
[clj-time "0.13.0"] ; library for dealing with date/time
[clojurewerkz/quartzite "2.0.0"] ; scheduling library
[colorize "0.1.1" :exclusions [org.clojure/clojure]] ; string output with ANSI color codes (for logging)
[com.amazon.redshift/redshift-jdbc41-no-awssdk ; Redshift JDBC driver without embedded Amazon SDK
"1.2.8.1005"]
[com.amazon.redshift/redshift-jdbc42-no-awssdk ; Redshift JDBC driver without embedded Amazon SDK
"1.2.12.1017"]
[com.cemerick/friend "0.2.3" ; auth library
:exclusions [commons-codec
org.apache.httpcomponents/httpclient
......@@ -48,14 +48,14 @@
[com.draines/postal "2.0.2"] ; SMTP library
[com.github.brandtg/stl-java "0.1.1"] ; STL decomposition
[com.google.apis/google-api-services-analytics ; Google Analytics Java Client Library
"v3-rev142-1.23.0"]
"v3-rev154-1.23.0"]
[com.google.apis/google-api-services-bigquery ; Google BigQuery Java Client Library
"v2-rev368-1.23.0"]
"v2-rev387-1.23.0"]
[com.jcraft/jsch "0.1.54"] ; SSH client for tunnels
[com.h2database/h2 "1.4.194"] ; embedded SQL database
[com.h2database/h2 "1.4.197"] ; embedded SQL database
[com.mattbertolini/liquibase-slf4j "2.0.0"] ; Java Migrations lib
[com.mchange/c3p0 "0.9.5.2"] ; connection pooling library
[com.microsoft.sqlserver/mssql-jdbc "6.2.1.jre7"] ; SQLServer JDBC driver. TODO - Switch this to `.jre8` once we officially switch to Java 8
[com.microsoft.sqlserver/mssql-jdbc "6.4.0.jre8"] ; SQLServer JDBC driver
[com.novemberain/monger "3.1.0"] ; MongoDB Driver
[com.taoensso/nippy "2.13.0"] ; Fast serialization (i.e., GZIP) library for Clojure
[compojure "1.5.2"] ; HTTP Routing library built on Ring
......@@ -63,8 +63,9 @@
[dk.ative/docjure "1.11.0"] ; Excel export
[environ "1.1.0"] ; easy environment management
[hiccup "1.0.5"] ; HTML templating
[honeysql "0.8.2"] ; Transform Clojure data structures to SQL
[io.crate/crate-jdbc "2.1.6"] ; Crate JDBC driver
[honeysql "0.9.2" ; Transform Clojure data structures to SQL
:exclusions [org.clojure/clojurescript]]
[io.crate/crate-jdbc "2.3.0"] ; Crate JDBC driver
[io.forward/yaml "1.0.6" ; Clojure wrapper for YAML library SnakeYAML (which we already use for liquidbase)
:exclusions [org.clojure/clojure
org.yaml/snakeyaml]]
......@@ -90,7 +91,7 @@
it.unimi.dsi/fastutil]]
[org.clojars.pntblnk/clj-ldap "0.0.12"] ; LDAP client
[org.liquibase/liquibase-core "3.5.3"] ; migration management (Java lib)
[org.postgresql/postgresql "42.1.4.jre7"] ; Postgres driver
[org.postgresql/postgresql "42.2.2"] ; Postgres driver
[org.slf4j/slf4j-log4j12 "1.7.25"] ; abstraction for logging frameworks -- allows end user to plug in desired logging framework at deployment time
[org.tcrawley/dynapath "0.2.5"] ; Dynamically add Jars (e.g. Oracle or Vertica) to classpath
[org.xerial/sqlite-jdbc "3.21.0.1"] ; SQLite driver
......@@ -102,7 +103,7 @@
[ring/ring-jetty-adapter "1.6.0"] ; Ring adapter using Jetty webserver (used to run a Ring server for unit tests)
[ring/ring-json "0.4.0"] ; Ring middleware for reading/writing JSON automatically
[stencil "0.5.0"] ; Mustache templates for Clojure
[toucan "1.1.4" ; Model layer, hydration, and DB utilities
[toucan "1.1.7" ; Model layer, hydration, and DB utilities
:exclusions [honeysql]]]
:repositories [["bintray" "https://dl.bintray.com/crate/crate"] ; Repo for Crate JDBC driver
["redshift" "https://s3.amazonaws.com/redshift-driver-downloads"]]
......@@ -166,9 +167,7 @@
"-Dmb.api.key=test-api-key"
"-Duser.language=en"]}
;; build the uberjar with `lein uberjar`
:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.elide-meta=[:doc :added :file :line]" ; strip out metadata for faster load / smaller uberjar size
"-Dmanifold.disable-jvm8-primitives=true"]} ; disable Manifold Java 8 primitives (see https://github.com/ztellman/manifold#java-8-extensions)
:uberjar {:aot :all}
;; generate sample dataset with `lein generate-sample-dataset`
:generate-sample-dataset {:dependencies [[faker "0.2.2"]] ; Fake data generator -- port of Perl/Ruby library
:source-paths ["sample_dataset"]
......
(ns metabase.db.spec
"Functions for creating JDBC DB specs for a given engine.
Only databases that are supported as application DBs should have functions in this namespace;
otherwise, similar functions are only needed by drivers, and belong in those namespaces.")
Only databases that are supported as application DBs should have functions in this namespace;
otherwise, similar functions are only needed by drivers, and belong in those namespaces.")
(defn h2
"Create a database specification for a h2 database. Opts should include a key
for :db which is the path to the database file."
[{:keys [db]
:or {db "h2.db"}
:as opts}]
(merge {:classname "org.h2.Driver" ; must be in classpath
:or {db "h2.db"}
:as opts}]
(merge {:classname "org.h2.Driver"
:subprotocol "h2"
:subname db}
:subname db}
(dissoc opts :db)))
(defn postgres
......@@ -19,11 +19,11 @@
keys for :db, :user, and :password. You can also optionally set host and
port."
[{:keys [host port db]
:or {host "localhost", port 5432, db ""}
:as opts}]
(merge {:classname "org.postgresql.Driver" ; must be in classpath
:or {host "localhost", port 5432, db ""}
:as opts}]
(merge {:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname (str "//" host ":" port "/" db "?OpenSourceSubProtocolOverride=true")}
:subname (str "//" host ":" port "/" db "?OpenSourceSubProtocolOverride=true")}
(dissoc opts :host :port :db)))
(defn mysql
......@@ -31,10 +31,19 @@
for :db, :user, and :password. You can also optionally set host and port.
Delimiters are automatically set to \"`\"."
[{:keys [host port db]
:or {host "localhost", port 3306, db ""}
:as opts}]
(merge {:classname "com.mysql.jdbc.Driver" ; must be in classpath
:or {host "localhost", port 3306, db ""}
:as opts}]
(merge {:classname "com.mysql.jdbc.Driver"
:subprotocol "mysql"
:subname (str "//" host ":" port "/" db)
:delimiters "`"}
:subname (str "//" host ":" port "/" db)
:delimiters "`"}
(dissoc opts :host :port :db)))
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !! !!
;; !! Don't put database spec functions for new drivers in this namespace. These ones are only here because they !!
;; !! can also be used for the application DB in metabase.driver. Put functions like these for new drivers in the !!
;; !! driver namespace itself. !!
;; !! !!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -465,8 +465,7 @@
(key-by :id [{:id 1, :name :a} {:id 2, :name :b}]) -> {1 {:id 1, :name :a}, 2 {:id 2, :name :b}}"
{:style/indent 1}
[f coll]
(into {} (for [item coll]
{(f item) item})))
(into {} (map (juxt f identity)) coll))
(defn keyword->qualified-name
"Return keyword K as a string, including its namespace, if any (unlike `name`).
......
......@@ -209,9 +209,9 @@
(table-details (Table (:id table)))))
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !! !!
;; !! HEY! Your tests probably don't belong in this namespace! Put them in one appropriate to the specific part of !!
;; !! sync they are testing. !!
;; !! !!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !! !!
;; !! HEY! Your tests probably don't belong in this namespace! Put them in one appropriate to the specific part of !!
;; !! sync they are testing. !!
;; !! !!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(ns metabase.test.data.mysql
"Code for creating / destroying a MySQL database from a `DatabaseDefinition`."
(:require [metabase.test.data
(:require [metabase.driver.mysql :as mysql]
[metabase.test.data
[generic-sql :as generic]
[interface :as i]]
[metabase.util :as u])
(:import metabase.driver.mysql.MySQLDriver))
[metabase.util :as u]))
(def ^:private ^:const field-base-type->sql-type
{:type/BigInteger "BIGINT"
......@@ -34,7 +34,7 @@
(defn- quote-name [nm]
(str \` nm \`))
(u/strict-extend MySQLDriver
(u/strict-extend (class (mysql/->MySQLDriver))
generic/IGenericSQLTestExtensions
(merge generic/DefaultsMixin
{:database->spec (comp add-connection-params (:database->spec generic/DefaultsMixin))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment