我想從haskell訪問位於本地(mac)機器上的現有postgres數據庫。我應該使用哪個postgresql包?
我可以在hackage上看到不少postgres包。這對我來說可能是最容易使用的?
我想從haskell訪問位於本地(mac)機器上的現有postgres數據庫。我應該使用哪個postgresql包?
我可以在hackage上看到不少postgres包。這對我來說可能是最容易使用的?
postgresql-simple,綁定到libpq,是just announced,似乎有一個很好的功能集。我自己並沒有使用它(或者確實來自Haskell的PostgreSQL),但它是seems to have community support,所以如果你不想在頂層使用某個特定的庫(如HDBC或persistent),我會推薦它。
的替代品似乎是libpq(另一種結合到LIBPQ),是基於其postgre-簡單,pgsql-simple(直接實現在Haskell導線協議的),其由柱去,似乎並不準備黃金時段,但不在Hackage上。
還有一個PostgreSQL driver for HDBC; persistent庫(如Yesod中所用)的PostgreSQL backend是基於它的。
Opaleye是postgresql-simple
的更高級別替代品。它使用底層的postgresql-simple
,但提供了類型安全和可組合的API。
好的,謝謝,我會給postgresql-簡單的一個去。 – 2012-01-03 03:30:45