wip: document constants, add KEY constant
This commit is contained in:
parent
286abc5b7e
commit
e6a1d3ba02
1 changed files with 10 additions and 1 deletions
|
@ -1,15 +1,24 @@
|
||||||
use crate::addressing::Address;
|
use crate::addressing::Address;
|
||||||
use crate::database::entry::InvariantEntry;
|
use crate::database::entry::InvariantEntry;
|
||||||
|
|
||||||
|
/// Attribute denoting (hierarchical) relation, in the upwards direction. For example, a file `OF` a group, an image `OF` photos, etc.
|
||||||
pub const IS_OF_ATTR: &str = "OF";
|
pub const IS_OF_ATTR: &str = "OF";
|
||||||
|
/// Attribute denoting that an entry belongs to the set relating to a given (hierarchical) relation.
|
||||||
|
/// For example, a data blob may have a label entry, and to qualify that label within the context of belonging to a given hierarchical group, that label entry and the hierarchical entry will be linked with `BY`.
|
||||||
pub const ATTR_BY_ATTR: &str = "BY";
|
pub const ATTR_BY_ATTR: &str = "BY";
|
||||||
|
|
||||||
|
/// Attribute denoting a human readable label.
|
||||||
pub const LABEL_ATTR: &str = "LBL";
|
pub const LABEL_ATTR: &str = "LBL";
|
||||||
|
/// Attribute denoting the date & time an entity was noted in the database.
|
||||||
|
/// (TODO: This info can be trivially derived from existing entry timestamps, while at the same time the "Introduction problem" is still open.)
|
||||||
pub const ADDED_ATTR: &str = "ADDED";
|
pub const ADDED_ATTR: &str = "ADDED";
|
||||||
|
|
||||||
|
/// Attribute for cross-vault unambiguous referencing of non-hashable (e.g. UUID) entities.
|
||||||
|
pub const KEY_ATTR: &str = "KEY";
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref HIER_ROOT_INVARIANT: InvariantEntry = InvariantEntry {
|
pub static ref HIER_ROOT_INVARIANT: InvariantEntry = InvariantEntry {
|
||||||
attribute: String::from(IS_OF_ATTR),
|
attribute: String::from(KEY_ATTR),
|
||||||
value: "HIER_ROOT".into(),
|
value: "HIER_ROOT".into(),
|
||||||
};
|
};
|
||||||
pub static ref HIER_ROOT_ADDR: Address = HIER_ROOT_INVARIANT.entity().unwrap();
|
pub static ref HIER_ROOT_ADDR: Address = HIER_ROOT_INVARIANT.entity().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue