Added tuple columns containing immutable indexed data arrays of any type
This commit is contained in:
@ -890,6 +890,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
index_t nb_elements_per_line,
|
||||
char* elements_names,
|
||||
bool elt_names_formatted,
|
||||
bool tuples,
|
||||
const char* indexer_name,
|
||||
const char* associated_column_name,
|
||||
obiversion_t associated_column_version,
|
||||
@ -957,7 +958,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
}
|
||||
|
||||
// Build the indexer name if needed
|
||||
if ((data_type == OBI_STR) || (data_type == OBI_SEQ) || (data_type == OBI_QUAL))
|
||||
if ((data_type == OBI_STR) || (data_type == OBI_SEQ) || (data_type == OBI_QUAL) || tuples)
|
||||
{
|
||||
if ((indexer_name == NULL) || (*indexer_name == 0))
|
||||
{
|
||||
@ -973,7 +974,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
}
|
||||
|
||||
returned_data_type = data_type;
|
||||
if ((data_type == OBI_STR) || (data_type == OBI_SEQ) || (data_type == OBI_QUAL))
|
||||
if ((data_type == OBI_STR) || (data_type == OBI_SEQ) || (data_type == OBI_QUAL) || tuples)
|
||||
// stored data is indices referring to data stored elsewhere
|
||||
stored_data_type = OBI_IDX;
|
||||
else
|
||||
@ -1105,6 +1106,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
header->nb_elements_per_line = nb_elements_per_line;
|
||||
header->stored_data_type = stored_data_type;
|
||||
header->returned_data_type = returned_data_type;
|
||||
header->tuples = tuples;
|
||||
header->creation_date = time(NULL);
|
||||
header->version = version_number;
|
||||
header->cloned_from = -1;
|
||||
@ -1146,7 +1148,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
}
|
||||
|
||||
// If the data type is OBI_STR, OBI_SEQ or OBI_QUAL, the associated obi_indexer is opened or created
|
||||
if ((returned_data_type == OBI_STR) || (returned_data_type == OBI_SEQ) || (returned_data_type == OBI_QUAL))
|
||||
if ((returned_data_type == OBI_STR) || (returned_data_type == OBI_SEQ) || (returned_data_type == OBI_QUAL) || tuples)
|
||||
{
|
||||
new_column->indexer = obi_indexer(dms, final_indexer_name);
|
||||
if (new_column->indexer == NULL)
|
||||
@ -1377,6 +1379,7 @@ OBIDMS_column_p obi_clone_column(OBIDMS_p dms,
|
||||
nb_elements_per_line,
|
||||
(column_to_clone->header)->elements_names,
|
||||
true,
|
||||
(column_to_clone->header)->tuples,
|
||||
(column_to_clone->header)->indexer_name,
|
||||
((column_to_clone->header)->associated_column).column_name,
|
||||
((column_to_clone->header)->associated_column).version,
|
||||
|
Reference in New Issue
Block a user