Beam: Database Power without Template Haskell!by@james_32022
886 reads
886 reads

Beam: Database Power without Template Haskell!

by James Bowen10mJuly 14th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

As part of our <a href="https://www.mmhaskell.com/haskell-web" target="_blank">Haskell Web Series</a>, we examined the <a href="http://hackage.haskell.org/package/persistent" target="_blank">Persistent</a> and <a href="http://hackage.haskell.org/package/esqueleto" target="_blank">Esqueleto</a> libraries. The first of these allows you to create a database schema in a special syntax. You can then use Template Haskell to generate all the necessary Haskell data types and instances for your types. Even better, you can write Haskell code to query on these that resembles SQL. These queries are type-safe, which is awesome. However, the need to specify our schema with template Haskell presented some drawbacks. For instance, the code takes longer to compile and is less approachable for beginners.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Beam: Database Power without Template Haskell!
James Bowen HackerNoon profile picture
James Bowen

James Bowen

@james_32022

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite