Liking cljdoc? Tell your friends :D

asami.entities.reader

Reads structured data from a graph.

Reads structured data from a graph.
raw docstring

*nested-structs*clj/s


build-listclj/s

(build-list graph seen pairs)

Inputs: [graph :- GraphType seen :- #{NodeType} 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 :- #{NodeType} pairs :- [KeyValue]]
Returns: [s/Any]

Takes property/value pairs and if they represent a list node, returns the list.
 else, nil.
raw docstring

check-structureclj/s

(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.
raw docstring

get-a-firstclj/s

(get-a-first struct)

Finds the a/first property in a map, and gets the value.

Finds the a/first property in a map, and gets the value.
raw docstring

graph->entitiesclj/s≠

clj
(graph->entities graph)
(graph->entities graph nested?)
(graph->entities graph nested? exclusions)
cljs
(graph->entities G__19728)
(graph->entities G__19732 G__19733)
(graph->entities G__19737 G__19738 G__19739)

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
raw docstring

ident->entityclj/s≠

clj
(ident->entity graph ident)
(ident->entity graph ident nested?)
cljs
(ident->entity G__19713 G__19714)
(ident->entity G__19718 G__19719 G__19720)

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
raw docstring

into-multimapclj/s

(into-multimap xform kvs)

Inputs: [xform 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: [xform 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.
raw docstring

MapOrListclj/s


NodeTypeclj/s


pairs->structclj/s≠

clj
(pairs->struct graph prop-vals)
(pairs->struct graph prop-vals seen)
cljs
(pairs->struct G__19664 G__19665)
(pairs->struct G__19669 G__19670 G__19671)

Inputs: ([graph :- GraphType prop-vals :- [KeyValue]] [graph :- GraphType prop-vals :- [KeyValue] seen :- #{NodeType}]) 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 :- #{NodeType}])
Returns: EntityMap

Uses a set of property-value pairs to load up a nested data structure from the graph
raw docstring

property-valuesclj/s

(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.

Inputs: [graph :- GraphType entity :- s/Any]
Returns: [KeyValue]

Return all the property/value pairs for a given entity in the store. 
raw docstring

recurse-nodeclj/s

(recurse-node graph seen [prop v :as prop-val])

Inputs: [graph :- GraphType seen :- #{NodeType} [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 :- #{NodeType} [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
raw docstring

ref->entityclj/s≠

clj
(ref->entity graph entity-id)
(ref->entity graph entity-id nested?)
(ref->entity graph entity-id nested? exclusions)
cljs
(ref->entity G__19690 G__19691)
(ref->entity G__19695 G__19696 G__19697)
(ref->entity G__19701 G__19702 G__19703 G__19704)

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.
raw docstring

vbuild-listclj/s

(vbuild-list graph seen pairs)

Inputs: [graph :- GraphType seen :- #{NodeType} pairs :- [KeyValue]] Returns: [s/Any]

Calls build-list, converting to a vector as the final step

Inputs: [graph :- GraphType seen :- #{NodeType} pairs :- [KeyValue]]
Returns: [s/Any]

Calls build-list, converting to a vector as the final step
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close