SQLDeps-0.1: Calculate db-data dependencies of functions

MaintainerAlexander Thiemann <mail@agrafix.net>
Safe HaskellNone




The core engine for keeping track of computations and their dependencies. Check the Example.hs for an example use.


Core functions

runEngine :: IConnection conn => conn -> DepsM conn a -> IO aSource

Start the frameworks engine with a given HDBC-Connection

change :: forall conn. IConnection conn => Upsert -> DepsM conn ()Source

Run an update/insert query on the database. All depending computations will be run after the update/insert is commited.

query :: IConnection conn => Select -> CompId -> DepsM conn () -> DepsM conn [[SqlValue]]Source

Run a query and register it's parent computation. Important: Keep the CompId unique for every unique computation, otherwise you will run into errors


type CompId = StringSource

Unique identifier given by the user to a computation

type DepsM conn a = RWST conn () (QueryCollection conn) IO aSource

The engines monad, keeping track of queries, dependencies, computations and the connection