[Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Johannes Waldmann
and then read with my own parse string:%Y-%m-%d %T%Q This seems to work just fine. Thanks. - When I'm using that format string, I get: Convertible: error converting source data SqlLocalTime 2008-10-29 00:00:00 of type SqlValue to type Data.Time.LocalTime.LocalTime.ZonedTime: incompatible

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Michael Snoyman
On Fri, Feb 5, 2010 at 10:55 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: and then read with my own parse string:%Y-%m-%d %T%Q This seems to work just fine. Thanks. - When I'm using that format string, I get: Convertible: error converting source data SqlLocalTime 2008-10-29

[Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Johannes Waldmann
Michael Snoyman michael at snoyman.com writes: Did you append an empty string in the SELECT statement? I did not write a SELECT statement (see first post of this thread) ... SELECTs are generated by haskelldb(-hdbc-postgresql) I have a working version now, but only by 1. changing the format

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Colin Paul Adams
Johannes == Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: Johannes Michael Snoyman michael at snoyman.com writes: Did you append an empty string in the SELECT statement? Johannes Magnus says 1. is wrong, but I don't see how the DB server Johannes could be convinced to

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Johannes Waldmann
That is exactly the problem - it is wrong for CalendarT. what do you mean by it ... what package should be fixed (old-locale, haskelldb-hdbc-postgreqsl, ...)? Because obviously something seems broken here. J. signature.asc Description: OpenPGP digital signature

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Colin Paul Adams
Johannes == Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: That is exactly the problem - it is wrong for CalendarT. Johannes what do you mean by it ... what package should be fixed Johannes (old-locale, haskelldb-hdbc-postgreqsl, ...)? Because Johannes obviously

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Johannes Waldmann
Colin Paul Adams wrote: Colin It is just the code to generate the SQL for CREATE TABLE is Colin presumably faulty. well this wouldn't help in my case since I did not CREATE TABLE from haskelldb. In my application, the DB is given externally, and I used Database.HaskellDB.DBDirect to

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-05 Thread Magnus Therning
On Fri, Feb 5, 2010 at 10:38, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: As I posted earlier, using 'T' to separate date and time is correct ISO8601 according to wikipedia[1]. So you're saying  2009-12-20 16:55:57.297 (returned by the psql server) is wrong, and it should instead

[Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Günther Schmidt
Hello Johannes, I think you are looking for HaskellDB, you can find it on hackage. I've been working with it myself and can absolutely recommend it. It is actively maintained by Justin Bailey. It's a EDSL for relational algebra which gets translated into SQL. It can use HDBC for instance as

[Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Johannes Waldmann
I think you are looking for HaskellDB, thanks, I'll look into it. As with LINQ you need to put an initial effort into describing the tables [...] according to the documentation, that's what dbdirect is for? I see the source, but not how to build it. J.

[Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Johannes Waldmann
can use HDBC for instance as its *driver* to databases supported by HDBC. ok, so I guess I need haskelldb-hdbc-postgresql but hdbc-postgresql has build failures http://hackage.haskell.org/package/HDBC-postgresql ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Ivan Lazar Miljenovic
Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: ok, so I guess I need haskelldb-hdbc-postgresql but hdbc-postgresql has build failures http://hackage.haskell.org/package/HDBC-postgresql Looks like HDBC-postgresql's Setup.hs needs to be updated to use newer versions of Cabal properly;

[Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Johannes Waldmann
if you're using the latest release of the Haskell Platform [...] but this would not work with ghc-6.12 ... Anyway the trick is to remove AnyVersion from Setup.hs (thanks, Michael!) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Felipe Lessa
On Thu, Feb 04, 2010 at 09:26:43AM +0100, Günther Schmidt wrote: I think you are looking for HaskellDB, you can find it on hackage. I've been working with it myself and can absolutely recommend it. It is actively maintained by Justin Bailey. It's been some time since I last tried HaskellDB

[Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Johannes Waldmann
anyone know what's happening here? I get this when executing a query via haskelldb-hdbc-postgresql-0.12 (The date is actually in the DB, so it's not a connection problem.) Convertible: error converting source data SqlString 2008-10-29 00:00:00 of type SqlValue to type

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Colin Paul Adams
Johannes == Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: Johannes anyone know what's happening here? I get this when Johannes executing a query via haskelldb-hdbc-postgresql-0.12 (The Johannes date is actually in the DB, so it's not a connection Johannes problem.)

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Michael Snoyman
On Thu, Feb 4, 2010 at 7:38 PM, Colin Paul Adams co...@colina.demon.co.ukwrote: Johannes == Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: Johannes anyone know what's happening here? I get this when Johannes executing a query via haskelldb-hdbc-postgresql-0.12 (The

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Johannes Waldmann
Johannes Data.Time.LocalTime.LocalTime.LocalTime: Cannot parse Johannes using default format string %Y-%m-%dT%T%Q this actually comes from the default format string that is defined in old-locale:System.Locale? iso8601DateFormat :: Maybe String - String iso8601DateFormat mTimeFmt

Re: [Haskell-cafe] Re: programmatic DB interface?

2010-02-04 Thread Magnus Therning
On 05/02/10 07:04, Johannes Waldmann wrote: Johannes Data.Time.LocalTime.LocalTime.LocalTime: Cannot parse Johannes using default format string %Y-%m-%dT%T%Q this actually comes from the default format string that is defined in old-locale:System.Locale? iso8601DateFormat