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/api-kotlin.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,15 @@ The main Kotlin API module. It provides the `ORMTemplate` interface, extension f
14
14
15
15
```kotlin
16
16
// Gradle (Kotlin DSL)
17
-
implementation("st.orm:storm-kotlin:1.10.0")
17
+
implementation("st.orm:storm-kotlin:1.11.0")
18
18
```
19
19
20
20
```xml
21
21
<!-- Maven -->
22
22
<dependency>
23
23
<groupId>st.orm</groupId>
24
24
<artifactId>storm-kotlin</artifactId>
25
-
<version>1.10.0</version>
25
+
<version>1.11.0</version>
26
26
</dependency>
27
27
```
28
28
@@ -33,7 +33,7 @@ The Kotlin API does not depend on any preview features. All APIs are stable and
33
33
Spring Framework integration for Kotlin. Provides `RepositoryBeanFactoryPostProcessor` for repository auto-discovery and injection, `@EnableTransactionIntegration` for bridging Storm's programmatic transactions with Spring's `@Transactional`, and transaction-aware coroutine support. Add this module when you use Spring Framework without Spring Boot.
See [Spring Integration](spring-integration.md) for configuration details.
@@ -43,7 +43,7 @@ See [Spring Integration](spring-integration.md) for configuration details.
43
43
Spring Boot auto-configuration for Kotlin. Automatically creates an `ORMTemplate` bean from the `DataSource`, discovers repositories, enables transaction integration, and binds `storm.*` properties from `application.yml`. This is the recommended dependency for Spring Boot applications.
See [Spring Integration: Spring Boot Starter](spring-integration.md#spring-boot-starter) for what the starter provides and how to override its defaults.
Copy file name to clipboardExpand all lines: docs/common-patterns.md
+32-21Lines changed: 32 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -357,9 +357,9 @@ public class SoftDeleteGuard implements EntityCallback<Customer> {
357
357
358
358
---
359
359
360
-
## Pagination
360
+
## Pagination and Scrolling
361
361
362
-
Storm provides built-in types for both offset-based and keyset-based pagination, so you do not need to define your own page wrappers or write raw `LIMIT`/`OFFSET` queries.
362
+
Storm provides two strategies for traversing large result sets: pagination (by page number) and scrolling (by cursor). You do not need to define your own page wrappers or write raw `LIMIT`/`OFFSET` queries.
Use the `slice()`, `sliceAfter()`, and `sliceBefore()` methods on any entity repository. These use a unique column value (typically the primary key) as a cursor, which lets the database seek directly to the correct position using an index.
448
+
Use the `scroll()` method on any entity repository with a `Scrollable` that captures the cursor state. These navigate sequentially using a unique column value (typically the primary key) as a cursor, which lets the database seek directly to the correct position using an index.
Each method returns a `Slice` containing the page content and a `hasNext` flag. See [Repositories: Keyset Pagination](repositories.md#keyset-pagination) for the full API, including sort overloads, filtering, and ref variants.
489
+
Each method returns a `Window` containing the page content, a `hasNext` flag, and navigation tokens (`nextScrollable()`, `previousScrollable()`) for sequential traversal. For REST APIs, `Window` also provides `nextCursor()` and `previousCursor()` to serialize the scroll position as an opaque string, and `Scrollable.fromCursor(key, cursor)` to reconstruct a `Scrollable` from a cursor string. See [Repositories: Scrolling](repositories.md#scrolling) for the full API, including sort overloads, filtering, and Ref variants.
Use offset-based pagination when you need random page access or a total count (for example, displaying "Page 3 of 12" in a UI). Use keyset pagination when you need consistent performance over deep result sets or when the data changes frequently between requests.
506
+
Use pagination when you need random page access or a total count (for example, displaying "Page 3 of 12" in a UI). Use scrolling when you need consistent performance over deep result sets or when the data changes frequently between requests.
|`storm.validation.strict`|`false`| Treat schema validation warnings as errors |
22
22
|`storm.validation.interpolation_mode`|`warn`| Interpolation safety mode: `warn`, `fail`, or `none` (see [Interpolation Safety](#interpolation-safety)) |
23
+
|`st.orm.scrollable.maxSize`|`1000`| Maximum window size allowed in a serialized cursor (system property only) |
23
24
24
25
### Setting Properties
25
26
@@ -490,6 +491,22 @@ record Order(@PK Integer id,
490
491
491
492
---
492
493
494
+
## Scrolling Properties
495
+
496
+
### st.orm.scrollable.maxSize
497
+
498
+
Sets the maximum window size that a deserialized cursor (via `Scrollable.fromCursor()`) is allowed to carry. This is a safety limit that prevents untrusted clients from requesting excessively large pages through cursor manipulation. The limit is only enforced when deserializing a cursor string; programmatic usage via `Scrollable.of()` is not restricted.
499
+
500
+
This property is a JVM system property only; it is not configurable through `StormConfig` or `application.yml`, because it applies at the `Scrollable` record level in storm-foundation, before any ORM template is created.
Repository or API layers may choose to enforce stricter per-endpoint limits on top of this framework-level bound.
507
+
508
+
---
509
+
493
510
## Dirty Checking Properties
494
511
495
512
These properties control how Storm detects changes to entities during update operations. Dirty checking determines whether an UPDATE statement is sent to the database and, if so, which columns it includes. Choosing the right mode depends on your entity size, update frequency, and whether you use immutable records or mutable objects. See [Dirty Checking](dirty-checking.md) for a detailed explanation of each strategy.
0 commit comments