|
6 | 6 | import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2GormStruct;
|
7 | 7 | import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2Struct;
|
8 | 8 | import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2XormStruct;
|
| 9 | +import com.intellij.openapi.project.Project; |
9 | 10 |
|
10 | 11 | import java.util.List;
|
11 | 12 | import java.util.regex.Pattern;
|
@@ -61,12 +62,12 @@ public String toString() {
|
61 | 62 | return name;
|
62 | 63 | }
|
63 | 64 |
|
64 |
| - public ISQL2Struct sql2Struct(String sql, DbType dbType) { |
| 65 | + public ISQL2Struct sql2Struct(Project project, String sql, DbType dbType) { |
65 | 66 | return switch (this) {
|
66 |
| - case General -> new SQL2Struct(sql, dbType); |
67 |
| - case Gorm -> new SQL2GormStruct(sql, dbType); |
68 |
| - case Xorm -> new SQL2XormStruct(sql, dbType); |
69 |
| - case GoFrame -> new SQL2GoFrameStruct(sql, dbType); |
| 67 | + case General -> new SQL2Struct(project, sql, dbType); |
| 68 | + case Gorm -> new SQL2GormStruct(project, sql, dbType); |
| 69 | + case Xorm -> new SQL2XormStruct(project, sql, dbType); |
| 70 | + case GoFrame -> new SQL2GoFrameStruct(project, sql, dbType); |
70 | 71 | default -> null;
|
71 | 72 | };
|
72 | 73 | }
|
@@ -96,4 +97,20 @@ public String toString() {
|
96 | 97 | return name;
|
97 | 98 | }
|
98 | 99 | }
|
| 100 | + |
| 101 | + enum TagMode { |
| 102 | + Compact(GoORMHelperBundle.message("tagMode.Compact")), |
| 103 | + Full(GoORMHelperBundle.message("tagMode.Full")); |
| 104 | + |
| 105 | + private final String name; |
| 106 | + |
| 107 | + @Override |
| 108 | + public String toString() { |
| 109 | + return name; |
| 110 | + } |
| 111 | + |
| 112 | + TagMode(String name) { |
| 113 | + this.name = name; |
| 114 | + } |
| 115 | + } |
99 | 116 | }
|
0 commit comments