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: docs/configuration.md
+34-8Lines changed: 34 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ import TabItem from '@theme/TabItem';
3
3
4
4
# Configuration
5
5
6
-
Storm can be configured through `StormConfig`, system properties, or Spring Boot's `application.yml`. These properties control runtime behavior for features like dirty checking and entity caching. All properties have sensible defaults, so **configuration is optional**. Storm works out of the box without any configuration.
6
+
Storm can be configured through `StormConfig`, system properties, Spring Boot's `application.yml`, or Ktor's `application.conf`. These properties control runtime behavior for features like dirty checking and entity caching. All properties have sensible defaults, so **configuration is optional**. Storm works out of the box without any configuration.
7
7
8
8
---
9
9
@@ -17,7 +17,7 @@ Storm can be configured through `StormConfig`, system properties, or Spring Boot
17
17
|`storm.entity_cache.retention`|`default`| Cache retention mode: `default` or `light`|
18
18
|`storm.template_cache.size`|`2048`| Maximum number of compiled templates to cache |
19
19
|`storm.validation.record_mode`|`fail`| Record validation mode: `fail`, `warn`, or `none`|
@@ -60,9 +60,9 @@ val orm = dataSource.orm(config)
60
60
61
61
```java
62
62
var config =StormConfig.of(Map.of(
63
-
"storm.update.default_mode", "FIELD",
64
-
"storm.entity_cache.retention", "light",
65
-
"storm.template_cache.size", "4096"
63
+
UPDATE_DEFAULT_MODE, "FIELD",
64
+
ENTITY_CACHE_RETENTION, "light",
65
+
TEMPLATE_CACHE_SIZE, "4096"
66
66
));
67
67
68
68
var orm =ORMTemplate.of(dataSource, config);
@@ -94,6 +94,32 @@ storm:
94
94
95
95
The Spring Boot Starter binds these properties and builds a `StormConfig` that is passed to the `ORMTemplate` factory. Values not set in YAML fall back to system properties and then to built-in defaults. See [Spring Integration](spring-integration.md#configuration-via-applicationyml) for details.
The Storm Ktor plugin reads these properties and builds a `StormConfig` that is passed to the `ORMTemplate` factory. HOCON supports environment variable substitution with `${?VAR_NAME}` syntax. See [Ktor Integration](ktor-integration.md#configuration) for details.
@@ -230,7 +231,7 @@ If you are a tech lead or architect evaluating Storm for a production system, th
230
231
231
232
Storm is focused on being a great ORM and SQL template engine. It intentionally does not include:
232
233
233
-
-**Schema migration or DDL generation.** Storm does not create, alter, or drop tables. Use [Flyway](https://flywaydb.org/) or [Liquibase](https://www.liquibase.com/) for schema versioning and migrations.
234
+
-**Schema migration or DDL generation.** Storm does not automatically create, alter, or drop tables at runtime. With Storm's [AI integration](/ai), your coding assistant can read your database schema and generate Flyway or Liquibase migration scripts on demand. For schema versioning, use [Flyway](https://flywaydb.org/) or [Liquibase](https://www.liquibase.com/).
234
235
-**Second-level cache.** Storm's entity cache is transaction-scoped and cleared on commit. For cross-transaction caching, use Spring's `@Cacheable` or a dedicated cache layer like Caffeine or Redis.
235
236
-**Lazy loading proxies.** Entities are plain records with no proxies. Related entities are loaded eagerly in a single query via JOINs. For deferred loading, use [Refs](refs.md) to explicitly control when related data is fetched.
For Ktor applications, add the Ktor plugin module. It provides a `Storm` plugin that manages the DataSource lifecycle, reads HOCON configuration, and exposes the `ORMTemplate` through extension properties on `Application`, `ApplicationCall`, and `RoutingContext`. See [Ktor Integration](ktor-integration.md) for full setup details.
199
+
200
+
```kotlin
201
+
implementation("st.orm:storm-ktor")
202
+
```
203
+
204
+
For testing:
205
+
206
+
```kotlin
207
+
testImplementation("st.orm:storm-ktor-test")
208
+
```
209
+
196
210
### JSON Support
197
211
198
212
Storm supports storing and reading JSON-typed columns. Pick the module that matches your serialization library:
0 commit comments