SQLite - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

Anyone here using SQLite with Haskell? What was your experience?

TheMatten

It seems to be "weakly" typed - at the same time, types in common DBs rarely match high-level ADTs well, and thus may need some guarded interface to achieve safety anyway
@Torsten Schmits you mean :cross_mark: as in "not recommended"? :sweat_smile:

Torsten Schmits

no, I haven't used it :grinning:

Georgi Lyubenov // googleson78

you usually make a distinct db type and domain type and convert between them, so that you don't have to have bad type representation on either side

Georgi Lyubenov // googleson78

(well more of a "bad table representation" on the db side)

TheMatten

Yeah - though when it comes to the distinction, I imagine you have to be more careful with use of SQL literals/functions, because you could easily introduce values that won't be expected by otherwise strict HS-side representation