From: Immanuel N. <i.n...@ja...> - 2007-11-20 10:03:22
|
Hello, this is another try to get help about a question which I have send to this mailing list about 2 weeks ago under the subject "Missing SQL features". I haven't received any feedback may be because the traffic is rather low in this mailing list - so I try again: I can't find the SQL operators exists (and join) in HaskellDB. Are they not supported yet or have they different names here? Basically I need to express in HaskellDB something like: SELECT DISTINCT store_type FROM stores WHERE NOT EXISTS (SELECT * FROM cities_stores WHERE cities_stores.store_type = stores.store_type); (i.e. asking the question "What kind of store is present in no cities?") Any hints how to accomplish this in HaskellDB are highly appreciated. Thanks, Immanuel |
From: Bjorn B. <bri...@cs...> - 2007-11-20 10:40:33
|
On Nov 20, 2007, at 11:05 , Immanuel Normann wrote: > Hello, > > this is another try to get help about a question which I have send to > this mailing list about 2 weeks ago under the subject "Missing SQL > features". I haven't received any feedback may be because the =20 > traffic is > rather low in this mailing list - so I try again: > > I can't find the SQL operators exists (and join) in HaskellDB. Are =20 > they > not supported yet or have they different names here? > > Basically I need to express in HaskellDB something like: > > SELECT DISTINCT store_type FROM stores > WHERE NOT EXISTS (SELECT * FROM cities_stores > WHERE cities_stores.store_type =3D =20 > stores.store_type); > > (i.e. asking the question "What kind of store is present in no =20 > cities?") > > Any hints how to accomplish this in HaskellDB are highly appreciated. > > Thanks, > Immanuel Hi Immanuel, EXISTS is unfortunately not implemented yet. There are only inner =20 joins. Fixing these deficiencies would be very welcome. /Bj=F6rn |
From: Immanuel N. <i.n...@ja...> - 2007-11-20 10:53:38
|
On Tue, 2007-11-20 at 11:40 +0100, Bjorn Bringert wrote: > EXISTS is unfortunately not implemented yet. There are only inner > joins. Fixing these deficiencies would be very welcome. I will have a look at it - as soon as I am relieved from other dominant dueties. Still I couldn't find even inner joins in the haskellDB 0.10 API. Immanuel |
From: Bjorn B. <bri...@cs...> - 2007-11-20 11:12:23
|
On Nov 20, 2007, at 11:55 , Immanuel Normann wrote: > On Tue, 2007-11-20 at 11:40 +0100, Bjorn Bringert wrote: > >> EXISTS is unfortunately not implemented yet. There are only inner >> joins. Fixing these deficiencies would be very welcome. > > I will have a look at it - as soon as I am relieved from other =20 > dominant > dueties. > > Still I couldn't find even inner joins in the haskellDB 0.10 API. > > Immanuel Inner joins are implicit. Using two 'table' calls makes a cartesian =20 product between those tables. You can then use 'restrict' with =20 equality on fields from the two tables to get an equi-join. /Bj=F6rn |