You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Thomas Vandahl <tv...@apache.org> on 2011/08/28 12:41:49 UTC

Autodetect adapters

Hi folks,

I wrote a hack around Torque 3.3 to allow the auto-detection of the
correct database adapter from the JDBC connection meta data. It
basically uses the database product name to select the adapter.

Would that be a useful extension to Torque4? It would be even easier to
implement if I modified the factory and the Torque instance.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Autodetect adapters

Posted by Noctarius <me...@noctarius.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 31.08.2011 04:40, schrieb Thomas Fox:
>> On 29.08.11 13:37, Thomas Fox wrote:
>>> I am also in favour of adding this to Torque 4, however I
>>> am not sure whether autodetection should be the default
>>> configuration or not. I'm
> ok
>>> with both.
>> 
>> The idea is to have a special adapter name "auto" to be
>> handled inside the adapter factory and possibly document that
>> as the default. The whole other possibilities stay the same.
> 
> Sounds good to me.

Full ACK.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOXbHOAAoJEH/g+YBfahrqdSYQAJgtJ7KMivYwRxO+0gahqhBO
sCCy0S798YS46h7XOzo4kL67e3tzpXVEzEYydgGhqpthIx2ydRi71+Guh579wZeX
Kj1PiKwAtCQxrFP0dXJwz/EIR21095OuYiH5TWj4pVqwnnngpdhAlAybPH+DKVZ5
abQBkbRPufmYlPdT0ZH2YDUonFGEQHwPjjX4ck/1DX1+DgfgMSpnJuLOarzvZ/7o
PfPA/cuyh12fP48RhAI/pPeTCNBZLhSC11ro/7T9m7EaT5QD2GirReuWtBwlpnZR
Dn0muo3TB/FqDs1odqwsZBmy+fRauVuVAkihzCxomFYKpTDwQxwEGf6+P+z6J+39
RRBwd1PS2z9CwFYj5aQUnaUz9PdgaFsd5cQ/yTej6B3cW9zv7Kb8iPZIcCzxbcq8
6MwtAHtViLa0AMrKzte+Atptvx3efJf030vhgrWOcte4cQZWBTjexxwbUzwFosmB
4eCsFyO4hQiapDPmq0AR8FsmYmAZ/88PHGRECRYeDVnHtLATc//D8eOP7WKCAufM
GFcGH8KlgREgT7DgRxzFVASaprp7c8NUog6jK0fPsLVFUsjZR5qWTehzDSy+q5Iq
6ZbC4Tx9Mnb0C+b4aVW8y9yxz5YIPNMsNNf8qpM8GpyMmSvGWGOk6NBDdm+rI9ql
LydC5dGMfu8312HrEcFc
=juw9
-----END PGP SIGNATURE-----


Re: Autodetect adapters

Posted by Thomas Fox <Th...@seitenbau.net>.
> On 29.08.11 13:37, Thomas Fox wrote:
> > I am also in favour of adding this to Torque 4, however I am not sure
> > whether autodetection should be the default configuration or not. I'm
ok
> > with both.
>
> The idea is to have a special adapter name "auto" to be handled inside
> the adapter factory and possibly document that as the default. The whole
> other possibilities stay the same.

Sounds good to me.

   Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Autodetect adapters

Posted by Thomas Vandahl <tv...@apache.org>.
On 29.08.11 13:37, Thomas Fox wrote:
> I am also in favour of adding this to Torque 4, however I am not sure
> whether autodetection should be the default configuration or not. I'm ok
> with both.

The idea is to have a special adapter name "auto" to be handled inside
the adapter factory and possibly document that as the default. The whole
other possibilities stay the same.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Autodetect adapters

Posted by Thomas Fox <Th...@seitenbau.net>.
Noctarius schrieb am 28.08.2011 12:44:58:
> Am 28.08.2011 12:41, schrieb Thomas Vandahl:
> > Hi folks,
> >
> > I wrote a hack around Torque 3.3 to allow the auto-detection of the
> > correct database adapter from the JDBC connection meta data. It
> > basically uses the database product name to select the adapter.
> >
> > Would that be a useful extension to Torque4? It would be even easier to
> > implement if I modified the factory and the Torque instance.
>
> I guess it would be a nice addition but you must have the
> possibility to explicitly choose one as well since our application
> has two db drivers (MySQL / DB2).

I am also in favour of adding this to Torque 4, however I am not sure
whether autodetection should be the default configuration or not. I'm ok
with both.

   Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Autodetect adapters

Posted by Noctarius <me...@noctarius.com>.
Am 28.08.2011 12:41, schrieb Thomas Vandahl:
> Hi folks,
> 
> I wrote a hack around Torque 3.3 to allow the auto-detection of the
> correct database adapter from the JDBC connection meta data. It
> basically uses the database product name to select the adapter.
> 
> Would that be a useful extension to Torque4? It would be even easier to
> implement if I modified the factory and the Torque instance.

I guess it would be a nice addition but you must have the
possibility to explicitly choose one as well since our application
has two db drivers (MySQL / DB2).

> 
> Bye, Thomas.

Cheers Chris

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>