[database-devel] ByteString and Text - any conventions?

Leon Smith leon.p.smith at gmail.com
Mon Aug 13 22:18:55 CEST 2012


As an aside some people (Joey Adams IIRC, maybe others) have suggested that
postgresql-simple should change the conversions so that ByteString
represents postgresql's binary blobs,  and not postgresql's text.   (And
get rid of the Binary type in the process)

This seems a perfectly reasonable suggestion to me,  though I'm not
particularly inclined to change the API either.   If you'd like to adopt
this suggestion,  be my guest.

I don't think that API compatibility between the *-simples should be high
priority;   do whatever you think is best for sqlite-simple.   Then
hopefully in a few years we'll have some well-developed database-specific
interfaces that can inform a next-generation HDBC interface.

Best,
Leon

On Mon, Aug 13, 2012 at 10:33 AM, Bryan O'Sullivan <bos at serpentine.com>wrote:

> On Sun, Aug 12, 2012 at 11:18 AM, Janne Hellsten <jjhellst at gmail.com>wrote:
>
>> I note that postgresql-simple and mysql-simple use ByteStrings
>> exclusively in the API.
>>
>
> No, that's not how they work. The underlying representation in some places
> might be a ByteString, but the actual APIs don't use ByteStrings, they go
> through typeclasses.
>
>
> http://hackage.haskell.org/packages/archive/mysql-simple/latest/doc/html/Database-MySQL-Simple-Param.html
>
> _______________________________________________
> database-devel mailing list
> database-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/database-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/database-devel/attachments/20120813/773136f3/attachment.htm>


More information about the database-devel mailing list