From 7a39680c61c52eaea2ac459f88cabf63d9e1ec60 Mon Sep 17 00:00:00 2001 From: Bkm016 Date: Sun, 24 Sep 2023 21:39:53 +0800 Subject: [PATCH] 6.0.12 fix database --- .../kotlin/taboolib/module/database/ResultProcessorList.kt | 2 +- .../src/main/kotlin/taboolib/module/database/Table.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/module-database-core/src/main/kotlin/taboolib/module/database/ResultProcessorList.kt b/module/module-database-core/src/main/kotlin/taboolib/module/database/ResultProcessorList.kt index 1696edd45..3d8f83fb2 100644 --- a/module/module-database-core/src/main/kotlin/taboolib/module/database/ResultProcessorList.kt +++ b/module/module-database-core/src/main/kotlin/taboolib/module/database/ResultProcessorList.kt @@ -10,7 +10,7 @@ import java.sql.ResultSet */ open class ResultProcessorList(processors: List, val source: ExecutableSource? = null) { - val processors = processors.toMutableList() + private val processors = processors.toMutableList() /** 是否已经执行 */ var isExecuted = false diff --git a/module/module-database-core/src/main/kotlin/taboolib/module/database/Table.kt b/module/module-database-core/src/main/kotlin/taboolib/module/database/Table.kt index 6f6338ca2..1dc108b1b 100644 --- a/module/module-database-core/src/main/kotlin/taboolib/module/database/Table.kt +++ b/module/module-database-core/src/main/kotlin/taboolib/module/database/Table.kt @@ -32,8 +32,8 @@ open class Table, E : ColumnBuilder>(val name: String, val host: Hos workspace(dataSource) { createTable(checkExists) }.run() } - open fun select(dataSource: DataSource, func: ActionSelect.() -> Unit): ResultProcessor { - return workspace(dataSource) { select(func) }.processors.first() + open fun select(dataSource: DataSource, func: ActionSelect.() -> Unit): ResultProcessorList { + return workspace(dataSource) { select(func) } } open fun find(dataSource: DataSource, func: ActionSelect.() -> Unit): Boolean {