@newko/sql-to-model
v0.1.4
Published
sql file to model generate
Downloads
1
Maintainers
Readme
Sql(DDL) To Model
Summary
Create a data model using DDL syntax(Using the .sql file extension file)
Support
Database
- MySql
- MariaDB
ORM
- TypeORM
Requirements
- Node.js v14.+
Install
# npm
$ npm install -g @newko/sql-to-model
# yarn
$ yarn global add @newko/sql-to-model
CLI
$ model-generate -s [*.sql] -t [target directory] -m [model type] -d [database]
Examples
#Options
options :
-s, --sqlDir <sqlDir> (.sql File Target directory to reference)
-t, --targetDir <targetDir> (Name of the project you want to create)
-m, --modelType <modelType> (TypeORM, Sequelize || default option: TypeORM)
-d, --database <database> (MySql, MariaDB, Postgresql.. || default option: MySql)
#Command
$ model-generate -s ./sql -t ./ryan
$ model-generate -s ./sql -t ./ryan -m TypeORM -d MySql