GithubHelp home page GithubHelp logo

sql-to-markdown's Introduction

Sql To Markdown

Sql To Markdown 是一个可以将数据表的建表语句转换为 Markdown 表格的工具。

Installation

通过 Composer 安装

$ composer global require slince/sql-to-markdown

Usage

假设有一张表结构如下,将改sql保存到文件命名为 foo.sql

CREATE TABLE `hello_sql_to_markdown` (
  `id` int unsigned NOT NULL AUTO_INCREMENT default '0' COMMENT 'primary',
  `foo` decimal (20, 2) unsigned NOT NULL default '' COMMENT 'foo field',
  `bar` varchar (20) unsigned NOT NULL default '' COMMENT 'bar field',
  PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=2367038934 DEFAULT CHARSET=utf8mb4 COMMENT='Demo table schema';

执行下面命令:

$ sql2markdown  convert  --source=foo.sql

即可在当前文件夹下生成 foo.sql.md 文件。

name type length default comment
id INT 0 primary
foo DECIMAL 20,2 foo field
bar VARCHAR 20 bar field

支持在一个文件里添加多个 DDL

查看帮助

$ sql2markdown --help

License

The MIT license. See MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.