Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud
Connecting to databases is one of the common things that developers want to do from any language. In this tutorial, we will walk you through how you can connect to SQL Server from Clojure using the clojure.java.jdbc library. Note that this tutorial can be used with databases like Oracle, Postgres, DB2 or in fact for any source you have a JDBC driver. We will be showing you all CRUD operations in this tutorial for you to get started.
library. Note that this tutorial can be used with databases like Oracle, Postgres, DB2 or in fact for any source you have a JDBC driver. We will be showing you all CRUD operations in this tutorial for you to get started.
Download Leiningen script from
chmod a+x ~/bin/lein
Execute lein, and it will download the self-install package
Install SQL Server JDBC driver by running the following command
java -jar PROGRESS_DATADIRECT_JDBC_SQLSERVER_ALL.jar
Follow through the prompts of Installer and install the driver in default path or custom path.
To add the JDBC driver to Clojure classpath, you need to add it to the Maven repository by running the following command.
Now, when you go to the maven repository, you should see the DataDirect SQL Server JDBC driver there as shown below.
lein new app <app
lein gorilla :ip
(:require [clojure.string :as str]
[clojure.java.jdbc :as j]))
ddl :pokemon [
execute! db [pokemon
multi! db :pokemon [
query db [
"SELECT * FROM pokemon"
delete! db :pokemon [
"pokemon_name = ?"
We hope this tutorial helped you to get started with using Progress DataDirect JDBC drivers with Clojure. Feel free to contact us in case of any questions or issues, we will be happy to help.
Connect any data source to any application
Discussions, tips and tricks for
DataDirect Connect drivers
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.