-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
184 changed files
with
5,112 additions
and
3,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ main, dev ] | ||
pull_request: | ||
branches: [ main, dev ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
# Setup Cottontail DB and PostgreSQL service container | ||
services: | ||
cottontail: | ||
image: vitrivr/cottontaildb:0.16.7 | ||
ports: | ||
- 1865:1865 | ||
options: -it | ||
pgvector: | ||
image: pgvector/pgvector:pg16 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: vitrivr | ||
|
||
# Start actual job. | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cottontail DB connection test | ||
run: nc -zv 127.0.0.1 1865 | ||
- name: PostgreSQL connection test | ||
run: nc -zv 127.0.0.1 5432 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
- name: Test with gradle ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
run: ./gradlew test --info | ||
- name: Test with gradle windows | ||
if: matrix.os == 'windows-latest' | ||
run: ./gradlew test --info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/config/schema/IndexConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.vitrivr.engine.core.config.schema | ||
|
||
import kotlinx.serialization.Serializable | ||
import org.vitrivr.engine.core.model.descriptor.AttributeName | ||
import org.vitrivr.engine.core.model.metamodel.Schema | ||
|
||
/** | ||
* A serializable configuration object to configure indexes for a [Schema.Field] within a [Schema]. | ||
* | ||
* @see [Schema.Field] | ||
* | ||
* @author Ralph Gasser | ||
* @version 1.0.0 | ||
*/ | ||
@Serializable | ||
data class IndexConfig(val attributes: List<AttributeName>, val type: IndexType, val parameters: Map<String, String> = emptyMap()) { | ||
init { | ||
require(attributes.isNotEmpty()) { "Cannot define index on empty list of attributes." } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/config/schema/IndexType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.vitrivr.engine.core.config.schema | ||
|
||
/** | ||
* The type of index that can be created on a [Schema.Field]. | ||
*/ | ||
enum class IndexType { | ||
/** A B-tree based index. Well-suited for point-lookups and Boolean search on scalar values. */ | ||
SCALAR, | ||
|
||
/** A fulltext index. Well-suited for fulltext-queries. */ | ||
FULLTEXT, | ||
|
||
/** Index suited for NNS. */ | ||
NNS | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ngine-core/src/main/kotlin/org/vitrivr/engine/core/database/AbstractConnectionProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.vitrivr.engine.core.database | ||
|
||
import org.vitrivr.engine.core.database.descriptor.DescriptorProvider | ||
import org.vitrivr.engine.core.model.descriptor.Descriptor | ||
import kotlin.reflect.KClass | ||
|
||
/** | ||
* Abstract implementation of the [ConnectionProvider] interface, which provides basic facilities to register [DescriptorProvider]s. | ||
* | ||
* @author Ralph Gasser | ||
* @version 1.0.0 | ||
*/ | ||
abstract class AbstractConnectionProvider: ConnectionProvider { | ||
/** A map of registered [DescriptorProvider]. */ | ||
protected val registered: MutableMap<KClass<*>, DescriptorProvider<*>> = HashMap() | ||
|
||
|
||
init { | ||
this.initialize() | ||
} | ||
|
||
/** | ||
* This method is called during initialization of the [AbstractConnectionProvider] and can be used to register [DescriptorProvider]s. | ||
*/ | ||
abstract fun initialize() | ||
|
||
/** | ||
* Registers an [DescriptorProvider] for a particular [KClass] of [Descriptor] with this [Connection]. | ||
* | ||
* This method is an extension point to add support for new [Descriptor]s to a pre-existing database driver. | ||
* | ||
* @param descriptorClass The [KClass] of the [Descriptor] to register [DescriptorProvider] for. | ||
* @param provider The [DescriptorProvider] to register. | ||
*/ | ||
override fun <T : Descriptor> register(descriptorClass: KClass<T>, provider: DescriptorProvider<*>) { | ||
this.registered[descriptorClass] = provider | ||
} | ||
|
||
/** | ||
* Obtains an [DescriptorProvider] for a particular [KClass] of [Descriptor], that has been registered with this [ConnectionProvider]. | ||
* | ||
* @param descriptorClass The [KClass] of the [Descriptor] to lookup [DescriptorProvider] for. | ||
* @return The registered [DescriptorProvider] . | ||
*/ | ||
@Suppress("UNCHECKED_CAST") | ||
override fun <T : Descriptor> obtain(descriptorClass: KClass<T>): DescriptorProvider<T> { | ||
val provider = this.registered[descriptorClass] ?: throw IllegalStateException("No DescriptorProvider registered for $descriptorClass.") | ||
return provider as DescriptorProvider<T> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.