From 7ce8b3836e237a606c61817c9da83e4caddd61ef Mon Sep 17 00:00:00 2001 From: Ralph Gasser Date: Thu, 28 Mar 2024 10:57:50 +0100 Subject: [PATCH] Connection now exposes ConnectionProvider. Signed-off-by: Ralph Gasser --- .../org/vitrivr/engine/core/database/AbstractConnection.kt | 2 +- .../main/kotlin/org/vitrivr/engine/core/database/Connection.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/AbstractConnection.kt b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/AbstractConnection.kt index dbeff83e..5fea0596 100644 --- a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/AbstractConnection.kt +++ b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/AbstractConnection.kt @@ -14,7 +14,7 @@ import org.vitrivr.engine.core.model.metamodel.Schema * @version 1.0.0 */ @Suppress("UNCHECKED_CAST") -abstract class AbstractConnection(override val schemaName: String, private val provider: ConnectionProvider): Connection { +abstract class AbstractConnection(override val schemaName: String, override val provider: ConnectionProvider) : Connection { /** An internal [Map] of registered [Reader], [Writer] and [Initializer] instances. */ private val readers: Map, DescriptorReader<*>> = HashMap() diff --git a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/Connection.kt b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/Connection.kt index 92507c76..b78458df 100644 --- a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/Connection.kt +++ b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/database/Connection.kt @@ -18,6 +18,9 @@ import java.io.Closeable */ sealed interface Connection: Closeable { + /** The [ConnectionProvider] used to create this [Connection]. */ + val provider: ConnectionProvider + /** The name of the [Schema] managed by this [Connection]. */ val schemaName: String