-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
named conections are deprecated #161
Comments
How are you using them? |
I connect to more then one database, and using this connections in the code dibi::connect(array('driver' => 'mssql', 'host' => 'localhost1', 'username' => 'root', 'password' => 'pass'), 'mssql_db_local');
dibi::connect(array('driver' => 'mysql', 'host' => 'localhost2', 'username' => 'root', 'password' => 'pass'), 'mysql_db_main');
$main_db = dibi::getConnection( 'mysql_db_main' ); |
Isn't this better? $localDb = new \DibiConnection(array(
'driver' => 'mssql',
'host' => 'localhost1',
'username' => 'root',
'password' => 'pass'
));
$mainDb = new \DibiConnection(array(
'driver' => 'mssql',
'host' => 'localhost2',
'username' => 'root',
'password' => 'pass'
)); |
To create more connection and to use getConnection() is (relatively) OK, it can be reverted. Problematic is |
+1 I'd also like to keep the ability to create more connections and access them with getConnection($name). |
"The feature isn't there and it's not gonna be there." :) No really, creating more instances doesn't make |
* master: (37 commits) Released version 2.3.1 removed version.txt dibi: named connections are allowed [Closes dg#161] Dibi: Dump now recognize MsSql2012 offset as keyword DibiPdoDriver: added support for MsSql2012 Offset Tracy\Panel: added vector icon added contributing.md Released version 2.3.0 Postgre: added test for matching by %like Postgre: fixed %like escaping [Closes dg#159] Dibi: $defaultDriver changed to mysqli [Closes dg#156] Released 2.3.0-RC1 removed bridge for Nette 2.0 (BC break) dibi: named connections and activate() are deprecated (BC break) DibiFluent: add `leftJoin` and `on` to phpdoc. DibiFirePhpLogger: save some header operations for sites with hundreds of sql queries. DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes dg#148] DibiTranslator: respect %if blocks for %lmt and %ofs as well [Closes dg#145][Closes dg#87] DibiResult: float detection locale fix [Closes dg#154] DibiMySqliDriver.php: fixes for HHVM ...
Why you refused named conections?
Are there any alternative ways to use them?
The text was updated successfully, but these errors were encountered: