承接 slam/dbal-debugstack-middleware 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

slam/dbal-debugstack-middleware

Composer 安装命令:

composer require slam/dbal-debugstack-middleware

包简介

Doctrine\DBAL middleware for precise query debugging (DebugStack replacement)

README 文档

README

Latest Stable Version Downloads Integrate

Doctrine\DBAL middleware for precise query debugging (DebugStack replacement). Compared to the default logging middleware, this one:

  1. Tracks the query's execution time
  2. Doesn't handle exceptions
  3. Doesn't track disconnections

Installation

composer require slam/dbal-debugstack-middleware

Usage

use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\ParameterType;
use Slam\DbalDebugstackMiddleware\DebugStack;
use Slam\DbalDebugstackMiddleware\Middleware;

$debugStack = new DebugStack();

$conn = DriverManager::getConnection(
    $connectionParams,
    (new Configuration)->setMiddlewares([
        new Middleware($debugStack)
    ])
);

$result = $conn->executeQuery(
    'SELECT * FROM users WHERE active = :active',
    ['active' => true],
    ['active' => ParameterType::BOOLEAN],
);

print_r($debugStack->popQueries());

/*
 * Output:
 *
    Array
    (
        [0] => Slam\DbalDebugstackMiddleware\Query Object
            (
                [sql] => SELECT * FROM users WHERE active = :active
                [params] => Array
                    (
                        [active] => true
                    )
                [types] => Array
                    (
                        [active] => 5
                    )
                [executionMs] => 72.05312
            )
    )
 */

统计信息

  • 总下载量: 22.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固