Aligning with exposed 0.61
This commit is contained in:
parent
931e60c301
commit
9b0b0766aa
@ -22,7 +22,7 @@ repositories {
|
||||
}
|
||||
|
||||
|
||||
val exposedVersion = "0.44.0"
|
||||
val exposedVersion = "0.61.0"
|
||||
dependencies {
|
||||
|
||||
/*Spring boot*/
|
||||
|
||||
@ -20,7 +20,7 @@ object ContentCatalogStore {
|
||||
*/
|
||||
fun getCollectionByTitleAndType(type: String, titles: List<String>): String? {
|
||||
return withTransaction(getStoreDatabase()) {
|
||||
CatalogTable.select {
|
||||
CatalogTable.selectAll().where {
|
||||
(CatalogTable.type eq type) and
|
||||
((CatalogTable.title inList titles) or
|
||||
(CatalogTable.collection inList titles))
|
||||
@ -32,7 +32,7 @@ object ContentCatalogStore {
|
||||
|
||||
private fun getCover(collection: String, type: String): String? {
|
||||
return withTransaction(getStoreDatabase()) {
|
||||
CatalogTable.select {
|
||||
CatalogTable.selectAll().where {
|
||||
(CatalogTable.collection eq collection) and
|
||||
(CatalogTable.type eq type)
|
||||
}.map { it[CatalogTable.cover] }.firstOrNull()
|
||||
@ -41,7 +41,7 @@ object ContentCatalogStore {
|
||||
|
||||
fun storeCatalog(title: String, titles: List<String>, collection: String, type: String, cover: String?, genres: String?): Int? {
|
||||
val status = executeWithStatus(getStoreDatabase().database, run = {
|
||||
val existingRow = CatalogTable.select {
|
||||
val existingRow = CatalogTable.selectAll().where {
|
||||
(CatalogTable.collection eq collection) and
|
||||
(CatalogTable.type eq type)
|
||||
}.firstOrNull()
|
||||
@ -157,7 +157,7 @@ object ContentCatalogStore {
|
||||
|
||||
private fun getId(title: String, titles: List<String>, collection: String, type: String): Int? {
|
||||
val ids = withTransaction(getStoreDatabase().database) {
|
||||
CatalogTable.select {
|
||||
CatalogTable.selectAll().where {
|
||||
((CatalogTable.title eq title)
|
||||
or (CatalogTable.collection eq collection)
|
||||
or (CatalogTable.title inList titles)) and
|
||||
|
||||
@ -7,6 +7,7 @@ import no.iktdev.streamit.library.db.withTransaction
|
||||
import org.jetbrains.exposed.sql.insertIgnore
|
||||
import org.jetbrains.exposed.sql.or
|
||||
import org.jetbrains.exposed.sql.select
|
||||
import org.jetbrains.exposed.sql.selectAll
|
||||
|
||||
object ContentTitleStore {
|
||||
|
||||
@ -31,7 +32,7 @@ object ContentTitleStore {
|
||||
|
||||
fun findMasterTitles(titleList: List<String>): List<String> {
|
||||
return withTransaction(getStoreDatabase().database, run = {
|
||||
TitleTable.select {
|
||||
TitleTable.selectAll().where {
|
||||
(TitleTable.alternativeTitle inList titleList) or
|
||||
(TitleTable.masterTitle inList titleList)
|
||||
}.map {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user