chore: remove deprecated horses, clubs, officials, and persons services
- Deleted obsolete modules related to horses, clubs, officials, and persons services, including their configurations, build files, and database provisioning scripts. - Cleaned up associated references in the project structure (e.g., `settings.gradle.kts`). - Removed unused database tables and Spring beans related to these domains. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -34,9 +34,9 @@ kotlin {
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
// Removed Exposed dependencies to make this module KMP compatible
|
||||
// implementation(libs.exposed.core)
|
||||
// implementation(libs.exposed.jdbc)
|
||||
implementation(libs.exposed.core)
|
||||
implementation(libs.exposed.jdbc)
|
||||
implementation(libs.exposed.kotlin.datetime)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package at.mocode.core.utils.database
|
||||
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.exposed.v1.core.Transaction
|
||||
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
|
||||
import org.jetbrains.exposed.v1.jdbc.transactions.experimental.newSuspendedTransaction
|
||||
|
||||
/**
|
||||
* Utility for database operations using Exposed.
|
||||
*/
|
||||
object DatabaseFactory {
|
||||
|
||||
/**
|
||||
* Executes a database query in a suspended transaction.
|
||||
*/
|
||||
suspend fun <T> dbQuery(block: suspend Transaction.() -> T): T =
|
||||
withContext(Dispatchers.IO) {
|
||||
newSuspendedTransaction {
|
||||
block()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a database query in a blocking transaction.
|
||||
*/
|
||||
fun <T> transaction(block: Transaction.() -> T): T =
|
||||
org.jetbrains.exposed.v1.jdbc.transactions.transaction {
|
||||
block()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user