Most functions in rv work off of one or more of the following root concepts:
Most functions in rv work off of one or more of the following root concepts: - Entity: a hashmap with a :kb/id key mapped to a unique value and namespaced keys - Table: a set of hashmaps or Entities - Fact: a vector triple in the form [entity-id attribute value] - Relation: a set of Facts pertaining to a particular Entity - LVar: a symbol naming a logic variable that can bind to any value - Ground: a concrete value - Query: a set of Facts containing a mix of LVars and Grounds - Rules: a set of Facts describing synthetic relations - Production: a pair of: antecedent query and consequent Facts - KB: a set of Relations about many Entities and possibly containing Productions
(map->relation entity)
(map->relation idfn entity)
Converts a map to a set of tuples for that map, applying a unique :kb/id if the map doesn't already have a value mapped for that key.
Relation values that are sets are expanded into individual tuples per item in the set with the same :kb/id as the entity and the attribute that the whole set was mapped to.
An idfn is a function of map -> id and if provided is used to override the default entity id generation and any existing :kb/id values.
Converts a map to a set of tuples for that map, applying a unique :kb/id if the map doesn't already have a value mapped for that key. Relation values that are sets are expanded into individual tuples per item in the set with the same :kb/id as the entity and the attribute that the whole set was mapped to. An idfn is a function of map -> id and if provided is used to override the default entity id generation and any existing :kb/id values.
(table->kb table)
(table->kb idfn table)
Converts a Table into a KB, applying unique :kb/id to maps without a mapped identity value.
See map->relation for more information about how the entities in the table are converted to relations.
An idfn is a function of map -> id and if provided is used to override the default entity id generation and any existing :kb/id values.
Converts a Table into a KB, applying unique :kb/id to maps without a mapped identity value. See map->relation for more information about how the entities in the table are converted to relations. An idfn is a function of map -> id and if provided is used to override the default entity id generation and any existing :kb/id values.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close