We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc87247 commit edd12b9Copy full SHA for edd12b9
1 file changed
chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/enums/DataTypeEnum.java
@@ -108,7 +108,11 @@ public static DataTypeEnum getByCode(String code) {
108
109
public String getSqlValue(String value) {
110
if (this == DataTypeEnum.BOOLEAN) {
111
- return value;
+ if("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)){
112
+ return value;
113
+ }else {
114
+ return "'" + value + "'";
115
+ }
116
}
117
if (this == DataTypeEnum.NUMERIC) {
118
return value;
@@ -149,9 +153,6 @@ public String getSqlValue(String value) {
149
153
if (this == DataTypeEnum.UNKNOWN) {
150
154
return "'" + value + "'";
151
155
152
- if (this == DataTypeEnum.CHAT2DB_ROW_NUMBER) {
- return "'" + value + "'";
- }
156
157
158
0 commit comments