You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+122-1Lines changed: 122 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,9 @@ result match {
179
179
180
180
---
181
181
182
-
### **3. SQL to Elasticsearch Query Translation**
182
+
### **3. SQL compatible **
183
+
184
+
### **3.1 SQL to Elasticsearch Query DSL**
183
185
184
186
SoftClient4ES includes a powerful SQL parser that translates standard SQL `SELECT` queries into native Elasticsearch queries.
185
187
@@ -464,6 +466,125 @@ val results = client.search(SQLQuery(sqlQuery))
464
466
}
465
467
}
466
468
```
469
+
---
470
+
471
+
### **3.2. Compile-Time SQL Query Validation**
472
+
473
+
SoftClient4ES provides **compile-time validation** for SQL queries used with type-safe methods like `searchAs[T]` and `scrollAs[T]`. This ensures that your queries are compatible with your Scala case classes **before your code even runs**, preventing runtime deserialization errors.
474
+
475
+
#### **Why Compile-Time Validation?**
476
+
477
+
- ✅ **Catch Errors Early**: Detect missing fields, typos, and type mismatches at compile-time
478
+
- ✅ **Type Safety**: Ensure SQL queries match your domain models
479
+
- ✅ **Better Developer Experience**: Get helpful error messages with suggestions
480
+
- ✅ **Prevent Runtime Failures**: No more Jackson deserialization exceptions in production
0 commit comments