Skip to content

Commit

Permalink
[#7] Support inserting and querying arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude authored Mar 10, 2021
1 parent e8a5c77 commit af81d82
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 60 deletions.
72 changes: 36 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -56,8 +56,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java8-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
hsqldb-linux-static:
docker:
Expand All @@ -78,9 +78,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java8-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
hsqldb-mac:
macos: {xcode: 12.0.0}
Expand Down Expand Up @@ -163,8 +163,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java8-20.3.0]
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
postgresql-linux:
docker:
Expand All @@ -185,9 +185,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -221,8 +221,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
postgresql-linux-static:
docker:
Expand All @@ -243,9 +243,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -279,8 +279,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
postgresql-mac:
macos: {xcode: 12.0.0}
Expand Down Expand Up @@ -328,8 +328,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
oracle-linux:
docker:
Expand All @@ -350,9 +350,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -386,8 +386,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
oracle-linux-static:
docker:
Expand All @@ -408,9 +408,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -444,8 +444,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
oracle-mac:
macos: {xcode: 12.0.0}
Expand Down Expand Up @@ -493,8 +493,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
mssql-linux:
docker:
Expand All @@ -515,9 +515,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -551,8 +551,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
mssql-linux-static:
docker:
Expand All @@ -573,9 +573,9 @@ jobs:
name: Install Clojure
command: |2-
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh
- run:
name: Install lsof
command: |
Expand Down Expand Up @@ -609,8 +609,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
mssql-mac:
macos: {xcode: 12.0.0}
Expand Down Expand Up @@ -658,8 +658,8 @@ jobs:
command: |
.circleci/script/release
- save_cache:
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
paths: [~/.m2, ~/graalvm-ce-java11-20.3.0]
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts: {path: /tmp/release, destination: release}
workflows:
version: 2
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ the database type, either `hsqldb`, `postgresql`, or `oracle`:

- `pod.babashka.<db>`:
- `execute!`: similar to `next.jdbc/execute!`
- `execute-one!`: similar to `next.jdbc/execute-one!`
- `get-connection`: returns connection serialized using maps with a unique identifier key
- `close-connection`: closes a connection returned from `get-connection`
- `with-transaction`: similar to `next.jdbc/with-transaction`
Expand Down
1 change: 1 addition & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}
com.opentable.components/otj-pg-embedded {:mvn/version "0.13.3"}
babashka/babashka.pods
#_{:local/root "../pods"}
{:git/url "https://github.com/babashka/babashka.pods"
:sha "a033bccaf0024b279480f2a7ac4b446621629b73"}}
:extra-paths ["test"]
Expand Down
6 changes: 3 additions & 3 deletions script/generate_circleci.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
{:restore_cache {:keys ["linux-{{ checksum \"project.clj\" }}-{{ checksum \".circleci/config.yml\" }}"]}}
{:run {:name "Install Clojure",
:command "
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
chmod +x linux-install-1.10.1.447.sh
sudo ./linux-install-1.10.1.447.sh"}}
wget https://download.clojure.org/install/linux-install-1.10.2.796.sh
chmod +x linux-install-1.10.2.796.sh
sudo ./linux-install-1.10.2.796.sh"}}
{:run {:name "Install lsof",
:command "sudo apt-get install lsof\n"}}
{:run {:name "Install native dev tools",
Expand Down
6 changes: 3 additions & 3 deletions script/install-clojure
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
install_dir=${1:-/usr/local}
mkdir -p "$install_dir"
cd /tmp
curl -O -sL https://download.clojure.org/install/clojure-tools-1.10.1.447.tar.gz
tar xzf clojure-tools-1.10.1.447.tar.gz
curl -O -sL https://download.clojure.org/install/clojure-tools-1.10.2.796.tar.gz
tar xzf clojure-tools-1.10.2.796.tar.gz
cd clojure-tools
clojure_lib_dir="$install_dir/lib/clojure"
mkdir -p "$clojure_lib_dir/libexec"
Expand All @@ -18,6 +18,6 @@ cp clojure "$install_dir/bin"
cp clj "$install_dir/bin"

cd /tmp
rm -rf clojure-tools-1.10.1.447.tar.gz
rm -rf clojure-tools-1.10.2.796.tar.gz
rm -rf clojure-tools
echo "Installed clojure to $install_dir/bin"
8 changes: 4 additions & 4 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

if [ "$POD_DB_TYPE" = "postgresql" ]
then
clojure -A:test -n pod.babashka.postgresql-test
clojure -M:test -n pod.babashka.postgresql-test
fi

if [ "$POD_DB_TYPE" = "hsqldb" ]
then
clojure -A:test -n pod.babashka.hsqldb-test
clojure -M:test -n pod.babashka.hsqldb-test
fi

if [ "$POD_DB_TYPE" = "oracle" ]
then
clojure -A:test -n pod.babashka.oracle-test
clojure -M:test -n pod.babashka.oracle-test
fi

if [ "$POD_DB_TYPE" = "mssql" ]
then
clojure -A:test -n pod.babashka.mssql-test
clojure -M:test -n pod.babashka.mssql-test
fi
Loading

0 comments on commit af81d82

Please sign in to comment.