Reads structured data from a graph.
Reads structured data from a graph.
(build-list graph seen pairs)
Inputs: [graph :- GraphType seen :- #{s/Any} pairs :- [KeyValue]] Returns: [s/Any]
Takes property/value pairs and if they represent a list node, returns the list. else, nil.
Inputs: [graph :- GraphType seen :- #{s/Any} pairs :- [KeyValue]] Returns: [s/Any] Takes property/value pairs and if they represent a list node, returns the list. else, nil.
(check-structure graph prop v)
Inputs: [graph :- GraphType prop :- s/Any v :- s/Any] Returns: (s/maybe [KeyValue])
Determines if a value represents a structure. If so, return the property/values for it. Otherwise, return nil.
Inputs: [graph :- GraphType prop :- s/Any v :- s/Any] Returns: (s/maybe [KeyValue]) Determines if a value represents a structure. If so, return the property/values for it. Otherwise, return nil.
(get-tg-first struct)
Finds the tg/first property in a map, and gets the value.
Finds the tg/first property in a map, and gets the value.
(graph->entities graph)
(graph->entities graph nested?)
(graph->entities graph nested? exclusions)
(graph->entities G__10150)
(graph->entities G__10154 G__10155)
(graph->entities G__10159 G__10160 G__10161)
Inputs: ([graph :- GraphType] [graph :- GraphType nested? :- s/Bool] [graph :- GraphType nested? :- s/Bool exclusions :- (s/maybe #{s/Keyword})]) Returns: [EntityMap]
Pulls all top level entities out of a store
Inputs: ([graph :- GraphType] [graph :- GraphType nested? :- s/Bool] [graph :- GraphType nested? :- s/Bool exclusions :- (s/maybe #{s/Keyword})]) Returns: [EntityMap] Pulls all top level entities out of a store
(graph->str graph)
(graph->str graph nested?)
(graph->str graph nested? indent)
(graph->str G__10170)
(graph->str G__10174 G__10175)
(graph->str G__10179 G__10180 G__10181)
Inputs: ([graph :- GraphType] [graph :- GraphType nested? :- s/Bool] [graph :- GraphType nested? :- s/Bool indent :- s/Num]) Returns: s/Str
Reads a store into JSON strings
Inputs: ([graph :- GraphType] [graph :- GraphType nested? :- s/Bool] [graph :- GraphType nested? :- s/Bool indent :- s/Num]) Returns: s/Str Reads a store into JSON strings
(ident->entity graph ident)
(ident->entity graph ident nested?)
(ident->entity G__10135 G__10136)
(ident->entity G__10140 G__10141 G__10142)
Inputs: ([graph :- GraphType ident :- s/Any] [graph :- GraphType ident :- s/Any nested? :- s/Bool]) Returns: EntityMap
Converts data in a database to a data structure suitable for JSON encoding Accepts an internal node identifier to identify the entity object
Inputs: ([graph :- GraphType ident :- s/Any] [graph :- GraphType ident :- s/Any nested? :- s/Bool]) Returns: EntityMap Converts data in a database to a data structure suitable for JSON encoding Accepts an internal node identifier to identify the entity object
(into-multimap kvs)
Inputs: [kvs :- [[(s/one s/Any "Key") (s/one s/Any "Value")]]]
Takes key/value tuples and inserts them into a map. If there are duplicate keys then create a set for the values.
Inputs: [kvs :- [[(s/one s/Any "Key") (s/one s/Any "Value")]]] Takes key/value tuples and inserts them into a map. If there are duplicate keys then create a set for the values.
(json-generate-string data)
(json-generate-string data indent)
(pairs->struct graph prop-vals)
(pairs->struct graph prop-vals seen)
(pairs->struct G__10086 G__10087)
(pairs->struct G__10091 G__10092 G__10093)
Inputs: ([graph :- GraphType prop-vals :- [KeyValue]] [graph :- GraphType prop-vals :- [KeyValue] seen :- #{s/Keyword}]) Returns: EntityMap
Uses a set of property-value pairs to load up a nested data structure from the graph
Inputs: ([graph :- GraphType prop-vals :- [KeyValue]] [graph :- GraphType prop-vals :- [KeyValue] seen :- #{s/Keyword}]) Returns: EntityMap Uses a set of property-value pairs to load up a nested data structure from the graph
(property-values graph entity)
Inputs: [graph :- GraphType entity :- s/Any] Returns: [KeyValue]
Return all the property/value pairs for a given entity in the store. Skips non-keyword properties, as these are not created by tg.entity
Inputs: [graph :- GraphType entity :- s/Any] Returns: [KeyValue] Return all the property/value pairs for a given entity in the store. Skips non-keyword properties, as these are not created by tg.entity
(recurse-node graph seen [prop v :as prop-val])
Inputs: [graph :- GraphType seen :- #{s/Keyword} [prop v :as prop-val] :- KeyValue] Returns: s/Any
Determines if the val of a map entry is a node to be recursed on, and loads if necessary. If referring directly to a top level node, then short circuit and return the ID
Inputs: [graph :- GraphType seen :- #{s/Keyword} [prop v :as prop-val] :- KeyValue] Returns: s/Any Determines if the val of a map entry is a node to be recursed on, and loads if necessary. If referring directly to a top level node, then short circuit and return the ID
(ref->entity graph entity-id)
(ref->entity graph entity-id nested?)
(ref->entity graph entity-id nested? exclusions)
(ref->entity G__10112 G__10113)
(ref->entity G__10117 G__10118 G__10119)
(ref->entity G__10123 G__10124 G__10125 G__10126)
Inputs: ([graph :- GraphType entity-id :- s/Any] [graph :- GraphType entity-id :- s/Any nested? :- s/Bool] [graph :- GraphType entity-id :- s/Any nested? :- s/Bool exclusions :- (s/maybe #{(s/cond-pre s/Keyword s/Str)})]) Returns: EntityMap
Uses an id node to load up a nested data structure from the graph. Accepts a value that identifies the internal node.
Inputs: ([graph :- GraphType entity-id :- s/Any] [graph :- GraphType entity-id :- s/Any nested? :- s/Bool] [graph :- GraphType entity-id :- s/Any nested? :- s/Bool exclusions :- (s/maybe #{(s/cond-pre s/Keyword s/Str)})]) Returns: EntityMap Uses an id node to load up a nested data structure from the graph. Accepts a value that identifies the internal node.
(vbuild-list graph seen pairs)
Inputs: [graph :- GraphType seen :- #{s/Any} pairs :- [KeyValue]] Returns: [s/Any]
Calls build-list, converting to a vector as the final step
Inputs: [graph :- GraphType seen :- #{s/Any} pairs :- [KeyValue]] Returns: [s/Any] Calls build-list, converting to a vector as the final step
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close