[][src]Function cql_db::link_dimensions_unchecked

pub fn link_dimensions_unchecked<TStore: CqlType>(
    db_location: &str,
    location: &[u64]
) -> Result<()>

Links dimension indexs together if they are not already linked. Does not validate given parameters.

This is required before read-writing to a location, and allocates the file space required to store the Nth dimension data. The last (Nth) dimension should not be linked.

Errors

Will return any I/O errors encountered during the execution of the function. Function may partially succeed resulting in changes to the file system.

Panics

Function does not actively defend against panics, and may do so if given invalid parameters. Function may partially succeed resulting in changes to the file system.

Examples

// Create a database with a maximum capacity of `[2, 5, 3, 2]`
cql_db::create_db::<U64>(
    DATABASE_LOCATION,
    &[2, 5, 3, 2]
)?;

// Link the 2nd element of the 1st dimension with the 4th element of the 2nd dimension, and
// the 4th of the 2nd with the 3rd of the 3rd - for example:
// Turbine 2 has data for Signal 4 for Year 3
cql_db::link_dimensions_unchecked::<U64>(
    DATABASE_LOCATION,
    &[2, 4, 3], // don't link the Nth dimension
)?;