diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Common.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Common.kt index 911a377cc..5e3d224df 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Common.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Common.kt @@ -16,7 +16,7 @@ import java.util.* const val RETRIEVABLE_ENTITY_NAME = "retrievable" /** The column name of a retrievable ID. */ -const val RETRIEVABLE_ID_COLUMN_NAME = "retrievableId" +const val RETRIEVABLE_ID_COLUMN_NAME = "retrievableid" /** The column name of a retrievable ID. */ const val RETRIEVABLE_TYPE_COLUMN_NAME = "type" @@ -25,10 +25,10 @@ const val RETRIEVABLE_TYPE_COLUMN_NAME = "type" const val RELATIONSHIP_ENTITY_NAME = "relationships" /** The column name of a retrievable ID. */ -const val SUBJECT_ID_COLUMN_NAME = "subjectId" +const val SUBJECT_ID_COLUMN_NAME = "subjectid" /** The column name of a retrievable ID. */ -const val OBJECT_ID_COLUMN_NAME = "objectId" +const val OBJECT_ID_COLUMN_NAME = "objectid" /** The column name of a retrievable ID. */ const val PREDICATE_COLUMN_NAME = "predicate" @@ -37,7 +37,7 @@ const val PREDICATE_COLUMN_NAME = "predicate" const val DESCRIPTOR_ENTITY_PREFIX = "descriptor" /** The column name of a descriptor ID. */ -const val DESCRIPTOR_ID_COLUMN_NAME = "descriptorId" +const val DESCRIPTOR_ID_COLUMN_NAME = "descriptorid" /** The column name used to describe a distance.*/ const val DISTANCE_COLUMN_NAME = "distance" diff --git a/vitrivr-engine-module-jsonl/src/main/kotlin/org/vitrivr/engine/database/jsonl/JsonlConnection.kt b/vitrivr-engine-module-jsonl/src/main/kotlin/org/vitrivr/engine/database/jsonl/JsonlConnection.kt index 8cf018bd6..eb5b42fe6 100644 --- a/vitrivr-engine-module-jsonl/src/main/kotlin/org/vitrivr/engine/database/jsonl/JsonlConnection.kt +++ b/vitrivr-engine-module-jsonl/src/main/kotlin/org/vitrivr/engine/database/jsonl/JsonlConnection.kt @@ -48,10 +48,10 @@ class JsonlConnection( companion object { /** The column name of a retrievable ID. */ - const val RETRIEVABLE_ID_COLUMN_NAME = "retrievableId" + const val RETRIEVABLE_ID_COLUMN_NAME = "retrievableid" /** The column name of a descriptor ID. */ - const val DESCRIPTOR_ID_COLUMN_NAME = "descriptorId" + const val DESCRIPTOR_ID_COLUMN_NAME = "descriptorid" } } \ No newline at end of file diff --git a/vitrivr-engine-module-pgvector/src/main/kotlin/org/vitrivr/engine/database/pgvector/descriptor/vector/VectorDescriptorReader.kt b/vitrivr-engine-module-pgvector/src/main/kotlin/org/vitrivr/engine/database/pgvector/descriptor/vector/VectorDescriptorReader.kt index f74a60c41..5176b5d3f 100644 --- a/vitrivr-engine-module-pgvector/src/main/kotlin/org/vitrivr/engine/database/pgvector/descriptor/vector/VectorDescriptorReader.kt +++ b/vitrivr-engine-module-pgvector/src/main/kotlin/org/vitrivr/engine/database/pgvector/descriptor/vector/VectorDescriptorReader.kt @@ -97,7 +97,7 @@ class VectorDescriptorReader(field: Schema.Field<*, VectorDescriptor<*>>, connec */ private fun queryProximity(query: ProximityQuery<*>): Sequence> = sequence { val statement = - "SELECT $DESCRIPTOR_ID_COLUMN_NAME, $RETRIEVABLE_ID_COLUMN_NAME, $VECTOR_ATTRIBUTE_NAME, $VECTOR_ATTRIBUTE_NAME ${query.distance.toSql()} ? AS $DISTANCE_COLUMN_NAME FROM ${tableName} ORDER BY $DISTANCE_COLUMN_NAME ${query.order} LIMIT ${query.k}" + "SELECT $DESCRIPTOR_ID_COLUMN_NAME, $RETRIEVABLE_ID_COLUMN_NAME, $VECTOR_ATTRIBUTE_NAME, $VECTOR_ATTRIBUTE_NAME ${query.distance.toSql()} ? AS $DISTANCE_COLUMN_NAME FROM \"${tableName.lowercase()}\" ORDER BY $DISTANCE_COLUMN_NAME ${query.order} LIMIT ${query.k}" this@VectorDescriptorReader.connection.jdbc.prepareStatement(statement).use { stmt -> stmt.setValue(1, query.value) stmt.executeQuery().use { result -> @@ -117,7 +117,7 @@ class VectorDescriptorReader(field: Schema.Field<*, VectorDescriptor<*>>, connec private fun queryAndJoinProximity(query: ProximityQuery<*>): Sequence { val descriptors = mutableListOf, Float>>() val statement = - "SELECT $DESCRIPTOR_ID_COLUMN_NAME, $RETRIEVABLE_ID_COLUMN_NAME, $VECTOR_ATTRIBUTE_NAME, $VECTOR_ATTRIBUTE_NAME ${query.distance.toSql()} ? AS $DISTANCE_COLUMN_NAME FROM ${tableName} ORDER BY $DISTANCE_COLUMN_NAME ${query.order} LIMIT ${query.k}" + "SELECT $DESCRIPTOR_ID_COLUMN_NAME, $RETRIEVABLE_ID_COLUMN_NAME, $VECTOR_ATTRIBUTE_NAME, $VECTOR_ATTRIBUTE_NAME ${query.distance.toSql()} ? AS $DISTANCE_COLUMN_NAME FROM \"${tableName.lowercase()}\" ORDER BY $DISTANCE_COLUMN_NAME ${query.order} LIMIT ${query.k}" this@VectorDescriptorReader.connection.jdbc.prepareStatement(statement).use { stmt -> stmt.setValue(1, query.value) stmt.executeQuery().use { result ->