<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 連接池 只需在協程中使用連接池組件獲取連接對象即可。 ``` /** @var ConnectionPool $dbPool */ $db = app()->dbPool->getConnection(); $result = $db->createCommand('select sleep(5)')->queryAll(); $db->release(); // 不手動釋放的連接不會歸還連接池,會在析構時丟棄 ``` [>> 到 GitHub 查看 DEMO <<](https://github.com/mix-php/mix-skeleton/tree/v2.1/app/Console/Commands/CoroutineCommand.php#L40) ## `Mix\Pool\AbstractConnectionPool` 所有的連接池對象都繼承該抽象類,框架提供了 db, redis 兩個封裝好的連接池類: - [DB](https://github.com/mix-php/mix-database/tree/master/src/Pool):`Mix\Database\Pool\ConnectionPool::class` - [Redis](https://github.com/mix-php/mix-redis/tree/master/src/Pool):`Mix\Redis\Pool\ConnectionPool::class` ## 依賴注入配置 - [beans/database](https://github.com/mix-php/mix-skeleton/tree/v2.1/manifest/beans/database.php) - [beans/redis](https://github.com/mix-php/mix-skeleton/tree/v2.1/manifest/beans/redis.php) ## `Dialer` 撥號器 當連接池內的連接為空或者連接不足時,連接池組件會調用 `dialer` 對象獲取新的連接。 >[info] 撥號對象都必須實現 Mix\Pool\DialerInterface 接口。 框架默認提供了兩個撥號類,如果需要擴展,用戶自行實現 `Mix\Pool\DialerInterface `接口即可,也可繼承重寫。 - [Database Dialer](https://github.com/mix-php/database/blob/master/src/Pool/Dialer.php) - [Redis Dialer](https://github.com/mix-php/redis/blob/master/src/Pool/Dialer.php)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看