Class: WindConnectionManager
Source Location: /db/WindConnectionManager.php
Class WindConnectionManager
Class Overview
数据库链接管理
配置说明: 1. 当没有任何策略部署时 ,默认返回当前配置中的第一个链接句柄
2. 当没有任何策略部署时,如果在sql语句中有链接句柄指定时则返回指定的链接句柄
例如:'{db1:tableName}'返回db1指定的链接句柄
3. 如果当前有策略部署时,则按照策略部署规则返回
当$forceMaster为true时则强制主链接
配置格式如下:
<connections except='*:db1;user*,tablename2:db1|db2;'>
<connection name='db1'>
< dsn> mysql: host= localhost;dbname= test</ dsn>
<user>root</user>
<pwd>root</pwd>
<charset>utf8</charset>
<tablePrefix>pw_</tablePrefix>
</connection>
<connection name='db2'>
< dsn> mysql: host= localhost;dbname= test</ dsn>
<user>root</user>
<pwd>root</pwd>
<charset>utf8</charset>
<tablePrefix>pw_</tablePrefix>
</connection>
</connections>
Located in /db/WindConnectionManager.php [line 37]
WindModule
|
--WindConnection
|
--WindConnectionManager
Author(s):
Information Tags:
Version: | $Id: WindConnectionManager.php 3397 2012-03-14 08:49:50Z yishuo $ |
Copyright: | ©2003-2103 phpwind.com |
License: | http://www.windframework.com |
|
Methods
|
Inherited Properties, Constants, and Methods
|
|