persistent-0.6.4: Type-safe, non-relational, multi-backend persistence.

Database.Persist.GenericSql

Description

This is a helper module for creating SQL backends. Regular users do not need to use this module.

Synopsis

Documentation

type Migration m = WriterT [Text] (WriterT CautiousMigration m) ()Source

parseMigration :: Monad m => Migration m -> m (Either [Text] CautiousMigration)Source

parseMigration' :: Monad m => Migration m -> m CautiousMigrationSource

runMigrationSilent :: MonadControlIO m => Migration (SqlPersist m) -> SqlPersist m [Text]Source

Same as runMigration, but returns a list of the SQL commands executed instead of printing them to stderr.

commit :: MonadIO m => SqlPersist m ()Source

Perform a database commit.

rollback :: MonadIO m => SqlPersist m ()Source

Perform a database rollback.

newtype Key backend entity Source

Constructors

Key 

Fields

unKey :: PersistValue
 

Instances

Eq (Key backend entity) 
Ord (Key backend entity) 
Read (Key backend entity) 
Show (Key backend entity) 
SinglePiece (Key SqlPersist entity) 
PersistField (Key backend entity)