You can subscribe to this list here.
2004 |
Jan
|
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(23) |
Jun
|
Jul
(5) |
Aug
|
Sep
(13) |
Oct
|
Nov
(10) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(18) |
Mar
|
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(1) |
Dec
(5) |
2006 |
Jan
(2) |
Feb
|
Mar
(11) |
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(14) |
Dec
(15) |
2008 |
Jan
(13) |
Feb
(3) |
Mar
(12) |
Apr
(16) |
May
(4) |
Jun
(2) |
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
(4) |
Mar
(13) |
Apr
(22) |
May
(25) |
Jun
(2) |
Jul
(10) |
Aug
(2) |
Sep
(41) |
Oct
(5) |
Nov
(9) |
Dec
|
2010 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Justin B. <jgb...@gm...> - 2010-04-01 22:02:13
|
2010/4/1 Chris Dornan <ch...@ch...>: > Is HaskellDB working with MySQL at the moment? > Hackage has a haskelldb-hdbc-mysql package, but I don't know how up-to-date it is. However, you should be able to use the haskelldb-hdbc-odbc package to connect to MySQL via unixODBC. I'm sure the maintainer of the haskelldb-hdbc-mysql package wouldn't object to patches if it's not working and you want to go that route! Out of curiosity, what is driving your decision to use HaskellDB? Justin |
From: Chris D. <ch...@ch...> - 2010-04-01 21:16:51
|
Hi everyone, I am planning to use HaskellDB to interface to MySQL in a commercial embedded Linux app (though it would be useful if it worked on Windows too). Is HaskellDB working with MySQL at the moment? Thanks, Chris |
From: Justin B. <jgb...@gm...> - 2010-02-20 19:01:06
|
I have not had a chance yet. I should be able to do it next week. If you haven't heard from me by then please go ahead with your release. On Sat, Feb 20, 2010 at 10:36 AM, Joachim Breitner <no...@de...> wrote: > Hi Justin, > > Am Donnerstag, den 28.01.2010, 12:31 +0100 schrieb Joachim Breitner: >> > > I CC’ed Justin Baily, who uploaded 0.12 to Hackage: Could you please >> > > update the driver to work with the Version 2.2.0 of HDBC? >> > >> > I've got this in my queue but it might be awhile before I get to it. >> > What problem is it causing? >> >> well, haskelldb-hdbc-sqlite is currently not installable and thus not >> usable on Debian. While not very urgent, it should be fixed within the >> next few weeks. Otherwise, it might block the transition of the new >> haskell compiler and libraries to the stable release, and will >> probably removed from the archive then. > > I’m wondering: Did you get ahead with this problem? We’d really like to > ship haskelldb-hdbc in Debian, but it needs to work with HDBC 2.2.0 and > ghc6-6.12 for that! > > Thanks, > Joachim > > -- > Joachim "nomeata" Breitner > Debian Developer > no...@de... | ICQ# 74513189 | GPG-Keyid: 4743206C > JID: no...@jo... | http://people.debian.org/~nomeata > |
From: Joachim B. <no...@de...> - 2010-02-20 18:37:00
|
Hi Justin, Am Donnerstag, den 28.01.2010, 12:31 +0100 schrieb Joachim Breitner: > > > I CC’ed Justin Baily, who uploaded 0.12 to Hackage: Could you please > > > update the driver to work with the Version 2.2.0 of HDBC? > > > > I've got this in my queue but it might be awhile before I get to it. > > What problem is it causing? > > well, haskelldb-hdbc-sqlite is currently not installable and thus not > usable on Debian. While not very urgent, it should be fixed within the > next few weeks. Otherwise, it might block the transition of the new > haskell compiler and libraries to the stable release, and will > probably removed from the archive then. I’m wondering: Did you get ahead with this problem? We’d really like to ship haskelldb-hdbc in Debian, but it needs to work with HDBC 2.2.0 and ghc6-6.12 for that! Thanks, Joachim -- Joachim "nomeata" Breitner Debian Developer no...@de... | ICQ# 74513189 | GPG-Keyid: 4743206C JID: no...@jo... | http://people.debian.org/~nomeata |
From: Justin B. <jgb...@gm...> - 2010-02-08 20:17:14
|
Sure, just let me know when the release is up on hackage. On Mon, Feb 8, 2010 at 11:43 AM, MightyByte <mig...@gm...> wrote: > Hi, > > I've just started playing with DaskellDB to interface to a Postgres database. > I'm trying to use HaskellDB on top of HDBC to generate Haskell data > structures from existing Postgres tables. My database has several > schemas, but HDBC's fgetTables only returns tables in the public > schema. I have talked with the HDBC maintainer (John Goerzen) about > this issue and he is going to issue a patch. However, > haskelldb-hdbc-postgresql depends on an older version of > HDBC-postgresql. Could haskelldb issue a version bump changing the > dependency to the new version of HDBC-postgresql when John releases > it? This would be a big help. Thanks. > > MightyByte > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: MightyByte <mig...@gm...> - 2010-02-08 19:43:40
|
Hi, I've just started playing with DaskellDB to interface to a Postgres database. I'm trying to use HaskellDB on top of HDBC to generate Haskell data structures from existing Postgres tables. My database has several schemas, but HDBC's fgetTables only returns tables in the public schema. I have talked with the HDBC maintainer (John Goerzen) about this issue and he is going to issue a patch. However, haskelldb-hdbc-postgresql depends on an older version of HDBC-postgresql. Could haskelldb issue a version bump changing the dependency to the new version of HDBC-postgresql when John releases it? This would be a big help. Thanks. MightyByte |
From: Joachim B. <no...@de...> - 2010-01-28 11:31:15
|
Hi, Am Mittwoch, den 27.01.2010, 08:40 -0800 schrieb Justin Bailey: > On Sat, Jan 23, 2010 at 8:47 AM, Joachim Breitner <no...@de...> wrote: > > Hi Brian, > > > > Am Donnerstag, den 21.01.2010, 06:56 -0800 schrieb Brian Denheyer: > >> The following packages have unmet dependencies: > >> libghc6-haskelldb-hdbc-sqlite3-dev: > >> > >> Depends: libghc6-haskelldb-hdbc-dev (>= 0.12-1) but it is not going to > >> be installed > >> > >> Depends: libghc6-haskelldb-hdbc-dev (< 0.12+) but it is not > >> going to be installed > >> > >> Depends: libghc6-hdbc-dev (< 2.1.0+) but > >> 2.2.0-2+b2 is to be installed > >> > >> Depends: libghc6-hdbc-sqlite3-dev (< > >> 2.1.0.2+) but 2.2.0.0-2+b1 is to be installed E: Broken packages > >> > >> Can you suggest a way around this ? > > > > The latest version of haskelldb-hdbc (0.12) on hackage specifies > > HDBC (>=2.0.0 && <2.2.0) > > as a build dependency. Version 2.2.0 of HDBC was uploaded to Debian on > > 2009-11-03. > > > > I CC’ed Justin Baily, who uploaded 0.12 to Hackage: Could you please > > update the driver to work with the Version 2.2.0 of HDBC? > > I've got this in my queue but it might be awhile before I get to it. > What problem is it causing? well, haskelldb-hdbc-sqlite is currently not installable and thus not usable on Debian. While not very urgent, it should be fixed within the next few weeks. Otherwise, it might block the transition of the new haskell compiler and libraries to the stable release, and will probably removed from the archive then. Thanks, Joachim -- Joachim "nomeata" Breitner Debian Developer no...@de... | ICQ# 74513189 | GPG-Keyid: 4743206C JID: no...@jo... | http://people.debian.org/~nomeata |
From: Justin B. <jgb...@gm...> - 2010-01-27 16:41:10
|
I've got this in my queue but it might be awhile before I get to it. What problem is it causing? On Sat, Jan 23, 2010 at 8:47 AM, Joachim Breitner <no...@de...> wrote: > Hi Brian, > > Am Donnerstag, den 21.01.2010, 06:56 -0800 schrieb Brian Denheyer: >> The following packages have unmet dependencies: >> libghc6-haskelldb-hdbc-sqlite3-dev: >> >> Depends: libghc6-haskelldb-hdbc-dev (>= 0.12-1) but it is not going to >> be installed >> >> Depends: libghc6-haskelldb-hdbc-dev (< 0.12+) but it is not >> going to be installed >> >> Depends: libghc6-hdbc-dev (< 2.1.0+) but >> 2.2.0-2+b2 is to be installed >> >> Depends: libghc6-hdbc-sqlite3-dev (< >> 2.1.0.2+) but 2.2.0.0-2+b1 is to be installed E: Broken packages >> >> Can you suggest a way around this ? > > The latest version of haskelldb-hdbc (0.12) on hackage specifies > HDBC (>=2.0.0 && <2.2.0) > as a build dependency. Version 2.2.0 of HDBC was uploaded to Debian on > 2009-11-03. > > I CC’ed Justin Baily, who uploaded 0.12 to Hackage: Could you please > update the driver to work with the Version 2.2.0 of HDBC? > > Thanks, > Joachim > > -- > Joachim "nomeata" Breitner > Debian Developer > no...@de... | ICQ# 74513189 | GPG-Keyid: 4743206C > JID: no...@jo... | http://people.debian.org/~nomeata > |
From: Joachim B. <no...@de...> - 2010-01-23 17:25:48
|
Hi Brian, Am Donnerstag, den 21.01.2010, 06:56 -0800 schrieb Brian Denheyer: > The following packages have unmet dependencies: > libghc6-haskelldb-hdbc-sqlite3-dev: > > Depends: libghc6-haskelldb-hdbc-dev (>= 0.12-1) but it is not going to > be installed > > Depends: libghc6-haskelldb-hdbc-dev (< 0.12+) but it is not > going to be installed > > Depends: libghc6-hdbc-dev (< 2.1.0+) but > 2.2.0-2+b2 is to be installed > > Depends: libghc6-hdbc-sqlite3-dev (< > 2.1.0.2+) but 2.2.0.0-2+b1 is to be installed E: Broken packages > > Can you suggest a way around this ? The latest version of haskelldb-hdbc (0.12) on hackage specifies HDBC (>=2.0.0 && <2.2.0) as a build dependency. Version 2.2.0 of HDBC was uploaded to Debian on 2009-11-03. I CC’ed Justin Baily, who uploaded 0.12 to Hackage: Could you please update the driver to work with the Version 2.2.0 of HDBC? Thanks, Joachim -- Joachim "nomeata" Breitner Debian Developer no...@de... | ICQ# 74513189 | GPG-Keyid: 4743206C JID: no...@jo... | http://people.debian.org/~nomeata |
From: jose.benjaminps <jos...@gm...> - 2009-11-18 15:00:22
|
Hello, Ghc 6.10.4 HaskellDB from darcs When I compile the library I got this: annie:driver-hsql benkio$ runghc Setup.hs build Preprocessing library haskelldb-hsql-0.11... Building haskelldb-hsql-0.11... [1 of 1] Compiling Database.HaskellDB.HSQL ( Database/HaskellDB/HSQL.hs, dist/build/Database/HaskellDB/HSQL.o ) Database/HaskellDB/HSQL.hs:54:6: Occurs check: cannot construct the infinite type: er = Record er In the `dbQuery' field of a record In the expression: Database {dbQuery = hsqlQuery gen connection, dbInsert = hsqlInsert gen connection, dbInsertQuery = hsqlInsertQuery gen connection, dbDelete = hsqlDelete gen connection, dbUpdate = hsqlUpdate gen connection, dbTables = hsqlTables connection, dbDescribe = hsqlDescribe connection, dbTransaction = hsqlTransaction connection, dbCreateDB = hsqlCreateDB gen connection, dbCreateTable = hsqlCreateTable gen connection, dbDropDB = hsqlDropDB gen connection, dbDropTable = hsqlDropTable gen connection} In the definition of `mkDatabase': mkDatabase gen connection = Database {dbQuery = hsqlQuery gen connection, dbInsert = hsqlInsert gen connection, dbInsertQuery = hsqlInsertQuery gen connection, dbDelete = hsqlDelete gen connection, dbUpdate = hsqlUpdate gen connection, dbTables = hsqlTables connection, dbDescribe = hsqlDescribe connection, dbTransaction = hsqlTransaction connection, dbCreateDB = hsqlCreateDB gen connection, dbCreateTable = hsqlCreateTable gen connection, dbDropDB = hsqlDropDB gen connection, dbDropTable = hsqlDropTable gen connection} Database/HaskellDB/HSQL.hs:160:0: Occurs check: cannot construct the infinite type: er = Record er When generalising the type(s) for `hsqlPrimQuery' annie:driver-hsql benkio$ thanks, -- Benjamin |
From: R. E. B. <re...@cs...> - 2009-11-15 09:56:53
|
Justin Bailey said: > On Sat, Nov 14, 2009 at 1:35 PM, R. Emre Başar <re...@cs...> > wrote: > > Thanks. I managed to get it to some level. I defined a table like: > > > > $(mkDBDirectTableWithName "LastInsertId" "Server" [("LAST_INSERT_ID()", [t|Int|])]) > > > > Nice work! Unfortunately you are right - you have to give a table > name. If the table name is irrelevant (i.e., it doesn't affect > LAST_INSERT_ID), try using information_schema.schema_catalog_name. > That's a SQL-standard table that always has one row. It's useful for a > "fake" query like this. > Unfortunately, the table name is relevant. If there is no table name, you can have an action which always produces the value of the last insert, if you use it with a table name you get the value of the last insert for a table. (this also changes the type from Int to Maybe Int since the table might not have any insertions but that's another story) It looks that the only solution is to create a last insert table for each table that I will insert. > If you are feeling adventerous, the darcs version of haskelldb has the > "func" and "literal" query operators which would let you build this > query fairly easily: > > lastInsertID = func "last_insert_id()" > > or > > lastInsertID = constant (literal "last_insert_id()") > > but it is has undergone some major changes in syntax. The underlying > Record system was shifted over to HList and the library is still very > much in flux. In any case you can find it at > > http://code.haskell.org/haskelldb > I will take a look at it. Since I have a deadline for that project, I cannot be too adventureous, but I will test the new version. Thanks. -- R. Emre Başar İstanbul Bilgi University Department of Computer Science |
From: Justin B. <jgb...@gm...> - 2009-11-14 23:45:47
|
On Sat, Nov 14, 2009 at 1:35 PM, R. Emre Başar <re...@cs...> wrote: > Thanks. I managed to get it to some level. I defined a table like: > > $(mkDBDirectTableWithName "LastInsertId" "Server" [("LAST_INSERT_ID()", [t|Int|])]) > Nice work! Unfortunately you are right - you have to give a table name. If the table name is irrelevant (i.e., it doesn't affect LAST_INSERT_ID), try using information_schema.schema_catalog_name. That's a SQL-standard table that always has one row. It's useful for a "fake" query like this. If you are feeling adventerous, the darcs version of haskelldb has the "func" and "literal" query operators which would let you build this query fairly easily: lastInsertID = func "last_insert_id()" or lastInsertID = constant (literal "last_insert_id()") but it is has undergone some major changes in syntax. The underlying Record system was shifted over to HList and the library is still very much in flux. In any case you can find it at http://code.haskell.org/haskelldb > This gives me the last insert id for a table, but the problem is it > generates an SQL like: SELECT LAST_INSERT_ID() FROM Server as T1; which > is table specific. > > Is it possible to remove the FROM clause, so that it can work on any > insert? As far as I dived into the source of HaskellDB I got the > impression that it is not possible to build queries without a FROM > component. Is that correct? > > -- > R. Emre Başar > İstanbul Bilgi University > Department of Computer Science > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFK/yKF86wLPNcWbrwRAvOVAJ9gecd4U8InxYBX0L+wfMsLWLZLugCghY6p > 5tAS994UAjwwtyNyoGwLkkU= > =e4HE > -----END PGP SIGNATURE----- > > |
From: R. E. B. <re...@cs...> - 2009-11-14 21:35:25
|
Justin Bailey der ki: > On Sat, Nov 14, 2009 at 11:55 AM, R. Emre Başar <re...@cs...> wrote: > > Or, to take an alternative approach, is it possible to define that type > > of query as a HaskellDB table? > > > > Probably that is your best approach. It will be tricky. The > haskelldb-th project might help - it has some utilities for defining > tables, etc. > Thanks. I managed to get it to some level. I defined a table like: $(mkDBDirectTableWithName "LastInsertId" "Server" [("LAST_INSERT_ID()", [t|Int|])]) This gives me the last insert id for a table, but the problem is it generates an SQL like: SELECT LAST_INSERT_ID() FROM Server as T1; which is table specific. Is it possible to remove the FROM clause, so that it can work on any insert? As far as I dived into the source of HaskellDB I got the impression that it is not possible to build queries without a FROM component. Is that correct? -- R. Emre Başar İstanbul Bilgi University Department of Computer Science |
From: Justin B. <jgb...@gm...> - 2009-11-14 20:29:40
|
On Sat, Nov 14, 2009 at 11:55 AM, R. Emre Başar <re...@cs...> wrote: > Or, to take an alternative approach, is it possible to define that type > of query as a HaskellDB table? > Probably that is your best approach. It will be tricky. The haskelldb-th project might help - it has some utilities for defining tables, etc. > Justin Bailey der ki: >> If you look at your specific database and see how to get the primary >> key back out, maybe you can run those statements within a transaction >> and get the result back (HaskellDB.Database.transaction). You may have >> more luck looking at the underlying driver (e.g., HDBC). >> >> 2009/11/14 R. Emre Başar <re...@cs...>: >> > Hi all, >> > >> > I'm developing a HaskellDB application using a console interface (with >> > HCL library). At some points, I have menus represented to the user. User >> > either selects an item from the menu (then I return the value for that >> > item) or add a new item using the "Add" option. When user adds the new >> > item, I need to be able to get a referece back to the newly inserted >> > item to use the unique id of that item throughout other parts of my >> > program. >> > >> > Is there a way to get back the value of the latest insertion? >> > >> > -- >> > R. Emre Başar >> > İstanbul Bilgi University >> > Department of Computer Science >> > > > -- > R. Emre Başar > İstanbul Bilgi University > Department of Computer Science > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFK/wsq86wLPNcWbrwRAoxRAJ9BC7Fq1zW3uEfjUpS/64Lz3dQMRACeMV5h > RxcOpYwmpuaDdDyu7ui3IP4= > =BMdT > -----END PGP SIGNATURE----- > > |
From: R. E. B. <re...@cs...> - 2009-11-14 19:55:46
|
I'm using MySQL with HSQL. MySQL supports this by executing a "SELECT LAST_INSERT_ID()" query. But AFAIK, it is not possible to execute arbitrary SQL in HaskellDB. I can do that if I can access the underlying Connection object of HSQL. Is there a standard method for accomplishing that. Or, to take an alternative approach, is it possible to define that type of query as a HaskellDB table? Justin Bailey der ki: > If you look at your specific database and see how to get the primary > key back out, maybe you can run those statements within a transaction > and get the result back (HaskellDB.Database.transaction). You may have > more luck looking at the underlying driver (e.g., HDBC). > > 2009/11/14 R. Emre Başar <re...@cs...>: > > Hi all, > > > > I'm developing a HaskellDB application using a console interface (with > > HCL library). At some points, I have menus represented to the user. User > > either selects an item from the menu (then I return the value for that > > item) or add a new item using the "Add" option. When user adds the new > > item, I need to be able to get a referece back to the newly inserted > > item to use the unique id of that item throughout other parts of my > > program. > > > > Is there a way to get back the value of the latest insertion? > > > > -- > > R. Emre Başar > > İstanbul Bilgi University > > Department of Computer Science > > -- R. Emre Başar İstanbul Bilgi University Department of Computer Science |
From: Justin B. <jgb...@gm...> - 2009-11-14 18:52:14
|
If you look at your specific database and see how to get the primary key back out, maybe you can run those statements within a transaction and get the result back (HaskellDB.Database.transaction). You may have more luck looking at the underlying driver (e.g., HDBC). 2009/11/14 R. Emre Başar <re...@cs...>: > Hi all, > > I'm developing a HaskellDB application using a console interface (with > HCL library). At some points, I have menus represented to the user. User > either selects an item from the menu (then I return the value for that > item) or add a new item using the "Add" option. When user adds the new > item, I need to be able to get a referece back to the newly inserted > item to use the unique id of that item throughout other parts of my > program. > > Is there a way to get back the value of the latest insertion? > > -- > R. Emre Başar > İstanbul Bilgi University > Department of Computer Science > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFK/uIl86wLPNcWbrwRAlTyAJsECVEteNeXeO/8oJyqTc0ZLUzHkACfVMY5 > ceHUhuU8h9/ULo5L4ZXM0DA= > =KVdS > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > > |
From: R. E. B. <re...@cs...> - 2009-11-14 17:28:32
|
Hi all, I'm developing a HaskellDB application using a console interface (with HCL library). At some points, I have menus represented to the user. User either selects an item from the menu (then I return the value for that item) or add a new item using the "Add" option. When user adds the new item, I need to be able to get a referece back to the newly inserted item to use the unique id of that item throughout other parts of my program. Is there a way to get back the value of the latest insertion? -- R. Emre Başar İstanbul Bilgi University Department of Computer Science |
From: Justin B. <jgb...@gm...> - 2009-11-02 16:10:32
|
I'd recommend sending HaskellDB questions to the haskelldb users mailing list. You do need to subscribe first. Now to your question: On Sat, Oct 31, 2009 at 2:38 AM, R. Emre Başar <re...@cs...> wrote: > Hi all, > project (Server.name << s!Server.name # > Vendor.name << v!Vendor.name # > Model.name << m!Model.name # > Server.system_id << s!Server.system_id) > This is by design. Just like in SQL, the column names are not disambiguated. If you wrote a SQL query like: select * from Server join Model on ... join Vendor on ... you would get duplicate column names. You must use unique column names in the projection. Check out the haskelldb-th package for Template Haskell utils for easily creating column names if you don't want to declare them by hand. Justin |
From: Justin B. <jgb...@gm...> - 2009-10-12 15:44:16
|
That is really slick and it sounds like it would work. UndecideableInstances are already allowed anyways. On Sun, Oct 11, 2009 at 10:47 PM, Colin Paul Adams <co...@co...> wrote: >>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes: > > Justin> Colin, HaskellDB is going to give you some complicated > Justin> type signatures - its a side-effect of using the type > Justin> system to enforce things like field membership. > > Would it be possible to exploit context synonyms (see > http://martijn.van.steenbergen.nl/journal/2009/10/11/context-synonyms/) > to automatically generate more readable (and therefore writeable) signatures? > -- > Colin Adams > Preston Lancashire > |
From: Colin P. A. <co...@co...> - 2009-10-12 05:47:40
|
>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes: Justin> Colin, HaskellDB is going to give you some complicated Justin> type signatures - its a side-effect of using the type Justin> system to enforce things like field membership. Would it be possible to exploit context synonyms (see http://martijn.van.steenbergen.nl/journal/2009/10/11/context-synonyms/) to automatically generate more readable (and therefore writeable) signatures? -- Colin Adams Preston Lancashire |
From: Colin P. A. <co...@co...> - 2009-10-01 16:24:54
|
>>>>> "Colin" == Colin Paul Adams <co...@co...> writes: >>>>> "Colin" == Colin Paul Adams <co...@co...> writes: Colin> It is just the code to generate the SQL for CREATE TABLE is Colin> presumably faulty. For CalendarTimeT columns it should Colin> generate a time of Colin> timestamp with time zone Colin> as CalendarTime is a zoned timestamp. here's my patch: --- Default.hs~ 2009-02-13 23:06:25.000000000 +0000 +++ Default.hs 2009-10-01 16:43:34.000000000 +0100 @@ -92,7 +92,7 @@ IntegerT -> SqlType "bigint" DoubleT -> SqlType "double precision" BoolT -> SqlType "bit" - CalendarTimeT -> SqlType "timestamp" + CalendarTimeT -> SqlType "timestamp with time zone" BStrT a -> SqlType1 "varchar" a -- Colin Adams Preston Lancashire |
From: Colin P. A. <co...@co...> - 2009-10-01 15:56:29
|
>>>>> "Colin" == Colin Paul Adams <co...@co...> writes: Colin> It is just the code to generate the SQL for CREATE TABLE is Colin> presumably faulty. For CalendarTimeT columns it should Colin> generate a time of Colin> timestamp with time zone Colin> as CalendarTime is a zoned timestamp. Colin> I have just checked with sqlite3 that a create table Colin> statement like this works. Unfortunately I can't use the Colin> same bodge that I used with postgresql, as ALTER TABLE in Colin> sqlite3 does not support changing column types. But I'd Colin> like to experiment with changing the code generation for Colin> this column type. Can you tell me which module this occurs Colin> in? Actually, I found it myself easily enough - it is in Sql/Defaults.hs. So I made the change and reverted to sqlite3. The table gets created OK, but the time zone does not appear in the data. So I get the same error as before. Must be a limitation of sqlite3. Still I could go back to using postgresql, without a bodge with this change. -- Colin Adams Preston Lancashire |
From: Colin P. A. <co...@co...> - 2009-10-01 15:31:36
|
>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes: Justin> On Wed, Sep 30, 2009 at 12:47 AM, Colin Paul Adams Justin> <co...@co...> wrote: >> The reason I say this, is because I tried switching from >> sqlite3 to postgresql. It doesn't work there either. But this >> time, instead of the column being of type "timestamp", it is of >> type "timestamp without time zone", which is clearly wrong, as >> CalendarTime includes timezone information. >> I looked into this yesterday and found pretty much the same thing. The Justin> HaskellDB driver interface for database connections is too Justin> ridig and doesn't allow you to specify the type you want Justin> for a DateTime column, which in turn forces the driver Justin> implementor to decide on a parsing strategy. Justin> It's an unfortunate situation, but I'm glad you found a Justin> workaround. If you feel like digging into the library to Justin> improve the API I'd be glad to help. After a bit of thought, i don't think an API change is needed for this. It is just the code to generate the SQL for CREATE TABLE is presumably faulty. For CalendarTimeT columns it should generate a time of timestamp with time zone as CalendarTime is a zoned timestamp. I have just checked with sqlite3 that a create table statement like this works. Unfortunately I can't use the same bodge that I used with postgresql, as ALTER TABLE in sqlite3 does not support changing column types. But I'd like to experiment with changing the code generation for this column type. Can you tell me which module this occurs in? Of course, this will only work if all backends support this data type, but my understanding is that this is a standard SQL type. -- Colin Adams Preston Lancashire |
From: Justin B. <jgb...@gm...> - 2009-09-30 15:24:35
|
On Wed, Sep 30, 2009 at 8:16 AM, Colin Paul Adams <co...@co...> wrote: > So I will probably get invoved soon. > When will 1.0 be released (approximately)? > -- Before the end of the year is about the best I can say. > Colin Adams > Preston Lancashire > |
From: Colin P. A. <co...@co...> - 2009-09-30 15:17:07
|
>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes: Justin> HaskellDB driver interface for database connections is too Justin> ridig and doesn't allow you to specify the type you want Justin> for a DateTime column, which in turn forces the driver Justin> implementor to decide on a parsing strategy. Justin> It's an unfortunate situation, but I'm glad you found a Justin> workaround. If you feel like digging into the library to Justin> improve the API I'd be glad to help. There's a few other areas I'd like to see developed two (such as being able to declare a column as auto-increment in DBSpec). So I will probably get invoved soon. When will 1.0 be released (approximately)? -- Colin Adams Preston Lancashire |