All Projects → Blackdread → Sql To Jdl

Blackdread / Sql To Jdl

Licence: mit
Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sql To Jdl

Graphjin
GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.
Stars: ✭ 1,264 (+1008.77%)
Mutual labels:  sql, mysql
Qtl
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.
Stars: ✭ 92 (-19.3%)
Mutual labels:  sql, mysql
Jsql
jSQL is the "official" Javascript Query Language - A database written in Javascript for use in a browser or Node.
Stars: ✭ 85 (-25.44%)
Mutual labels:  sql, mysql
Sql
MySQL & PostgreSQL pipe
Stars: ✭ 81 (-28.95%)
Mutual labels:  sql, mysql
Xorm
xorm是一个简单而强大的Go语言ORM库,通过它可以使数据库操作非常简便。本库是基于原版xorm的定制增强版本,为xorm提供类似ibatis的配置文件及动态SQL支持,支持AcitveRecord操作
Stars: ✭ 1,394 (+1122.81%)
Mutual labels:  sql, mysql
Archer
基于inception的自动化SQL操作平台,支持SQL执行、LDAP认证、发邮件、OSC、SQL查询、SQL优化建议、权限管理等功能,支持docker镜像
Stars: ✭ 1,239 (+986.84%)
Mutual labels:  sql, mysql
Electrocrud
Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
Stars: ✭ 1,267 (+1011.4%)
Mutual labels:  sql, mysql
Think Soar
SQL optimizer and rewriter extension package for thinkphp5/6 framework.
Stars: ✭ 71 (-37.72%)
Mutual labels:  sql, mysql
Go Structured Query
Type safe SQL query builder and struct mapper for Go
Stars: ✭ 101 (-11.4%)
Mutual labels:  sql, mysql
Node Mysql Utilities
Query builder for node-mysql with introspection, etc.
Stars: ✭ 98 (-14.04%)
Mutual labels:  sql, mysql
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-33.33%)
Mutual labels:  sql, mysql
Sqlfaker
轻量级、易拓展的数据库智能填充Java开源库
Stars: ✭ 109 (-4.39%)
Mutual labels:  sql, mysql
Sql to sqlalchemy
本教程是为了展现 sql 原始语句转换为 sqlalchemy 语句的各个实例。
Stars: ✭ 75 (-34.21%)
Mutual labels:  sql, mysql
Xeus Sql
xeus-sql is a Jupyter kernel for general SQL implementations.
Stars: ✭ 85 (-25.44%)
Mutual labels:  sql, mysql
Ebean
Ebean ORM
Stars: ✭ 1,172 (+928.07%)
Mutual labels:  sql, mysql
Docker Superset
Repository for Docker Image of Apache-Superset. [Docker Image: https://hub.docker.com/r/abhioncbr/docker-superset]
Stars: ✭ 86 (-24.56%)
Mutual labels:  sql, mysql
Event Management
helps to register an users for on events conducted in college fests with simple logic with secured way
Stars: ✭ 65 (-42.98%)
Mutual labels:  sql, mysql
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-40.35%)
Mutual labels:  sql, mysql
Node Background Management System
eggjs实现一个较为完整的后台管理系统
Stars: ✭ 96 (-15.79%)
Mutual labels:  sql, mysql
Cslearning
开源项目之「计算机编程自学之路」:计算机自学指南+面试大全+资源分享+技术文章
Stars: ✭ 107 (-6.14%)
Mutual labels:  sql, mysql

Build Status StackShare

sql-to-jdl

Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)

Compatibility

This implementation works with mysql 5.7+ and mysql 8+.

Only few changes are required to make it work with oracle db, POSTGRES, etc; Changes should be made on Repository used, probably remove jooq maven generation, use pure SQL with jdbc and have one repository implementation per database type supported then define the appropriate bean based on connection string or other.

Why not use tools like UML provided on jHipster?

  • JDL from web is ok for a few entities but not for more than 100 entities and relations
  • UML software and xml exporters could have worked (other tools on jHipster) but:
    • already many databases in production to be exported in JDL (faster to generate the JDL from it)
    • already working UML design with MySQL Workbench

An alternative for REST filter and sort

Different criterias, support for JPA and jOOQ dynamic filtering and sorting

https://github.com/Blackdread/rest-filter

How to use

Run "mvn compile" at least once to let jOOQ generate some required tables (see Issue solved). I have removed generated code, it is directly part of the codebase.

Just execute the code from IDE or use "mvn" to run the code, it will connect to your DB (see application config yml) and it will generate the JDL.

Set properties file:

  • Schema name to export
  • Tables names to be ignored
  • Path of export file

After JDL file is generated

Still have some manual steps to do:

  • review relations:
    • ManyToMany
    • Owner side display field
    • Inverse side field name and display field
    • Bidirectional or not
  • add values to enums
  • review validations of entities

Use of

  • jOOQ
  • Spring boot

Default specific rules

Table is treated as enum if only 2 columns and both are: "id" AND ("code" OR "name")

Table is treated as ManyToMany if only 2 columns and both are foreign keys

Links

jHipster JDL

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].