Skip to content

Commit

Permalink
Add support for ByteStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmark committed Dec 16, 2015
1 parent db09421 commit 478a4ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Silk/Opaleye/ShowConstant.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ instance ShowConstant LazyText where
instance QueryRunnerColumnDefault LazyText LazyText where
queryRunnerColumnDefault = qrcDef

instance ShowConstant LazyByteString where
type PGRep LazyByteString = PGBytea
constant = safeCoerceFromRep . pgLazyByteString
instance QueryRunnerColumnDefault LazyByteString LazyByteString where
queryRunnerColumnDefault = qrcDef

instance ShowConstant StrictByteString where
type PGRep StrictByteString = PGBytea
constant = safeCoerceFromRep . pgStrictByteString
instance QueryRunnerColumnDefault StrictByteString StrictByteString where
queryRunnerColumnDefault = qrcDef

instance ShowConstant Int where
type PGRep Int = PGInt4
constant = safeCoerceFromRep . pgInt4
Expand Down

0 comments on commit 478a4ef

Please sign in to comment.