From 4cbfaed8c701164a80eeaae8bd55561607cc2fba Mon Sep 17 00:00:00 2001 From: skidus Date: Mon, 2 Mar 2026 13:23:42 +0700 Subject: [PATCH] feat: improve field type mapping and add sample dataset resource - Update GUtils.java to handle case-insensitive column type mapping. - Add "number" type mapping to support more database dialects. - Add DevResources/Dataset.xml as a sample dataset definition. --- .../coroutines-javaagent-legacy.jar | Bin 270 -> 270 bytes .intellijPlatform/self-update.lock | 2 +- DevResources/Dataset.xml | 60 ++++++++++++++++++ src/main/java/com/sdk/generators/GUtils.java | 3 +- 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/.intellijPlatform/coroutines-javaagent-legacy.jar b/.intellijPlatform/coroutines-javaagent-legacy.jar index 972e7d7832d0355ea74b2c6170d5c9ac37f33a62..8fa78e2933aafe4acae7fe47c8b9f304861517e7 100644 GIT binary patch delta 30 icmeBU>SN*y@MdNaVc_84V93i#ikZl_fdxz-@&N#2=?EJD delta 30 icmeBU>SN*y@MdNaVc_84V6aNDh@Qx|fdxz-@&N!_^#@S^ diff --git a/.intellijPlatform/self-update.lock b/.intellijPlatform/self-update.lock index b92f569..667c5a6 100644 --- a/.intellijPlatform/self-update.lock +++ b/.intellijPlatform/self-update.lock @@ -1 +1 @@ -2025-09-24 \ No newline at end of file +2026-03-02 \ No newline at end of file diff --git a/DevResources/Dataset.xml b/DevResources/Dataset.xml index e69de29..b07ee49 100644 --- a/DevResources/Dataset.xml +++ b/DevResources/Dataset.xml @@ -0,0 +1,60 @@ + + + APP + PROJECTS + PROJ_ID + + + FROM PROJECTS + ORDER BY PROJ_YEAR DESC, PROJ_ID + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/sdk/generators/GUtils.java b/src/main/java/com/sdk/generators/GUtils.java index babae8d..ee2ffe2 100644 --- a/src/main/java/com/sdk/generators/GUtils.java +++ b/src/main/java/com/sdk/generators/GUtils.java @@ -34,6 +34,7 @@ public class GUtils { TYPE_MAPPING.put("float", "NUMBER"); TYPE_MAPPING.put("integer", "NUMBER"); TYPE_MAPPING.put("numeric", "NUMBER"); + TYPE_MAPPING.put("number", "NUMBER"); TYPE_MAPPING.put("smallint", "NUMBER"); TYPE_MAPPING.put("timestamp", "DATE"); TYPE_MAPPING.put("text", "STRING"); @@ -80,7 +81,7 @@ public class GUtils { public static String getFieldType(DasColumn column) { String columnType = column.getDasType().toDataType().typeName; - String fieldType = TYPE_MAPPING.get(columnType); + String fieldType = TYPE_MAPPING.get(columnType.toLowerCase()); if (fieldType == null) { fieldType = TYPE_MAPPING.getOrDefault(userDefType.getOrDefault(columnType, "varchar"), "Object"); }