hpqtypes-1.5.1.1: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.PQTypes.SQL.Class

Synopsis

Documentation

data SomeSQL Source #

Container for SQL-like type storage.

Constructors

IsSQL sql => SomeSQL sql 

class Show sql => IsSQL sql where Source #

Class representing "SQLness" of a given type.

Minimal complete definition

withSQL

Methods

withSQL :: sql -> ParamAllocator -> (Ptr PGparam -> CString -> IO r) -> IO r Source #

Convert sql to libpqtypes representation and pass it to supplied continuation (usually for execution).

Instances

IsSQL SQL Source # 

Methods

withSQL :: SQL -> ParamAllocator -> (Ptr PGparam -> CString -> IO r) -> IO r Source #

(Show row, ToRow row) => IsSQL (RawSQL row) Source # 

Methods

withSQL :: RawSQL row -> ParamAllocator -> (Ptr PGparam -> CString -> IO r) -> IO r Source #

unsafeSQL :: (IsSQL sql, IsString sql) => String -> sql Source #

Convert unsafely from String to sql (Note: reckless usage of this function may introduce security vulnerabilities such as proneness to SQL injection attacks).