-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Backend for the persistent library using mongoDB.
--
-- Backend for the persistent library using mongoDB.
@package persistent-mongoDB
@version 0.3.0
-- | A redis backend for persistent.
module Database.Persist.MongoDB
data MongoDBReader m a
withMongoDBConn :: (MonadIO m, Applicative m) => t -> HostName -> (ConnPool Host -> t -> m b) -> m b
runMongoDBConn :: (Service s, MonadIO m) => MongoDBReader m b -> WriteMode -> MasterOrSlaveOk -> ConnPool s -> Database -> m b
-- | Either a host name e.g., "haskell.org" or a numeric host
-- address string consisting of a dotted decimal IPv4 address or an IPv6
-- address e.g., "192.168.0.1".
type HostName = String
-- | A raw value which can be stored in any backend and can be marshalled
-- to and from a PersistField.
data PersistValue :: *
PersistText :: Text -> PersistValue
PersistByteString :: ByteString -> PersistValue
PersistInt64 :: Int64 -> PersistValue
PersistDouble :: Double -> PersistValue
PersistBool :: Bool -> PersistValue
PersistDay :: Day -> PersistValue
PersistTimeOfDay :: TimeOfDay -> PersistValue
PersistUTCTime :: UTCTime -> PersistValue
PersistNull :: PersistValue
PersistList :: [PersistValue] -> PersistValue
PersistMap :: [(Text, PersistValue)] -> PersistValue
-- | intended especially for MongoDB backend. FIXME: rename to
-- PersistObjectId
PersistForeignKey :: ByteString -> PersistValue
instance Typeable MongoDBException
instance Monad m => Monad (MongoDBReader m)
instance MonadIO m => MonadIO (MongoDBReader m)
instance Functor m => Functor (MongoDBReader m)
instance (Monad m, Functor m) => Applicative (MongoDBReader m)
instance Show MongoDBException
instance Serialize ObjectId
instance Val PersistValue
instance (MonadIO m, Functor m) => PersistBackend (MongoDBReader m)
instance Exception MongoDBException
instance Monad m => Throw Failure (MongoDBReader m)
instance Monad m => Context WriteMode (MongoDBReader m)
instance Monad m => Context Pipe (MongoDBReader m)
instance Monad m => Context MasterOrSlaveOk (MongoDBReader m)
instance Monad m => Context Database (MongoDBReader m)