<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Jul 21, 2010 at 7:54 AM, Gour <span dir="ltr">&lt;<a href="mailto:gour@gour-nitai.com">gour@gour-nitai.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<br>
We are looking for recommendation which Haskell bindings for sqlite3<br>
to use for destkop GUI app where we want, among other things to store<br>
*.png and/or *.jpg images. (Yeah, I know about the hint to store<br>
iamges in the filesystem and just store filepaths in the db, but for<br>
portability reasons so that user can easily carry/backup database, we<br>
want everything stored in one file.)<br>
<br>
By looking at Hackage, it seems there are 3 candidates:<br>
<br>
1) sqlite - bindings by Galois<br>
(<a href="http://hackage.haskell.org/package/sqlite" target="_blank">http://hackage.haskell.org/package/sqlite</a>) - looks quite complete &amp;<br>
low-level interface<br>
<br>
2) direct-sqlite - it says &quot;It is not as complete as bindings-sqlite3 (1),<br>
but is slightly higher-level...it supports strings encoded as UTF8,<br>
and BLOBs represented as ByteStrings.&quot; and<br>
<br>
3) HDBC-sqlite3 - higher level but without support for BLOBs.<br>
<br>
<br>
Now, based on the above it looks that 2) is the best one - not<br>
high-level as 2), but adding BLOBs support which, iirc, is missing in<br>
HDBC.<br>
<br>
Otoh, having highr-level abstraction ala HDBC is nice, although at the<br>
moment we believe that we won&#39;t have need to go to PostgreSQL since it<br>
means that setup would be greatly complicated for the end-user, so<br>
we&#39;re staying focused on Sqlite3.<br>
<br>
<br>
I know there are also Takusen &amp; HSQL, but based on my past experiences<br>
when watching those two projects, it seems they aren not supported as<br>
well as the above itemized ones.<br>
<br>
Any recommendation?<br>
<br>
May I add that, according to the recent &quot;Merge hsql and HDBC -- there<br>
can only be one!&quot; thread, I can only &quot;+1&quot; for having slight less &amp;<br>
more complete database packages.<br>
<br>
<br>
Sincerely,<br>
Gour<br>
<font color="#888888"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#888888"><br></font></font></font></blockquote><div>For the sqlite backend for persistent, I took direct-sqlite and modified it slightly. I have a long history of using the sqlite3 C API, so the API felt very familiar to me.</div>
<div><br></div><div>If I&#39;m not mistaken, direct-sqlite does not build as-is on hackage because it&#39;s missing a reference to the C library. However, if you take my approach and just include the code in your library, you can fix that easily enough.</div>
<div><br></div><div>MichaelĀ </div></div></div>