hpqtypes-1.2.3: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell98

Database.PostgreSQL.PQTypes.SQL.Raw

Synopsis

Documentation

data RawSQL row Source

Form of SQL query which is very close to libpqtypes specific representation. Note that, in particular, RawSQL () is isomorphic (modulo bottom) to ByteString.

Instances

Eq row => Eq (RawSQL row) 
Ord row => Ord (RawSQL row) 
Show row => Show (RawSQL row) 
IsString (RawSQL ())

Construct RawSQL () from String. The underlying ByteString will be encoded as UTF-8, so if you are working with a different encoding, you should not rely on this instance.

Monoid (RawSQL ()) 
(Show row, ToRow row) => IsSQL (RawSQL row) 
SpaceMonoid (RawSQL ()) 

rawSQL :: (Show row, ToRow row) => ByteString -> row -> RawSQL row Source

Construct RawSQL from ByteString and a tuple of parameters.

unRawSQL :: RawSQL () -> ByteString Source

Take query string out of RawSQL ().