classy-prelude-yesod-0.1.0.0: Provide a classy prelude including common Yesod functionality.

Safe HaskellNone

ClassyPrelude.Yesod

Synopsis

Documentation

insertDB :: (PersistStore m, PersistEntity entity, PersistMonadBackend m ~ PersistEntityBackend entity) => entity -> m (Key entity)Source

Non-typeclass insert for use with Persistent.

If you don't use the Key returned from insert, the type inferencing cannot tell which insert function to use. Using insertDB disambiguates. Another options is using voidKey.

Since 0.1.0.0

voidKey :: Functor m => m (KeyBackend backend entity) -> m ()Source

Ignore the Key returned by insert.

See insertDB for more information. The following two lines are equivalent:

 _ <- insertDB foo
 voidKey $ insert foo

Since 0.1.0.0