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: Guenther S. <gue...@we...> - 2009-05-01 17:04:18
|
Hi guys, I can honestly say that I don't have a clue on how to use it. Or rather where to place it. Or rather to use it to actually get a "select distinct". Whenever I did use it, it always grouped at the innermost level. How can you determine the level *where* the grouping takes place? Günther |
From: Justin B. <jgb...@gm...> - 2009-05-01 14:53:12
|
In short, no. That is really dependent on the underlying database library more than haskellDB. You might want to look at Takusen for safe, constant-resource queries. On Fri, May 1, 2009 at 3:37 AM, Guenther Schmidt <gue...@we...> wrote: > Hi all, > > is it possible to create a "lazy" version of query? > > Günther > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-05-01 10:37:17
|
Hi all, is it possible to create a "lazy" version of query? Günther |
From: Bjorn B. <bj...@br...> - 2009-04-27 07:55:51
|
How about the 'minus' function? /Bjorn On Sat, Apr 25, 2009 at 10:47, Guenther Schmidt <gue...@we...> wrote: > Hi guys, > > I have this problem which I don't know how to solve: > > I need to do something with records in one table whose Id is *not* > present in another table like > > testqry = do > l1 <- table leistungIndices > l2 <- table leistungIndices > p <- table procedureCnts > restrict (l1!caseId .<>. p!caseId) > restrict (l1!caseId .==. p!caseId) > restrict (l1!caseId .==. l2!caseId) > project (caseId << l1!caseId > # fabId << l1!fabId > # opLstgIdx << l1!opLstgIdx > # opLstgIdxFab << _sum (l2!opLstgIdx)) > > which blows up because of the 1st restrict. > > How can I express this properly? > > Günther > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-25 09:47:48
|
Hi guys, I have this problem which I don't know how to solve: I need to do something with records in one table whose Id is *not* present in another table like testqry = do l1 <- table leistungIndices l2 <- table leistungIndices p <- table procedureCnts restrict (l1!caseId .<>. p!caseId) restrict (l1!caseId .==. p!caseId) restrict (l1!caseId .==. l2!caseId) project (caseId << l1!caseId # fabId << l1!fabId # opLstgIdx << l1!opLstgIdx # opLstgIdxFab << _sum (l2!opLstgIdx)) which blows up because of the 1st restrict. How can I express this properly? Günther |
From: Bjorn B. <bj...@br...> - 2009-04-20 16:23:54
|
Normal Haskell parantheses should do it. /Bjorn On Sun, Apr 12, 2009 at 02:15, Guenther Schmidt <gue...@we...> wrote: > Hi, > > I have a rather complicated arithmetic expression, and I need to make > sure that parts of the arithmetic expression are parenthesized. > > How can I do that? > > Günther > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-16 12:32:03
|
Hi all, I'm trying to debug the program, so I copied the haskelldb modules (the database directory) to a location within my app in order for my app to use the interpreted code. However ghci complains about some extensions missing and I can't figure out which particular ones those are. Günther |
From: Justin B. <jgb...@gm...> - 2009-04-15 18:07:01
|
On Wed, Apr 15, 2009 at 8:58 AM, Guenther Schmidt <gue...@we...> wrote: > I'm just wondering what I did that would eventually cause it in the first > place. > Ah, I see now. If you look at Sql.hs, you can see attrs is defined as a selector function on SqlSelect values. If attrs is applied to some other value of that type (SqlBin, for example), then you would see this error. I suspect it's a bug and if you can isolate it (with dummy table definitions) that would help a lot. > Would you happen to have some brief example of how to do intersect, union or > minus properly? > I don't unfortunately. Justin |
From: Guenther S. <gue...@we...> - 2009-04-15 15:58:47
|
Hi Justin, the explanation, I believe, is found here: http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html#t%3ARecSelError I'm just wondering what I did that would eventually cause it in the first place. Quite possible I construct my code, ie the Query (Rel whatever) in a way, or in an order, that does compile but throws a runtime error nevertheless. I'm using ghc 6.10. Would you happen to have some brief example of how to do intersect, union or minus properly? Günther Justin Bailey schrieb: > I don't see a place in the source where that exception is thrown > (grepping for variations on the error string didn't give me anything). > Are you sure it's HaskellDB? > > On Wed, Apr 15, 2009 at 8:17 AM, Guenther Schmidt <gue...@we...> wrote: > >> Hi all, >> >> I get this error >> >> Exception: No match in record selector Database.HaskellDB.Sql.attrs >> >> in some cases when I do union, intersection or minus. >> >> What does that mean? >> >> Günther >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Haskelldb-users mailing list >> Has...@li... >> https://lists.sourceforge.net/lists/listinfo/haskelldb-users >> >> |
From: Justin B. <jgb...@gm...> - 2009-04-15 15:46:23
|
I don't see a place in the source where that exception is thrown (grepping for variations on the error string didn't give me anything). Are you sure it's HaskellDB? On Wed, Apr 15, 2009 at 8:17 AM, Guenther Schmidt <gue...@we...> wrote: > Hi all, > > I get this error > > Exception: No match in record selector Database.HaskellDB.Sql.attrs > > in some cases when I do union, intersection or minus. > > What does that mean? > > Günther > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-15 15:17:50
|
Hi all, I get this error Exception: No match in record selector Database.HaskellDB.Sql.attrs in some cases when I do union, intersection or minus. What does that mean? Günther |
From: Guenther S. <gue...@we...> - 2009-04-13 02:26:52
|
Hi, I'm trying to select records whose caseId are *not* present in another table. I did a `minus` thingy on the caseIds but then the restrict clause causes a run-time "No match in record selector" and that spoils the fun. How *can* I select records that are not present in another table? Günther Justin, haskelldb-users, is that currently just you and me? nonProcs = do r <- table casesWithRGs p <- table procedureCnts n <- (project (caseId << r!caseId)) `minus` (project (caseId << p!caseId)) l <- table leistungIndices restrict (n!caseId .==. l!caseId) project (caseId << l!caseId # dummyDouble << _sum (l!opLstgIdx)) |
From: Guenther S. <gue...@we...> - 2009-04-12 01:15:55
|
Hi, I have a rather complicated arithmetic expression, and I need to make sure that parts of the arithmetic expression are parenthesized. How can I do that? Günther |
From: Justin B. <jgb...@gm...> - 2009-04-11 23:41:06
|
Yes, use the "unique" function. On Sat, Apr 11, 2009 at 2:32 PM, Guenther Schmidt <gue...@we...> wrote: > Hi all, > > I'm sorry, I read somewhere that Select Distinct is by default turned > off now, can't remember where though. > > I have one query though, where I certainly would like to turn it on, > does that possibility still exist? > > Günther > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-11 23:06:43
|
Hi all, I keep insisting that the SQL generated is obviously wrong, has to be, because the query takes way too long. Eventually I find out how to index the table properly and as soon as I do it right, surprise, surprise it works. Um. Just about the 4th time now, I have a few more, don't I? Günther |
From: Guenther S. <gue...@we...> - 2009-04-11 21:33:03
|
Hi all, I'm sorry, I read somewhere that Select Distinct is by default turned off now, can't remember where though. I have one query though, where I certainly would like to turn it on, does that possibility still exist? Günther |
From: Justin B. <jgb...@gm...> - 2009-04-10 16:13:55
|
All, I've just uploaded a set of Template Haskell utilities that make working with HaskellDB simpler. Download ======= http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskelldb-th Repository ======== http://patch-tag.com/publicrepos/haskelldb-th Motivation ======= Because HaskellDB depends on statically typed tables and fields, normally you need to generate Haskell source from your database. This can be painful and makes simple scripts or tests hard to write. This package allows you to define tables, fields, and records using TH syntax, and HaskellDB can import those modules just like any other Haskell source. Examples ======= Two examples from the docs are given below, first for mkDBDirectTable and then for mkRecord. mkDBDirectTable will create a table definition with appropriate field definitions. From the haddock docs: -- | Creates definitions for a table and all its fields in the style of DBDirect. -- Takes a table name and a list of fields (as types). Generates -- a table type and a function to construct the table. The function -- will be the tablename in lower case. The type alias will -- be the table name with the first character capitalized. -- -- For example: -- -- > mkDBDirectTable "Table1" [("Col1", [t|Int|]) -- > , ("Col2", [t|Bool|])] -- -- Will produce -- -- > type Table1 = (RecCons Col1 (Expr Int) -- > (RecCons Col2 (Expr Bool))) -- > -- > table1 :: Table Table1 -- > table1 = baseTable "Table1" $ -- > hdbMakeEntry Col1 # -- > hdbMakeEntry Col2 -- > -- > data Col1 = Col1 -- > instance FieldTag Col1 where fieldName _ = "col1" -- > col1 :: Attr Col1 Int -- > col1 = mkAttr Col1 -- > -- > data Col2 = Col2 -- > instance FieldTag Col2 where fieldName _ = "col2" -- > col2 :: Attr Col2 Int -- > col2 = mkAttr Col2 -- mkRecord makes it simpler to construct queries combining columns from multiple tables: {- | Create a record from the list of tables and fields given. The first element of each tuple is a table. The second is a list of fields from that table which will be in the new record. The record will be constructed in the order of tables and fields given. This is a Template Haskell function which must be spliced in and is intended to use the @'@ (quote) facility for capturing names. An example: > import Status_v (Status_v, status_v) > import qualified Status_v as Status_v > > import Dtls_v (Dtls_v, dtls_v) > import qualified Dtls_v as Dtls_v > > > qry = do > status <- table status_v; > dtls <- table dtls_v; > project $(mkRecord [('dtls, ['Dtls_v.desc > , 'Dtls_v.hdr_id > , 'Dtls_v.prt_id > , 'Dtls_v.dtl_id]) > ,('status, ['Status_v.stat_nbr])]) The type of qry is then > (RecCons Dtls_v.Desc (Expr (Maybe BStr40)) > (RecCons Dtls_v.Hdr_id (Expr (Maybe Int)) > (RecCons Dtls_v.Prt_id (Expr (Maybe BStr30)) > (RecCons Dtls_v.Dtl_id (Expr (Maybe Int)) > (RecCons Status_v.Stat_nbr (Expr (Maybe Int)) RecNil)))))) If other fields need to be added to the record, they must come before the call to mkRecord: > project $ filtered << someTable ! someField # > $(mkRecord [('dtls, ['Dtls_v.prt_desc > , 'Dtls.hdr_id > , 'Dtls.prt_id > , 'Dtls.dtl_id]) > ,('status, ['Status_v.stat_nbr])]) -} Enjoy! Justin |
From: Guenther S. <gue...@we...> - 2009-04-09 01:03:14
|
Hi all, how can I "define" a special operator like substring? Günther |
From: Justin B. <jgb...@gm...> - 2009-04-07 18:40:58
|
Unfortunately I don't think you can do it w/o writing your own pretty printer (in Database.HaskellDB.Sql.Print) and your own version of query (from Database.HaskellDB) to use your pretty-printer. On Tue, Apr 7, 2009 at 11:04 AM, Guenther Schmidt <gue...@we...> wrote: > Hi all, > > in my SQLite backend there are some unfortunately chosen Table and Field > names like: some-table, some-column. > > This requires the generated SQL to wrap these table names in quotes. > > I cannot simple wrap the table and field names in the haskell table > definition because when the result comes back the result column names > can't be matched (because of the quotes). How can I make the > SQLGenerator wrap the table and field names? > > Günther > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-07 18:04:37
|
Hi all, in my SQLite backend there are some unfortunately chosen Table and Field names like: some-table, some-column. This requires the generated SQL to wrap these table names in quotes. I cannot simple wrap the table and field names in the haskell table definition because when the result comes back the result column names can't be matched (because of the quotes). How can I make the SQLGenerator wrap the table and field names? Günther |
From: Guenther S. <gue...@we...> - 2009-04-07 14:28:56
|
Hi Artyom, thanks. Could you also please tell me how I have to handle Unicode with Haskelldb. I have a Unicode problem when using Haskelldb to import from Sqlite to an MS-Access database. Günther Artyom Shalkhakov schrieb: > Hi, > > 2009/4/7 Guenther Schmidt <gue...@we...>: > >> so I'v managed to fire of an apparently correct query, HURRAY, but, I >> know this is ridiculus, how do I get at the values? >> >> I mean I get back a IO [Record .....] but I wonna get at the individual >> values too. >> > > It's very easy, just use the record selection operator: > > record ! field -- yields field value > > (see http://hackage.haskell.org/packages/archive/haskelldb/0.12/doc/html/Database-HaskellDB.html#v%3A%21) > > Cheers, > Artyom Shalkhakov. > |
From: Guenther S. <gue...@we...> - 2009-04-07 11:23:42
|
Hi, so I'v managed to fire of an apparently correct query, HURRAY, but, I know this is ridiculus, how do I get at the values? I mean I get back a IO [Record .....] but I wonna get at the individual values too. I know how to print them though :) Günther |
From: Guenther S. <gue...@we...> - 2009-04-07 01:47:10
|
Hi Justin, I think I will try to use haskellDB as a template to create an AST and then just create SQL from that. Right now I don't really have the time to check out all of haskellDBs capabilities and then maybe find myself in need of something that can't be done within haskellDB. Primarily I need to get in control of the wallpaper-sized SQL statements my app uses, it isn't really all that necessary to perfectly type safe, especially not the incoming part, ie. the results of the queries. Thanks for your help and patience. Günther |
From: Justin B. <jgb...@gm...> - 2009-04-06 15:35:31
|
For specifics on using HDBC-ODBC, you'll want to look at their documentation. Each driver is a little different. Here is what i used to connect to postgres: import Database.HaskellDB.HDBC.PostgreSQL ... login :: MonadIO m => String -> Int -> String -> String -> String -> (Database -> m a) -> m a login server port user password dbname = postgresqlConnect [("host", server), ("port", show port), ("user", user), ("password", password), ("dbname", dbname)] On Sun, Apr 5, 2009 at 9:05 AM, Guenther Schmidt <gue...@we...> wrote: > Hi all, > > how can I "connect" to an ODBC data base, ie. what do I need for "withDB" ? > > Günther > > > ------------------------------------------------------------------------------ > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Guenther S. <gue...@we...> - 2009-04-05 16:27:33
|
Hi all, how can I "connect" to an ODBC data base, ie. what do I need for "withDB" ? Günther |