Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 7:47 AM, David Virebayre wrote: > The problem isn't with the stored procedure, it works if I call it > from the mysql client. > Right - as I mentioned in my previous note, the problem is that stored procedures and multi-statement queries can both return multiple result se

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 4:45 AM, David Virebayre wrote: > > I had trouble accessing the documentation : the last versions on > hackage have a build failure, so the doc isn't available. I don't understand why that build failure occurs. You can always build documentation for a package locally usi

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Johan Tibell
On Tue, Jun 21, 2011 at 4:47 PM, David Virebayre wrote: > The problem isn't with the stored procedure, it works if I call it > from the mysql client. Does mysql-simple support stored procedures? Johan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 16:54, Christopher Done wrote: > query conn "SHOW COLUMNS FROM ?" (Only "mytable") > > (With OverloadedStrings enabled.) Woops, that would need a type annotation. (Only ("mytable" :: Entity)) ___ Haskell-Cafe mailing list Haskell-Cafe@h

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 16:47, David Virebayre wrote: > For example, how to write a function that returns the columns of a > table using show columns ? > > type Champ = (String,String,String,String,String,String) > getColumns :: Connection -> String -> IO [Champ] > getColumns conn table = do >  query_ con

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread David Virebayre
> You can access the docs on a slightly earlier version: > http://hackage.haskell.org/package/mysql-simple-0.2.2.0 That's what I did. > The doc specifies it here: >> convertError :: [Field] -> [Maybe ByteString] -> Int -> a >> Throw a ConversionFailed exception, indicating a mismatch between the

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 13:45, David Virebayre wrote: > The very first example didn't work for me : > > {-# LANGUAGE OverloadedStrings #-} > > import Database.MySQL.Simple > > hello = do > conn <- connect defaultConnectInfo > query conn "select 2 + 2" Yeah, the first exampl

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Johan Tibell
On Tue, Jun 21, 2011 at 2:34 PM, cheater cheater wrote: > Hi, > does the package adhere to some form of standard API that works the > same way across other similar packages (different mysql drivers, > postgres, mongo, couch, etc)? > > Is there such a standard for haskell? Not at the moment. I bel

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread cheater cheater
Hi, does the package adhere to some form of standard API that works the same way across other similar packages (different mysql drivers, postgres, mongo, couch, etc)? Is there such a standard for haskell? D. On Tue, Jun 21, 2011 at 13:45, David Virebayre wrote: > 2011/5/2 Bryan O'Sullivan : >>

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread David Virebayre
2011/5/2 Bryan O'Sullivan : > Hi, folks - > Over the past few days, I've released two MySQL-related packages on Hackage > that I think should be pretty useful. > The first is mysql-simple: http://hackage.haskell.org/package/mysql-simple > This is a mid-level binding to the MySQL client API. I aimed

[Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-05-01 Thread Bryan O'Sullivan
Hi, folks - Over the past few days, I've released two MySQL-related packages on Hackage that I think should be pretty useful. The first is mysql-simple: http://hackage.haskell.org/package/mysql-simple This is a mid-level binding to the MySQL client API. I aimed it squarely at being both fast and