All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.kr.jadekim.jext.exposed.koin.qualifier.kt Maven / Gradle / Ivy

There is a newer version: 2.1.4
Show newest version
package kr.jadekim.jext.exposed.koin

import org.koin.core.qualifier.Qualifier
import org.koin.core.qualifier.QualifierValue

class DSQualifier(val name: String, val isReadOnly: Boolean = false) : Qualifier {

    override val value: QualifierValue = if (isReadOnly) {
        "$name-readonly-datasource"
    } else {
        "$name-datasource"
    }
}

class DBQualifier(val name: String) : Qualifier {

    val crudDSQualifier: DSQualifier by lazy { DSQualifier(name) }
    val readDSQualifier: DSQualifier by lazy { DSQualifier(name, true) }

    override val value: QualifierValue = "$name-db"
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy