hdbi-1.0.0: Haskell Database Independent interface

Portabilityportable
Stabilityexperimental
MaintainerAleksey Uymanov <s9gf4ult@gmail.com>
Safe HaskellNone

Database.HDBI.DriverUtils

Description

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

Utilities for database backend drivers.

Please note: this module is intended for authors of database driver libraries only. Authors of applications using HDBI should use HDBI exclusively.

type ChildList stmt = MVar [Weak stmt]Source

List of weak pointers to childs with concurrent access

closeAllChildren :: Statement stmt => ChildList stmt -> IO ()Source

Close all children. Intended to be called by the disconnect function in Connection.

There may be a potential race condition wherein a call to newSth at the same time as a call to this function may result in the new child not being closed.

addChild :: Statement stmt => ChildList stmt -> stmt -> IO ()Source

Adds a new child to the existing list. Also takes care of registering a finalizer for it, to remove it from the list when possible.

newChildList :: IO (ChildList stmt)Source

new empty child list