past my sql gap decades

joeyh at

Last time I used SQL, it was 1998, I was writing web crud that had to use the databases set up by the company's DBA, and I hated it. Things are different now!

Now, I'm doing exploratory coding in preparation for building carefully targeted sql caching code for a git databranch.

I'm using sqlite, whose author I've had some good in-person chats with(!)

I'm using persistent to automatically generate type-safe mappings between my haskell code and the database. This is not an ORM; I luckily skipped entirely over the ORM dark years and right into what is still the future for most people.

After writing one SELECT statement to be sure I remembered how, I'm using the Esqueleto DSL to write queries. This starts blowing your mind when you realize you don't need to tell it the tables to query from; that is inferred from the type of the result of your query.

Amitai Schleier likes this.

Could this be the Haskell killer app? Sounds awesome.

Claes Wallin (韋嘉誠) at 2014-03-13T18:55:24Z

That's exactly how I've always felt about about ORM.

Mark Jaroski at 2014-03-13T19:14:18Z

Wow. That Esqueleto code is nearly readable by mere mortals too.

Jeremiah C. Foster at 2014-03-17T11:43:18Z