Database.HDBC.DriverUtils

HDBC-2.4.0.2: Haskell Database Connectivity

Copyright | Copyright (C) 2006 John Goerzen
License | BSD3
Maintainer | John Goerzen <jgoerzen@complete.org>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Database.HDBC.DriverUtils

Description

Utilities for database backend drivers.

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

Written by John Goerzen, jgoerzen@complete.org

Synopsis

- type ChildList = MVar [Weak Statement]
- closeAllChildren :: ChildList -> IO ()
- addChild :: ChildList -> Statement -> IO ()

# Documentation

type ChildList = MVar [Weak Statement]

closeAllChildren :: ChildList -> IO ()

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 :: ChildList -> Statement -> IO ()

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.