Re: [Haskell-cafe] Takusen - reading from one db inserting into another

2010-01-18 Thread Günther Schmidt

Hello Alistair,

sorry for asking twice, I had forgotten that.

I took some time to try to figure out how to do it and always concluded 
from my understanding of Takusen that it shouldn't be possible. At least 
it seems I got that right, which is good by itself :) .


Thank you for your troubles but do not worry about the patch, I have 
switched back to using HDBC meanwhile. HDBC-ODBC has a slight problem 
with Access, I couldn't insert Doubles, well I could but the decimal 
separator got swallowed, and I worked around it by using pr-efilled 
SQL-statement strings instead of bound/prepared ones.


Günther

Am 18.01.10 13:00, schrieb Alistair Bayley:

Hello Günther,

   

I know how to use Takusen with a *single* connection, but I cannot figure
out how to read from one database while inserting to another.
 

At present it's not possible. The lats time you asked about it, Oleg
and I tried a design where the DBM monad becomes a DBMT monad
transformer. This permits multiple connections, but the resulting
user-land code didn't work as well as I wanted. If you like I can try
to tidy it up and send you the darcs patch.

Alistair
   



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Takusen - reading from one db inserting into another

2010-01-18 Thread Alistair Bayley
Hello Günther,

> I know how to use Takusen with a *single* connection, but I cannot figure
> out how to read from one database while inserting to another.

At present it's not possible. The lats time you asked about it, Oleg
and I tried a design where the DBM monad becomes a DBMT monad
transformer. This permits multiple connections, but the resulting
user-land code didn't work as well as I wanted. If you like I can try
to tidy it up and send you the darcs patch.

Alistair
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Takusen - reading from one db inserting into another

2010-01-18 Thread Michael Hartl
Don't know if you can have two connections, sounds difficult in regard
to the DBM monad. Only the deveolopers will know.

However, two obvious solutions come to my mind: 1) build a result set
and process it after returning from DBM or 2) use two separate threads
and send the queried data from your source db to the other thread using
an STM channel. 
You will have to think about lazyness, performance and space usage in
both cases, however.

Am Sonntag, den 17.01.2010, 20:48 +0100 schrieb Günther Schmidt:
> Hi,
> 
> I know how to use Takusen with a *single* connection, but I cannot 
> figure out how to read from one database while inserting to another.
> 
> 
> Could someone please explain to me how I can do that?
> 
> Günther
> 
> 
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Takusen - reading from one db inserting into another

2010-01-17 Thread Günther Schmidt

Hi,

I know how to use Takusen with a *single* connection, but I cannot 
figure out how to read from one database while inserting to another.



Could someone please explain to me how I can do that?

Günther


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe