Fork me on GitHub
#sql
<
2019-11-16
>
seancorfield04:11:34

FYI, next.jdbc now has an optional test setup for MySQL (on master). I'm trying to figure out an easy way to run tests against MS SQL Server for free locally on a Mac. Suggestions welcome.

valerauko05:11:37

would docker work? dunno what are the requirements but there seems to be an official image https://hub.docker.com/_/microsoft-mssql-server

seancorfield06:11:56

Yeah, I spent this evening figuring out how to run SQL Server Developer Edition for Linux in Docker on macOS and now I have all the tests running for SQL Server 2019, including table-qualified names via the :result-type/`:concurrency` options "trick".

💯 4
seancorfield06:11:59

They tell you to use a strong password for the SA account but they don't tell you that the DB simply shuts down if the password isn't strong enough. Took me quite a while to figure out why I could start SQL Server but by the time I tried to connect to it, it had stopped running! Argh!

👍 4
seancorfield04:11:01

(I hadn't bothered automating tests for MySQL since that's what we use at work so it was being tested as it was developed -- but there's stuff in the test suite that's probably outside our use cases... plus I wanted to verify the Date, Instant, LocalDate, and LocalDateTime conversion stuff... and MySQL does Date out of the box but needs the optional next.jdbc.date-time namespace required for the others)

seancorfield06:11:56

Yeah, I spent this evening figuring out how to run SQL Server Developer Edition for Linux in Docker on macOS and now I have all the tests running for SQL Server 2019, including table-qualified names via the :result-type/`:concurrency` options "trick".

💯 4
seancorfield06:11:23

Current status:

Ran 253 tests containing 2295 assertions.
0 failures, 0 errors.
With automated tests against Apache Derby, H2 in memory, H2 on disk, HSQLDB, MS SQL Server, MySQL, PostgreSQL (embedded), SQLite!

parrot 12
seancorfield06:11:31

(back when I was testing clojure.java.jdbc against SQL Server Express, I did it by running Windows XP in Parallels Desktop and running SQL Server Express there... This way, with Docker, was much easier... once I figured out the SA password issue!)

seancorfield22:11:52

So, middleware is coming... https://github.com/seancorfield/next-jdbc/blob/master/src/next/jdbc/middleware.clj ...at this point I consider that stable and usable enough to put it into the codebase for the 1.0.11 release of next.jdbc. Feedback and suggestions welcome, especially on naming and data flow (e.g., how the opts map is treated by the various hooks).

seancorfield22:11:08

The next step is documentation of it all.