[][src]Function cql_db::write_value_unchecked

pub fn write_value_unchecked<TStore: CqlWritable>(
    db_location: &str,
    location: &[u64],
    value: TStore::ValueType
) -> Result<()>

Writes the given value to the given location in the database. Does not validate given parameters.

Can result in writing to an 'alternative' location if provided with an invalid location in the final dimension, other invalid dimensions will likely result in a panic.

Errors

Will return any I/O errors encountered during the execution of the function. If an error is returned it is not guaranteed that no bytes have been written to the requested location.

Panics

Function does not actively defend against panics, and may do so if given invalid parameters. If the function panics, no changes will have been made to the file system and the previous value should still be present.

Examples

cql_db::create_db::<U64>(
    DATABASE_LOCATION,
    &[2, 5, 3, 2]
)?;

// higher order elements must be linked before they can be writen to
cql_db::link_dimensions::<U64>(
    DATABASE_LOCATION,
    &[2, 4, 3],
)?;

// Write `5` to location `[2, 4, 3, 1]`
cql_db::write_value_unchecked::<U64>(
    DATABASE_LOCATION,
    &[2, 4, 3, 1],
    5
)?;