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
The `storm-metamodel-ksp` dependency generates type-safe metamodel classes (e.g., `User_`, `City_`) at compile time. See [Metamodel](metamodel.md) for details. The `storm-compiler-plugin` automatically wraps string interpolations inside SQL template lambdas, making queries injection-safe by default. The `2.0` suffix matches the Kotlin major.minor version used in your project (e.g., `storm-compiler-plugin-2.1` for Kotlin 2.1.x). See [String Templates](string-templates.md) for details.
The Java API uses String Templates (JEP 430), a preview feature in JDK 21+. You must add `--enable-preview` to the compiler configuration:
136
-
137
-
**Maven:**
138
-
139
-
```xml
140
-
<plugin>
141
-
<groupId>org.apache.maven.plugins</groupId>
142
-
<artifactId>maven-compiler-plugin</artifactId>
143
-
<configuration>
144
-
<release>21</release>
145
-
<compilerArgs>
146
-
<arg>--enable-preview</arg>
147
-
</compilerArgs>
148
-
</configuration>
149
-
</plugin>
150
-
```
151
-
152
-
**Gradle (Kotlin DSL):**
153
97
154
-
```kotlin
155
98
tasks.withType<JavaCompile> {
156
99
options.compilerArgs.add("--enable-preview")
157
100
}
@@ -161,114 +104,51 @@ tasks.withType<Test> {
161
104
}
162
105
```
163
106
164
-
### Storm Compiler Plugin (Kotlin)
165
-
166
-
The Storm compiler plugin automatically wraps string interpolations inside SQL template lambdas, so you can write natural Kotlin syntax that is parameterized and SQL injection safe by default. See [String Templates](string-templates.md) for details.
The metamodel processor generates type-safe metamodel classes (e.g., `User_`, `City_`) at compile time. See [Metamodel](metamodel.md) for details.
147
+
199
148
## Optional Modules
200
149
201
150
Storm is modular. Add only what you need.
202
151
203
-
### Static Metamodel
204
-
205
-
The metamodel generates companion classes (e.g., `User_`, `City_`) at compile time, enabling type-safe field references in queries. While optional, it is strongly recommended for projects that use Storm's query builder or repository predicates. See [Metamodel](metamodel.md) for details.
206
-
207
-
<TabsgroupId="language">
208
-
<TabItemvalue="kotlin"label="Kotlin"default>
209
-
210
-
Kotlin projects can generate the metamodel using either KSP (for Gradle) or kapt (for Maven). Both produce the same metamodel classes.
211
-
212
-
**Gradle (Kotlin DSL) with KSP:**
213
-
214
-
```kotlin
215
-
plugins {
216
-
id("com.google.devtools.ksp") version "2.0.21-1.0.28"
Storm works with any JDBC-compatible database out of the box. Dialect modules provide database-specific optimizations (e.g., native upsert syntax, tuple comparisons). Add the one that matches your database as a runtime dependency:
0 commit comments