{"id":13414169,"url":"https://github.com/modernizing/sqling","last_synced_at":"2025-07-10T07:05:13.212Z","repository":{"id":64304353,"uuid":"375749102","full_name":"modernizing/sqling","owner":"modernizing","description":"build domain model from MySQL schema","archived":false,"fork":false,"pushed_at":"2021-06-28T01:41:13.000Z","size":260,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T12:50:28.832Z","etag":null,"topics":["domain-driven-design","domain-specific-language"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modernizing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-10T15:39:38.000Z","updated_at":"2023-08-28T07:29:33.000Z","dependencies_parsed_at":"2023-01-15T10:15:45.782Z","dependency_job_id":null,"html_url":"https://github.com/modernizing/sqling","commit_stats":null,"previous_names":["inherd/sqling"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/modernizing/sqling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fsqling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fsqling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fsqling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fsqling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modernizing","download_url":"https://codeload.github.com/modernizing/sqling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fsqling/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545017,"owners_count":23625387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-driven-design","domain-specific-language"],"created_at":"2024-07-30T21:00:15.894Z","updated_at":"2025-07-10T07:05:13.183Z","avatar_url":"https://github.com/modernizing.png","language":"Go","funding_links":[],"categories":["Code"],"sub_categories":["Code to UML"],"readme":"# SQLing\n\n\u003e build domain model from SQL file\n\n## Usage\n\n1. download sqling from [release](https://github.com/inherd/sqling/releases) or\n\n```bash\ngo get github.com/inherd/sqling\n```\n\n2. dump sql file\n\n```bash\nmysqldump -u root -p -h localhost --no-data mall \u003e database.sql\n```\n\n3. run `sqling -i database.sql`\n\n\n### CLI Usage\n\nCLI\n\n```bash\nSqling is a modeling tool to build from SQL file.\n\nUsage:\n  sqling [flags]\n\nFlags:\n  -h, --help                 help for sqling\n  -i, --input string         input file\n  -t, --output_type string   output file type, support for puml, json (default \"puml\")\n```\n\n## Todo\n\nTodo:\n\n - [x] import sql parser\n - [x] use cobra as cli tools\n - [x] output\n    - [x] json\n    - [x] puml\n\nPlan:\n\n - [ ] analysis\n    - [ ] [xo](https://github.com/xo/xo) Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server \n - [ ] web runtime\n    - [ ] web assembly\n - [ ] bad smell\n    - https://github.com/rory/django-sql-inspector\n\nThinks:\n\n - [ ] connect to database\n    - [ ] search from: MySQL information_schema.KEY_COLUMN_USAGE\n    - [ ] query select table_name from information_schema.tables where table_schema='csdb' and table_type='base table';\n\nRefs:\n\n - [MysqlParser](https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy)\n - [Pingcap Parser BNF](https://github.com/pingcap/parser/blob/81106e4996bfdaaf5f0ef87ac8280d03b719594d/compatibility_reporter/mysql80_bnf.txt)\n\nRelated projects:\n\n - [SOAR](https://github.com/XiaoMi/soar) - 是一个对 SQL 进行优化和改写的自动化工具。\n - [SQLFlow](https://github.com/sql-machine-learning/sqlflow)  is a compiler that compiles a SQL program to a workflow that runs on Kubernetes.\n\nLicense\n---\n\n@ 2021 This code is distributed under the MIT license. See `LICENSE` in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernizing%2Fsqling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodernizing%2Fsqling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernizing%2Fsqling/lists"}