The HDBC-mysql package

[Tags: lgpl, library]

This package provides a MySQL driver for HDBC, implemented via bindings to the C mysqlclient library.


[Skip to ReadMe]

Properties

Versions0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4.0, 0.6.4.1, 0.6.5.0, 0.6.5.1, 0.6.6.0, 0.6.6.1
Change logChangeLog
Dependenciesbase (>=2 && <5), bytestring, HDBC (>=2.1.0), time, utf8-string [details]
LicenseLGPL
Copyright2009-2010 Chris Waterson, 2011 MailRank
AuthorChris Waterson
MaintainerBryan O'Sullivan <bos@serpentine.com>
StabilityExperimental
CategoryDatabase
Home pagehttp://github.com/bos/hdbc-mysql
Bug trackerhttp://github.com/bos/hdbc-mysql/issues
Source repositoryhead: git clone http://github.com/bos/hdbc-mysql
head: hg clone http://bitbucket.org/bos/hdbc-mysql
UploadedThu Aug 30 03:40:09 UTC 2012 by BryanOSullivan
DistributionsNixOS:0.6.6.1
Downloads4128 total (132 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for HDBC-mysql-0.6.6.1

HDBC-mysql

This is a "native" HDBC driver for MySQL that makes use of libmysqlclient to communicate with a MySQL server. By way of synopsis:

import Control.Monad import Database.HDBC import Database.HDBC.MySQL main = do conn <- connectMySQL defaultMySQLConnectInfo { mysqlHost = "db1.example.com", mysqlUser = "scott", mysqlPassword = "tiger" }

        rows <- quickQuery' conn "SELECT 1 + 1" []
        forM_ rows $ \row -> putStrLn $ show row

At the moment, please consider this to be "alpha" software. As far as I can tell, it works. There are some limitations that you should be aware of.

Caveats

Testing

There's a little test program that runs a query and spews out the results. To compile it,

ghc -idist/build -L/opt/local/lib/mysql5/mysql -lmysqlclient --make Test

I'm still trying to get the Makefile right so that it can build the test sources: it's not there yet. Here's how I've been doing it, for now:

cd testsrc ghc --make -package HUnit -package HDBC -Wall -i../dist/build -i.. -L/opt/local/lib/mysql5/mysql -lmysqlclient -o runtests runtests.hs

One issue is that I want the location of the MySQL library to come from the configuration data, rather than be hard-coded.