hasql-generate
Safe HaskellNone
LanguageGHC2021

Hasql.Generate.Class

Synopsis

Documentation

class HasDelete (a :: k) where Source #

Associated Types

type DeleteKey (a :: k) Source #

class HasEnum a where Source #

Methods

allValues :: [a] Source #

toText :: a -> Text Source #

fromText :: Text -> Maybe a Source #

class HasInsert a where Source #

Methods

insert :: a -> Session a Source #

insertMany :: [a] -> Session [a] Source #

class HasPrimaryKey a where Source #

Associated Types

type PkOf a Source #

type RawPkOf a Source #

Methods

toPk :: a -> PkOf a Source #

wrapPk :: RawPkOf a -> PkOf a Source #

unwrapPk :: PkOf a -> RawPkOf a Source #

rawPk :: a -> RawPkOf a Source #

class HasSelect a where Source #

Associated Types

type SelectKey a Source #

class HasUpdate a where Source #

Methods

update :: a -> Session (Maybe a) Source #

updateMany :: [a] -> Session [a] Source #

class HasView a where Source #

Typeclass for views — read-only relations with no primary key.

Methods

selectView :: Session [a] Source #