承接 skiptirengu/yii2-mssql-schema 相关项目开发

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

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

skiptirengu/yii2-mssql-schema

最新稳定版本:0.6

Composer 安装命令:

composer require skiptirengu/yii2-mssql-schema

包简介

Optimized Schema for Yii2 applications using mssql databases

README 文档

README

Build Status

This extension provides an optimized Schema class for Yii2 applications using SQL Server databases, and also fixes several bugs of the current core mssql implementation.

It achieves a better performance by using the stored procedure sp_help instead of querying the system catalog for each table you're acessing. This cuts down the number of queries Yii executes to get information about your table from three to only one!

Requirements

  • PHP >= 5.6
  • SQL Server >= 2008
  • PDO driver (pdo_dblib, pdo_sqlsrv, etc)

Installation

The preferred way to install this extension is through composer.

Either run

composer require "skiptirengu/yii2-mssql-schema:*"

or add

"skiptirengu/yii2-mssql-schema": "*"

to the require section of your composer.json file.

Usage

To use this extension, just change the database configuration of your application to match the following

// ...
'components' => [
    'db' => [
        'class' => 'yii\db\Connection',
        // ...
        'schemaMap' => [
            // if you're using freetds + dblib
            'dblib' => 'skiptirengu\mssql\Schema',
            // older MSSQL driver on MS Windows hosts
            'mssql' => 'skiptirengu\mssql\Schema',
            // new ms driver for SQL Server
            // https://github.com/Microsoft/msphpsql
            'sqlsrv' => 'skiptirengu\mssql\Schema',
        ]
    ]
]

and you're set!

TODO

  • Backport this to PHP 5.4?
  • Figure out a way to load table comments

License

Licensed under the incredibly permissive MIT license

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-16