We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 479225a commit c13534eCopy full SHA for c13534e
1 file changed
hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/query/QueryAnalyzer.java
@@ -109,6 +109,24 @@ public Select newSelectAlias(String alias) {
109
table.newAlias(alias));
110
}
111
112
+ public Optional<Column> findColumn(String name) {
113
+ Map<String, Column> columnMap = getColumns();
114
+ Column column = columnMap.get(name);
115
+
116
+ if (column != null) {
117
+ return Optional.of(column);
118
+ }
119
120
+ for (Column col : columnList) {
121
+ if (Objects.equals(col.name, name) || Objects.equals(col.name, QueryHelperUtils.toSnake(name))) {
122
+ return Optional.of(col);
123
124
125
126
+ return Optional.empty();
127
128
129
130
public Map<String, Column> getColumns() {
131
return columns == null
132
? columns = columnList
0 commit comments