Link sqlite persistence documentation in architecture overview

This commit is contained in:
Anna Vetcininova
2025-06-24 15:00:09 +02:00
parent a50f82c1ea
commit aa0c62f79a
4 changed files with 25 additions and 4 deletions

View File

@@ -208,6 +208,19 @@ SCM-Manager provides a DAO (data access object) layer to persist data like users
For data persistence beneath the DAO layer, the store layer should be used.
Different types of stores can persist data globally or repository specific.
#### SQLite Persistence Layer
SCM-Manager has introduced a dedicated SQLite persistence layer for specific metadata, including repository-specific data like pull requests
and global or cross-repository data such as metadata used by plugins (e.g., the landing page plugin).
This new persistence approach addresses performance challenges inherent to XML storage, particularly for frequently changing or extensive data.
SQLite was selected due to its performance benefits, cross-platform compatibility, and embedded usage without requiring a separate database server.
The SQLite persistence layer maintains compatibility with existing SCM-Manager functionalities like data export/import,
automatic cleanup, and querying across multiple entries and repositories.
It also preserves simplicity in installation, usage, and plugin integration.
Further details about the SQLite-based persistence layer and its architecture can be found in the [SQLite Documentation](../storage).
## Examples
### Fetch all repositories
One of the main pages in SCM-Manager is the repository overview.

View File

@@ -435,9 +435,12 @@ entity. This means that
- if an entity is stored using the put method with an explicit ID parameter (`DataStore#put(String, T)`), this ID
will be used to store the entity. The ID field of the entity will be set with this given ID.
Please note that if you change the ID field of an entity after it has been stored, the store will not automatically
update the ID in the store. You must explicitly call the `put` method with the new ID to store the entity with the
new ID and remove the old entry with the old ID.
**IMPORTANT:**
If you change the ID field of an entity after it has already been stored, the store will not automatically update the ID entry.
You must explicitly:
- Call the `put()` method with the new ID to store the entity under this ID.
- Remove the previous entry associated with the old ID to prevent inconsistencies.
```java
import lombok.Data;
@@ -476,6 +479,8 @@ public class MyEntity {
}
```
**IMPORTANT:**
This feature cannot be used in combination with an explicit ID field annotated with `@Id`.
## Update Steps
@@ -531,6 +536,7 @@ public class AddTypeToContactsUpdateStep implements UpdateStep {
}
}
```
IMPORTANT:
Please note that the iterator from the `StoreUpdateStepUtilFactory` has to be closed after usage. This is done best with
a try-with-resources block like in the example above.

View File

@@ -10,7 +10,7 @@ Also it is a good guide line to adapt Postel's law: *Be conservative in what you
## Java
Please mind the [EditorConfig](https://editorconfig.org/) file `.editorconfig` in the root of the SCM-Manager and the [configuration guide](docs/en/intellij-idea-configuration.mdation.md) for IntelliJ IDEA. There are plugins for a lot of IDEs and text editors.
Please mind the [EditorConfig](https://editorconfig.org/) file `.editorconfig` in the root of the SCM-Manager and the [configuration guide](../intellij-idea-configuration) for IntelliJ IDEA. There are plugins for a lot of IDEs and text editors.
In the following, there are some rules we have come to value and that we would like to follow. Some are simple, others might need
more skill. If you feel overwhelmed by them, do not let them deter you. We love to support you in keeping these rules.

View File

@@ -0,0 +1,2 @@
- type: added
description: SQLite persistence documentation link in architecture overview documentation