<commit_before>package org.vitrivr.cineast.core.db;

import org.vitrivr.cineast.core.config.QueryConfig;
import org.vitrivr.cineast.core.data.StringDoublePair;
import org.vitrivr.cineast.core.data.providers.primitive.PrimitiveTypeProvider;

import java.util.List;
import java.util.Map;

public interface DBSelector {

	boolean open(String name);
	
	boolean close();
	/**
	 * @return a list of pairs containing an id and the distance to the query vector
	 */
	List<StringDoublePair> getNearestNeighbours(int k, float[] vector, String column, QueryConfig config);
	
	List<Map<String, PrimitiveTypeProvider>> getNearestNeighbourRows(int k, float[] vector, String column, QueryConfig config);
	
	List<float[]> getFeatureVectors(String fieldName, String value, String vectorName);
	
	List<Map<String, PrimitiveTypeProvider>> getRows(String fieldName, String value);

	/**
	 * SELECT column from the table. Be careful with large entities
	 */
    List<PrimitiveTypeProvider> getAll(String column);

	/**
	 * SELECT * from
	 */
	List<Map<String, PrimitiveTypeProvider>> getAll();

	boolean existsEntity(String name);

	/** Get first 100 rows since the preview-support of adampro does not include a limit.*/
	List<Map<String, PrimitiveTypeProvider>> preview();
}<commit_msg>Added In-Clause to DBSelector Interface<commit_after>package org.vitrivr.cineast.core.db;

import org.vitrivr.cineast.core.config.QueryConfig;
import org.vitrivr.cineast.core.data.StringDoublePair;
import org.vitrivr.cineast.core.data.providers.primitive.PrimitiveTypeProvider;

import java.util.List;
import java.util.Map;

public interface DBSelector {

	boolean open(String name);
	
	boolean close();
	/**
	 * @return a list of pairs containing an id and the distance to the query vector
	 */
	List<StringDoublePair> getNearestNeighbours(int k, float[] vector, String column, QueryConfig config);
	
	List<Map<String, PrimitiveTypeProvider>> getNearestNeighbourRows(int k, float[] vector, String column, QueryConfig config);
	
	List<float[]> getFeatureVectors(String fieldName, String value, String vectorName);
	
	List<Map<String, PrimitiveTypeProvider>> getRows(String fieldName, String value);

	List<Map<String, PrimitiveTypeProvider>> getRows(String fieldName, String... value);

	/**
	 * SELECT column from the table. Be careful with large entities
	 */
    List<PrimitiveTypeProvider> getAll(String column);

	/**
	 * SELECT * from
	 */
	List<Map<String, PrimitiveTypeProvider>> getAll();

	boolean existsEntity(String name);

	/** Get first 100 rows since the preview-support of adampro does not include a limit.*/
	List<Map<String, PrimitiveTypeProvider>> preview();
}
{'fraction_non_alphanumeric': 0.10699432892249527, 'fraction_numerical': 0.002268431001890359, 'mean_word_length': 5.406779661016949, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6030755', 'n_tokens_mistral': 826, 'n_tokens_neox': 759, 'n_words': 220}