Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the tradeoffs between the Haskell SQLite packages?

Tags:

sqlite

haskell

There are many Haskell SQLite bindings, which implies to me that there are many different tradeoffs on using building/using a SQLite binding. I've tried to read through the documentation of many of these packages but it became a blur after a while, and I was unable to really identify the primary tradeoffs of choosing one over another.

A search on Hackage finds:

  • direct-sqlite
  • HDBC-sqlite3
  • hdbi-sqlite
  • hsql-sqlite3
  • hsSqlite3
  • persistent-sqlite
  • simplest-sqlite
  • sql-simple-sqlite
  • sqlite
  • sqlite-simple
  • sqlite-simple-typed
  • bindings-sqlite3

Nevermind some "meta" SQLite packages. haskelldb-hdbc-sqlite3, haskelldb-hsql-sqlite3, language-sqlite, opaleye-sqlite

Hoping that someone has been able to do this successfully and can help me understand how to choose.

like image 286
Ana Avatar asked Dec 11 '15 19:12

Ana


1 Answers

I looked at the package mentioned. Some of these package are a dependency of another package (like opaleye-sqlite and sqlite-simple) depend on direct-sqlite.

Therefore, let's first look at the package that provide the actual driver. Most of them are outdated. There seem to be 3 that still have recent updates:

  • https://hackage.haskell.org/package/simplest-sqlite https://github.com/YoshikuniJujo/test_haskell/tree/master/features/ffi/sqlite3/simplest-sqlite i wouldn't use it because the repository says "It's just my private Haskell learning/testing repository."

  • https://hackage.haskell.org/package/persistent-sqlite this one is based on direct-sqlite (seems like part of the direct-sqlite has been forked)

  • The last one being the direct-sqlite package. I used this website to find which package depend on direct-sqlite. Now leaving out package that don't have the purpose of working with sqlite (such as bake: Continuous integration system). And also leaving out packages that haven't seen updates in a long time.

That leaves us with the following package that provide extra functionality based on direct-sqlite. This list includes more levels of reverse lookup to see which other package make use of the package listed below.

  • persistent-sqlite as mentioned before

  • groundhog-sqlite

  • opaleye-sqlite

  • selda-sqlite

  • sqlite-simple

    • beam-sqlite
like image 120
Flip Avatar answered Dec 02 '22 07:12

Flip