定制 milantex/mysql-tso 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

milantex/mysql-tso

Composer 安装命令:

composer require milantex/mysql-tso

包简介

Creates a PHP object which describes the MySQL table structure for a specified table in the database.

README 文档

README

Build Status codecov Code Climate Latest Stable Version Total Downloads License SensioLabsInsight

What is MySQL-TSO?

This package provides a mechanism that analyzes the structure of tables in a MySQL/MariaDB database. It might be better to see an example of how to use it instead of reading a lengthy description.

Installation

Using composer in the command line

You can use composer to install the package using the following command from within your project's source directory:

composer require milantex/mysql-tso

Make sure to update your autoloader if needed:

composer dump-autoload -o

Requiring the package as a dependency in composer.json

Add the following code to your composer.json. Here is an example of a composer.json file with the milantex/mysql-tso package required:

{
    "name": "your-name/your-project",
    "description": "Your project's description",
    "type": "project",
    "license": "MIT",
    "authors": [
        {
            "name": "Your Name",
            "email": "your@mail.tld"
        }
    ],
    "require": {
        "milantex/mysql-tso": "*"
    }
}

Make sure to run the composer command to install dependencies:

composer install

Using the library in your project

    require_once '../vendor/autoload.php';

    use Milantex\DAW\DataBase;
    use Milantex\TSO\TableStructureDescriptor;

    # Enter database parameters
    $daw = new DataBase('localhost', 'demo', 'root', '');

    # Instantiate a table structure descriptor object
    $tso = new TableStructureDescriptor($daw);

    # Start the database analysis
    $tso->analyse();

    if ($tso->tableExists('page') &&
        $tso->getTableStructure('page')->fieldExists('title')) {
        echo 'Can page.title be null? ';
        if ($tso->getTableStructure('page')
                ->getFieldStructure('title')
                ->isNullable()) {
            echo 'Yes';
        } else {
            echo 'No';
        }
    }

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固