Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ build/
.DS_Store

### Maven Flatten Plugin ###
.flattened-pom.xml
**/.flattened-pom.xml

### Docusaurus ###
website/node_modules/
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Storm provides a Bill of Materials (BOM) for centralized version management. Imp
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-bom</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -155,7 +155,7 @@ Storm provides a Bill of Materials (BOM) for centralized version management. Imp

```kotlin
dependencies {
implementation(platform("st.orm:storm-bom:1.11.0"))
implementation(platform("st.orm:storm-bom:@@STORM_VERSION@@"))
}
```

Expand All @@ -165,7 +165,7 @@ With the BOM imported, add Storm modules without specifying versions:

```kotlin
dependencies {
implementation(platform("st.orm:storm-bom:1.11.0"))
implementation(platform("st.orm:storm-bom:@@STORM_VERSION@@"))
implementation("st.orm:storm-kotlin")
runtimeOnly("st.orm:storm-core")
// Use storm-compiler-plugin-2.0 for Kotlin 2.0.x, -2.1 for 2.1.x, etc.
Expand Down
8 changes: 4 additions & 4 deletions docs/api-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The main Java API module. It provides the `ORMTemplate` entry point, repository
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-java21</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
</dependency>
```

Expand Down Expand Up @@ -44,7 +44,7 @@ Spring Framework integration for Java. Provides `RepositoryBeanFactoryPostProces
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-spring</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
</dependency>
```

Expand All @@ -58,7 +58,7 @@ Spring Boot auto-configuration for Java. Automatically creates an `ORMTemplate`
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-spring-boot-starter</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
</dependency>
```

Expand All @@ -83,7 +83,7 @@ The `storm-metamodel-processor` annotation processor generates type-safe metamod
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-metamodel-processor</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>provided</scope>
</dependency>
```
Expand Down
12 changes: 6 additions & 6 deletions docs/api-kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The main Kotlin API module. It provides the `ORMTemplate` interface, extension f

```kotlin
// Gradle (Kotlin DSL)
implementation("st.orm:storm-kotlin:1.11.0")
implementation("st.orm:storm-kotlin:@@STORM_VERSION@@")
```

```xml
<!-- Maven -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-kotlin</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
</dependency>
```

Expand All @@ -33,7 +33,7 @@ The Kotlin API does not depend on any preview features. All APIs are stable and
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.

```kotlin
implementation("st.orm:storm-kotlin-spring:1.11.0")
implementation("st.orm:storm-kotlin-spring:@@STORM_VERSION@@")
```

See [Spring Integration](spring-integration.md) for configuration details.
Expand All @@ -43,7 +43,7 @@ See [Spring Integration](spring-integration.md) for configuration details.
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.

```kotlin
implementation("st.orm:storm-kotlin-spring-boot-starter:1.11.0")
implementation("st.orm:storm-kotlin-spring-boot-starter:@@STORM_VERSION@@")
```

