command
module
Version:
v0.0.0-...-65baf40
Opens a new window with list of versions in this module.
Published: Dec 13, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
sql2ent
该项目提供 sql 语句转化为 entgo schema
代码的命令行工具, 以提高工作效率。
前往学习entgo
功能
已完成
- 使用命令行批量转化
- 支持 mysql
计划
- 支持更多的数据库,例如:MariaDB、SQLite、PostgreSQL。
- 读取数据库,批量生成
schema
文件。
- 等等...
快速开始
第一步:安装 sql2ent
# Go 1.15 或更低版本
go get -u github.com/miaogaolin/excel-proc
# Go 1.16 或更高版本
go install github.com/miaogaolin/excel-proc@latest
第二步:运行命令
sql2ent mysql ddl -src "./sql/*.sql" -dir "./ent/schema"
说明:
- -src: 输入 sql 路径,可模糊匹配
- -dir: 输出目录,默认
./ent/schema
参与开源
- 点击 Fork
- 提交自己的代码到 Fork 的仓库中
- Pull Request 将自己的代码合并
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
|
|
https://entgo.io/zh/docs/schema-fields
|
https://entgo.io/zh/docs/schema-fields |
|
|
Click to show internal directories.
Click to hide internal directories.