--------------------------------------------------------------------------------

initDB :: String -> IO DB
initDB dburl = do
    db <- P.connectPostgreSQL (fromString dburl)
    let
      st = DBState
        { db' = db
        }
    return $ DB
      { execute         = execute' st
      , execute_        = execute_' st
      , query           = query' st
      , query_          = query_' st
      , query1          = query1' st
      , query1_         = query1_' st
      , withTransaction = withTransaction' st
      }
initDB :: String -> IO DB
initDB dburl = do
    db <- P.connectPostgreSQL (fromString dburl)
    let
      st = DBState
        { db' = db
        }
    return $ DB
      { execute         = execute' st
      , execute_        = execute_' st
      , query           = query' st
      , query_          = query_' st
      , query1          = query1' st
      , query1_         = query1_' st
      , withTransaction = withTransaction' st
      }
initDB dburl = do
    db <- P.connectPostgreSQL (fromString dburl)
    let
      st = DBState
        { db' = db
        }
    return $ DB
      { execute         = execute' st
      , execute_        = execute_' st
      , query           = query' st
      , query_          = query_' st
      , query1          = query1' st
      , query1_         = query1_' st
      , withTransaction = withTransaction' st
      }