Hi.
May I suggest some sort of possibility to use new DB connection options
for ModelFactory::getDbStore() function.
This would allow use a new argument maybe (see proposed patch link
bellow), which, if present, would be the DSN for ADODB.
This would have the advantage of allowing the use of more advanced
connection mechanisms, like persistent connections, etc.=20
Example :=20
instead of using :
$this->dbstore =3D ModelFactory::getDbStore('MySQL', 'localhost',=20
'database', 'user', 'pass');
which would do a standard ADODB Connect() (reusing the previous=20
connection), one could use :
$this->dbstore =3D ModelFactory::getDbStore(NULL, NULL, NULL, NULL,=20
NULL,=20
'mysql://user:pass@localhost/database?new');
which will use a ADODB NConnect(), creating a new connection each time.
See the corresponding patch at : http://picoforge.int-evry.fr/websvn/filede=
tails.php?repname=3Dpicoforge&path=3D%2Ftrunk%2Flibphp-rap%2Fpatching%2Fdsn=
.patch&rev=3D0&sc=3D1
Any comments ?
Hope this helps,
Best regards,
--=20
Olivier BERGER <oli...@in...> (ATTENTION : new address)
Ing=C3=A9nieur Recherche - Dept INF
GET/INT at Evry (http://www.int-edu.eu/)
OpenPGP-Id: 1024D/6B829EEC
|