This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns metabase.driver.sparksql-connection-test | |
(:require [clojure.java.jdbc :as jdbc] | |
[clojure.test :refer :all])) | |
(deftest connection-test | |
(println (pr-str (Class/forName "org.apache.hive.jdbc.HiveConnection"))) | |
(is (some? (Class/forName "org.apache.hive.jdbc.HiveConnection"))) | |
(println (pr-str (require 'metabase.driver.hive-like.fixed-hive-connection))) | |
(is (nil? (require 'metabase.driver.hive-like.fixed-hive-connection))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns metabase.db.liquibase.h2 | |
"Loading this namespace will replace the default `H2Database` implementation with our custom subclass that uppercases | |
all identifiers." | |
(:require [metabase.util :as u] | |
[clojure.string :as str]) | |
(:import liquibase.database.DatabaseFactory | |
liquibase.database.jvm.JdbcConnection | |
liquibase.change.ChangeMetaData | |
liquibase.change.core.CreateTableChange | |
liquibase.change.ChangeFactory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns asm | |
(:import liquibase.database.core.H2Database | |
liquibase.database.jvm.JdbcConnection | |
[org.objectweb.asm Opcodes ClassWriter Type] | |
[org.objectweb.asm.commons Method GeneratorAdapter])) | |
(defn x ^ClassWriter [] | |
(let [flags 0 | |
classwriter (org.objectweb.asm.ClassWriter. flags)] | |
;; define the Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns metabase.public-settings.premium-features.defenterprise | |
(:require [clojure.string :as str] | |
[metabase.plugins.classloader :as classloader] | |
[metabase.public-settings.premium-features :as premium-features] | |
[metabase.util :as u])) | |
;;; Map of (qualified) function name -> {:oss <oss/fallback fn> | |
;;; :ee <ee fn>} | |
(defonce ^:private registry | |
(atom {})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns metabase.x | |
(:require [clojure.test :refer :all] | |
dev.debug-qp | |
[metabase.models.database :refer [Database]] | |
[metabase.query-processor :as qp] | |
[metabase.test :as mt] | |
[metabase.query-processor.context :as qp.context] | |
[metabase.query-processor.context.default :as context.default] | |
[clojure.pprint :as pprint] | |
[metabase.driver.sql.query-processor :as sql.qp] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftest custom-unify-methods | |
(is (≈ {[String java.time.temporal.Temporal] | |
(fn [_next-method expected actual] | |
(let [actual-str (u.date/format actual)] | |
(when-not (= expected actual-str) | |
(list 'not= expected (symbol "#t") actual-str))))} | |
"2022-07-14" | |
#t "2022-07-14")) | |
(is (≈ {[String String] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>Athena</groupId> | |
<artifactId>AthenaJDBC${env.JDBC_V}</artifactId> | |
<version>${env.MAJOR_V}.${env.MINOR_V}.${env.REVISION_V}.${env.BUILD_V}</version> | |
<packaging>jar</packaging> | |
<name>AthenaJDBC${env.JDBC_V}</name> | |
<url>http://maven.apache.org</url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns metabase.x | |
(:require | |
[metabase.sync :as sync] | |
[toucan.db :as db])) | |
(defmulti ^:private info | |
{:arglists '([location])} | |
keyword) | |
(defmethod info :jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns waterfront.db | |
(:require | |
[waterfront.config :as config] | |
[waterfront.db.migrations :as db.migrations] | |
[toucan.db :as t.db]) | |
(:import | |
(com.mchange.v2.c3p0 DataSources))) | |
(set! *warn-on-reflection* true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS checkins; | |
DROP TABLE IF EXISTS venues; | |
DROP TABLE IF EXISTS categories; | |
DROP TABLE IF EXISTS users; | |
CREATE TABLE users ( | |
id serial PRIMARY KEY NOT NULL, |