See [Spring Integration: Spring Boot Starter](spring-integration.md#spring-boot-starter) for what the starter provides and how to override its defaults.
Expand Down Expand Up @@ -96,7 +96,7 @@ plugins {
}

dependencies {
ksp("st.orm:storm-metamodel-ksp:1.11.0")
ksp("st.orm:storm-metamodel-ksp:@@STORM_VERSION@@")
}
```

Expand All @@ -115,7 +115,7 @@ dependencies {
<path>
<groupId>st.orm</groupId>
<artifactId>storm-metamodel-processor</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down
14 changes: 7 additions & 7 deletions docs/batch-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Database performance often degrades when applications issue many individual SQL

## Batch Processing

When you pass a list of entities to Storm's insert, update, delete, or upsert methods, Storm automatically uses JDBC batch statements. The framework groups rows together and sends them to the database in a single round-trip, rather than issuing one statement per entity.
When you pass a list of entities to Storm's insert, update, remove, or upsert methods, Storm automatically uses JDBC batch statements. The framework groups rows together and sends them to the database in a single round-trip, rather than issuing one statement per entity.

### Batch Insert

Expand Down Expand Up @@ -73,25 +73,25 @@ orm.entity(User.class).update(updatedUsers);
</TabItem>
</Tabs>

### Batch Delete
### Batch Remove

Batch deletes remove multiple entities in a single round-trip. Storm generates a batched DELETE using each entity's primary key.
Batch removes delete multiple entities in a single round-trip. Storm generates a batched DELETE using each entity's primary key.

<Tabs groupId="language">
<TabItem value="kotlin" label="Kotlin" default>

```kotlin
orm delete users
orm remove users

// Or delete all entities of a type
orm.deleteAll<User>()
// Or remove all entities of a type
orm.removeAll<User>()
```

</TabItem>
<TabItem value="java" label="Java">

```java
orm.entity(User.class).delete(users);
orm.entity(User.class).remove(users);
```

</TabItem>
Expand Down
42 changes: 21 additions & 21 deletions docs/dialects.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,55 +28,55 @@ Add the dialect dependency for your database. Dialects are runtime-only dependen
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-oracle</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- MS SQL Server -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-mssqlserver</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- PostgreSQL -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-postgresql</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- MySQL -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-mysql</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- MariaDB -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-mariadb</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- SQLite -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-sqlite</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>

<!-- H2 -->
<dependency>
<groupId>st.orm</groupId>
<artifactId>storm-h2</artifactId>
<version>1.11.0</version>
<version>@@STORM_VERSION@@</version>
<scope>runtime</scope>
</dependency>
```
Expand All @@ -85,50 +85,50 @@ Add the dialect dependency for your database. Dialects are runtime-only dependen

```groovy
// Oracle
runtimeOnly 'st.orm:storm-oracle:1.11.0'
runtimeOnly 'st.orm:storm-oracle:@@STORM_VERSION@@'

// MS SQL Server
runtimeOnly 'st.orm:storm-mssqlserver:1.11.0'
runtimeOnly 'st.orm:storm-mssqlserver:@@STORM_VERSION@@'

// PostgreSQL
runtimeOnly 'st.orm:storm-postgresql:1.11.0'
runtimeOnly 'st.orm:storm-postgresql:@@STORM_VERSION@@'

// MySQL
runtimeOnly 'st.orm:storm-mysql:1.11.0'
runtimeOnly 'st.orm:storm-mysql:@@STORM_VERSION@@'

// MariaDB
runtimeOnly 'st.orm:storm-mariadb:1.11.0'
runtimeOnly 'st.orm:storm-mariadb:@@STORM_VERSION@@'

// SQLite
runtimeOnly 'st.orm:storm-sqlite:1.11.0'
runtimeOnly 'st.orm:storm-sqlite:@@STORM_VERSION@@'

// H2
runtimeOnly 'st.orm:storm-h2:1.11.0'
runtimeOnly 'st.orm:storm-h2:@@STORM_VERSION@@'
```

### Gradle (Kotlin DSL)

```kotlin
// Oracle
runtimeOnly("st.orm:storm-oracle:1.11.0")
runtimeOnly("st.orm:storm-oracle:@@STORM_VERSION@@")

// MS SQL Server
runtimeOnly("st.orm:storm-mssqlserver:1.11.0")
runtimeOnly("st.orm:storm-mssqlserver:@@STORM_VERSION@@")

// PostgreSQL
runtimeOnly("st.orm:storm-postgresql:1.11.0")
runtimeOnly("st.orm:storm-postgresql:@@STORM_VERSION@@")

// MySQL
runtimeOnly("st.orm:storm-mysql:1.11.0")
runtimeOnly("st.orm:storm-mysql:@@STORM_VERSION@@")

// MariaDB
runtimeOnly("st.orm:storm-mariadb:1.11.0")
runtimeOnly("st.orm:storm-mariadb:@@STORM_VERSION@@")

// SQLite
runtimeOnly("st.orm:storm-sqlite:1.11.0")
runtimeOnly("st.orm:storm-sqlite:@@STORM_VERSION@@")

// H2
runtimeOnly("st.orm:storm-h2:1.11.0")
runtimeOnly("st.orm:storm-h2:@@STORM_VERSION@@")
```

## Automatic Detection
Expand Down
2 changes: 1 addition & 1 deletion docs/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ record User(@PK Integer id,

## Entity Interface

Implementing the `Entity<ID>` interface is optional but required for using `EntityRepository` with built-in CRUD operations. The type parameter specifies the primary key type. Without this interface, you can still use Storm's SQL template features and query builder, but you lose the convenience methods like `findById`, `insert`, `update`, and `delete`. If you only need read access, consider using `Projection<ID>` instead (see [Projections](projections.md)).
Implementing the `Entity<ID>` interface is optional but required for using `EntityRepository` with built-in CRUD operations. The type parameter specifies the primary key type. Without this interface, you can still use Storm's SQL template features and query builder, but you lose the convenience methods like `findById`, `insert`, `update`, and `remove`. If you only need read access, consider using `Projection<ID>` instead (see [Projections](projections.md)).

Storm also supports polymorphic entity hierarchies using sealed interfaces. A sealed interface extending `Entity` can define multiple record subtypes, enabling Single-Table or Joined Table inheritance with compile-time exhaustive pattern matching. See [Polymorphism](polymorphism.md) for details.

Expand Down
8 changes: 4 additions & 4 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,20 +345,20 @@ userRepository.delete()
</TabItem>
</Tabs>

If you genuinely need to delete all rows from a table, use the `deleteAll()` convenience method:
If you genuinely need to delete all rows from a table, use the `removeAll()` convenience method:

<Tabs groupId="language">
<TabItem value="kotlin" label="Kotlin" default>

```kotlin
userRepository.deleteAll()
userRepository.removeAll()
```

</TabItem>
<TabItem value="java" label="Java">

```java
userRepository.deleteAll();
userRepository.removeAll();
```

</TabItem>
Expand All @@ -383,7 +383,7 @@ userRepository.delete().unsafe().executeUpdate();
</TabItem>
</Tabs>

The `unsafe()` method signals that the absence of a WHERE clause is intentional. Without it, Storm assumes the missing WHERE clause is a mistake. The `deleteAll()` convenience method calls `unsafe()` internally.
The `unsafe()` method signals that the absence of a WHERE clause is intentional. Without it, Storm assumes the missing WHERE clause is a mistake. The `removeAll()` convenience method calls `unsafe()` internally.

### Can I use database-specific functions?

Expand Down
8 changes: 4 additions & 4 deletions docs/first-entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,20 @@ users.update(new User(user.id(), user.email(), "Alice Johnson", user.city()));
</TabItem>
</Tabs>

## Delete a Record
## Remove a Record

<Tabs groupId="language">
<TabItem value="kotlin" label="Kotlin" default>

```kotlin
orm delete user
orm remove user
```

</TabItem>
<TabItem value="java" label="Java">

```java
users.delete(user);
users.remove(user);
```

</TabItem>
Expand Down Expand Up @@ -267,7 +267,7 @@ You have now seen the core workflow:

1. Define entities as data classes or records with `@PK` and `@FK` annotations
2. Create an `ORMTemplate` from a `DataSource`
3. Use `insert`, `findById`, `update`, and `delete` for basic CRUD
3. Use `insert`, `findById`, `update`, and `remove` for basic CRUD

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion docs/first-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ val user = userRepository.findByEmail("alice@example.com")
val usersInCity = userRepository.findByNameInCity("Alice", city)
```

Custom repositories inherit all built-in CRUD operations (`insert`, `findById`, `update`, `delete`, etc.) from `EntityRepository`. You only add methods for domain-specific queries.
Custom repositories inherit all built-in CRUD operations (`insert`, `findById`, `update`, `remove`, etc.) from `EntityRepository`. You only add methods for domain-specific queries.

</TabItem>
<TabItem value="java" label="Java">
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Set up your project with the right dependencies, build flags, and optional modul

**2. First Entity**

Define your first entity, create an ORM template, and perform insert, read, update, and delete operations.
Define your first entity, create an ORM template, and perform insert, read, update, and remove operations.

**[Go to First Entity](first-entity.md)**

Expand Down
2 changes: 1 addition & 1 deletion docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This page defines key terms used throughout the Storm documentation.
The process of determining which fields of an entity have changed since it was last read from the database. Storm compares the current entity state against the observed state stored in the transaction context. Only changed columns are included in the UPDATE statement. Because entities are immutable, dirty checking is fast and requires no bytecode manipulation. See [Dirty Checking](dirty-checking.md).

**Entity**
A Kotlin data class or Java record that implements the `Entity<ID>` interface and maps to a database table. Entities support full CRUD operations (insert, update, delete) through repositories. They are stateless and immutable, with no proxies or hidden state. See [Entities](entities.md).
A Kotlin data class or Java record that implements the `Entity<ID>` interface and maps to a database table. Entities support full CRUD operations (insert, update, remove) through repositories. They are stateless and immutable, with no proxies or hidden state. See [Entities](entities.md).

**Entity Cache**
A transaction-scoped cache that stores entities by primary key during a transaction. It avoids redundant database round-trips, skips repeated object construction during hydration, preserves object identity within a transaction, and tracks observed state for dirty checking. The cache is automatically cleared on commit or rollback. See [Entity Cache](entity-cache.md).
Expand Down
Loading
Loading