|
|
||
|---|---|---|
| .idea | ||
| gradle/wrapper | ||
| roomex-android | ||
| roomex-common | ||
| roomex-processor | ||
| roomex-sample | ||
| .gitignore | ||
| build.gradle.kts | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE.md | ||
| README.md | ||
| settings.gradle.kts | ||
RoomEx
Extension for Android Room to simplify creating, resolving and working with database relations.
RoomEx allows you to define relations between entities:
@Entity
class Address(
var streetName: String,
var city: String,
var houseNumber: String
): RoomExEntity() { }
@Entity
class User(
var userName: String,
var email: String
): RoomExEntity() {
@Ignore
@OneToOneEx(cascade = Cascade.All) // Here, a 1:1 relation will be created, with create, read, update and delete cascade
var address: Address? = null
}
Installing
With repository
The release of RoomEx on the Maven Repository is still pending. As soon as RoomEx is available through the repository, you can add RoomEx as a dependency:
implementation("de.dutches.roomex:roomex-android:1.7.21-0.9.0") // 1.7.21 = kotlin version, 0.9.0 = roomex version
implementation("de.dutches.roomex:roomex-common:1.7.21-0.9.0")
ksp("de.dutches.roomex:roomex-processor:1.7.21-0.9.0")
Also add the KSP plugin to your plugins:
id("com.google.devtools.ksp")
Built With
- Room - Database Object Mapping library
- KSP - Kotlin Symbol Processing API
- KotlinPoet - API for generating code files
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use Semantic Versioning for versioning.
RoomEx has been built using KSP. KSP releases are tightly coupled to specific Kotlin versions.
Therefore, make sure the version matches your Kotlin version.
RoomEx uses the following naming pattern for releases:
RoomEx-KotlinVersion-RoomExVersion
For the versions available, see the tags on this repository.
Authors
- Marcel van der Heide - Idea and initial source code - FlyingDutchman
License
This project is licensed under the MIT license - see the LICENSE.md file for details