sql-to-jdl
sql-to-jdl copied to clipboard
Add support for Oracle
This should only require writing proper native SQL files for 3 queries and a SqlJdlTypeService.
Re-opening this ticket, I think there is still work to be done. See comment of first PR https://github.com/Blackdread/sql-to-jdl/pull/177#discussion_r1118048107
I think, some steps needed:
- remove logic
if (value.equals("NUMBER(38)") || value.equals("NUMBER(19,5)"))
frompublic static String parseSqlType(String value)
of SqlUtils -> Define overridden method in OracleJdlTypeService fordefault JdlFieldEnum sqlTypeToJdlType(final String sqlType)
-> so we can handle oracle specific types and parsing differentely - handle more types
- allow definition of short, int, long
- better handling of decimal(p, s) -> NUMBER [ (p [, s]) ]
Docs:
- https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF30020
- https://www.oracletutorial.com/oracle-basics/oracle-data-types/
- https://www.w3resource.com/oracle/oracle-data-types.php