Fork me on GitHub
#releases
<
2024-05-15
>
isak21:05:49

pod.xledger.sql-server 1.0.0: https://github.com/xledger/pod_sql_server This babashka pod for communicating with MS SQL Server (supports integrated authentication) is now released as a dotnet tool, so it is easy to install and run:

dotnet tool install --global pod.xledger.sql_server
Then in your script:
(require '[babashka.pods :as pods])
(pods/load-pod ["pod_xledger_sql_server"])
(require '[pod.xledger.sql-server :as sql])

(println
  (sql/execute! {
     :connection-string "Data Source=my.db.host;Application Name=my.script;Initial Catalog=my_db_name;Integrated Security=True" 
     :command-text "select top 1 * from sys.objects"}))

🎉 3