bankai/relations
Types
pub type Edge {
Edge(from: String, to: String, relation: types.RelationType)
}
Constructors
-
Edge(from: String, to: String, relation: types.RelationType)
pub type Query {
Query(
direction: Direction,
relation: option.Option(types.RelationType),
depth: Int,
)
}
Constructors
-
Query( direction: Direction, relation: option.Option(types.RelationType), depth: Int, )
Values
pub fn add(
task: types.Task,
target_id: String,
relation: types.RelationType,
all_edges: List(#(String, String)),
now: Int,
) -> Result(types.Task, String)
pub fn add_typed(
task: types.Task,
target_id: String,
relation: types.RelationType,
now: Int,
) -> types.Task
pub fn edges(
tasks: List(types.Task),
relation: option.Option(types.RelationType),
) -> List(Edge)
pub fn graph_json(
tasks: List(types.Task),
args: List(String),
) -> Result(json.Json, String)
pub fn integrity_json(
tasks: List(types.Task),
cycles: List(#(String, String)),
) -> json.Json
pub fn relation_name(relation: types.RelationType) -> String
pub fn relation_typed(
task: types.Task,
target_id: String,
relation: types.RelationType,
now: Int,
) -> types.Task
pub fn remove(
task: types.Task,
target_id: String,
relation: types.RelationType,
now: Int,
) -> types.Task
pub fn traversal_json(
tasks: List(types.Task),
start: String,
args: List(String),
) -> Result(json.Json, String)
pub fn traverse(
tasks: List(types.Task),
start: String,
query: Query,
) -> List(Edge)