Converts external data into a graph format (triples).
Converts external data into a graph format (triples).
(build-list store seen pairs)Inputs: [store :- StorageType 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: [store :- StorageType 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 store prop v)Inputs: [store :- StorageType 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: [store :- StorageType 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.
(containership-triples node triples)Inputs: [node :- s/Any triples :- [Triple]]
Finds the list of entity nodes referred to in a list and builds triples describing a flat 'contains' property
Inputs: [node :- s/Any triples :- [Triple]] Finds the list of entity nodes referred to in a list and builds triples describing a flat 'contains' property
(delta->json store)Inputs: [store :- StorageType] Returns: [#:s{Keyword s/Any}]
Pulls all top level JSON out of a store
Inputs: [store :- StorageType]
Returns: [#:s{Keyword s/Any}]
Pulls all top level JSON out of a store(delta->str store)(delta->str store indent)(delta->str G__8353)(delta->str G__8357 G__8358)Inputs: ([store :- StorageType] [store :- StorageType indent :- s/Num]) Returns: s/Str
Reads a store into JSON strings
Inputs: ([store :- StorageType] [store :- StorageType indent :- s/Num]) Returns: s/Str Reads a store into JSON strings
(existing-triples storage id [k v])Inputs: [storage id [k v]]
Inputs: [storage id [k v]]
(get-naga-first struct)Finds the naga/first property in a map, and gets the value.
Finds the naga/first property in a map, and gets the value.
(id->json store entity-id)(id->json store entity-id exclusions)(id->json G__8303 G__8304)(id->json G__8308 G__8309 G__8310)Inputs: ([store :- StorageType entity-id :- s/Any] [store :- StorageType entity-id :- s/Any exclusions :- (s/maybe #{s/Keyword})]) Returns: #:s{Keyword s/Any}
Uses an id node to load up a nested data structure from the graph
Inputs: ([store :- StorageType entity-id :- s/Any] [store :- StorageType entity-id :- s/Any exclusions :- (s/maybe #{s/Keyword})])
Returns: #:s{Keyword s/Any}
Uses an id node to load up a nested data structure from the graph(ident->json store ident)Inputs: [store :- StorageType ident :- s/Any] Returns: #:s{Keyword s/Any}
Converts data in a database to data structures suitable for JSON encoding
Inputs: [store :- StorageType ident :- s/Any]
Returns: #:s{Keyword s/Any}
Converts data in a database to data structures suitable for JSON encoding(ident-map->triples j)(ident-map->triples storage j)(ident-map->triples G__8208)(ident-map->triples G__8203 G__8204)Inputs: ([storage j] [j]) Returns: [Triple]
Converts a single map to triples for an ID'ed map
Inputs: ([storage j] [j]) Returns: [Triple] Converts a single map to triples for an ID'ed map
(json->triples storage j)Inputs: [storage j] Returns: [Triple]
Converts parsed JSON into a sequence of triples for a provided storage.
Inputs: [storage j] Returns: [Triple] Converts parsed JSON into a sequence of triples for a provided storage.
(json-generate-string data)(json-generate-string data indent)(json-update->triples storage id j)Inputs: [storage id j] Returns: [(s/one [Triple] "assertions") (s/one [Triple] "retractions")]
Takes a single structure and converts it into triples to be added and triples to be retracted to create a change
Inputs: [storage id j] Returns: [(s/one [Triple] "assertions") (s/one [Triple] "retractions")] Takes a single structure and converts it into triples to be added and triples to be retracted to create a change
(list-triples [v & vs :as vlist])Inputs: [[v & vs :as vlist]]
Creates the triples for a list
Inputs: [[v & vs :as vlist]] Creates the triples for a list
(map->triples data)Inputs: [data :- #:s{Keyword s/Any}] Returns: EntityTriplesPair
Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.
Inputs: [data :- #:s{Keyword s/Any}]
Returns: EntityTriplesPair
Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.(name-for id)Inputs: [id :- s/Any]
Convert an id (probably a number) to a keyword for identification
Inputs: [id :- s/Any] Convert an id (probably a number) to a keyword for identification
(pairs->json store prop-vals)(pairs->json store prop-vals seen)(pairs->json G__8285 G__8286)(pairs->json G__8290 G__8291 G__8292)Inputs: ([store :- StorageType prop-vals :- [KeyValue]] [store :- StorageType prop-vals :- [KeyValue] seen :- #{s/Keyword}]) Returns: #:s{Keyword s/Any}
Uses a set of property-value pairs to load up a nested data structure from the graph
Inputs: ([store :- StorageType prop-vals :- [KeyValue]] [store :- StorageType prop-vals :- [KeyValue] seen :- #{s/Keyword}])
Returns: #:s{Keyword s/Any}
Uses a set of property-value pairs to load up a nested data structure from the graph(property-vals entity-id [property value])Inputs: [entity-id :- s/Any [property value] :- KeyValue] Returns: [Triple]
Takes a property-value pair associated with an entity, and builds triples around it
Inputs: [entity-id :- s/Any [property value] :- KeyValue] Returns: [Triple] Takes a property-value pair associated with an entity, and builds triples around it
(property-values store entity)Inputs: [store :- StorageType 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 naga.data
Inputs: [store :- StorageType 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 naga.data
(recurse-node store seen [prop v :as prop-val])Inputs: [store :- StorageType 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: [store :- StorageType 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(store->json store)(store->json store exclusions)(store->json G__8324)(store->json G__8328 G__8329)Inputs: ([store :- StorageType] [store :- StorageType exclusions :- (s/maybe #{s/Keyword})]) Returns: [#:s{Keyword s/Any}]
Pulls all top level JSON out of a store
Inputs: ([store :- StorageType] [store :- StorageType exclusions :- (s/maybe #{s/Keyword})])
Returns: [#:s{Keyword s/Any}]
Pulls all top level JSON out of a store(store->str store)(store->str store indent)(store->str G__8336)(store->str G__8340 G__8341)Inputs: ([store :- StorageType] [store :- StorageType indent :- s/Num]) Returns: s/Str
Reads a store into JSON strings
Inputs: ([store :- StorageType] [store :- StorageType indent :- s/Num]) Returns: s/Str Reads a store into JSON strings
(stream->triples storage io)Inputs: [storage io] Returns: [Triple]
Converts a stream to triples relevant to a store
Inputs: [storage io] Returns: [Triple] Converts a stream to triples relevant to a store
Inputs: [storage io] Returns: [Triple]
Inputs: [storage io] Returns: [Triple]
(string->triples storage s)Inputs: [storage :- StorageType s :- s/Str] Returns: [Triple]
Converts a string to triples relevant to a store
Inputs: [storage :- StorageType s :- s/Str] Returns: [Triple] Converts a string to triples relevant to a store
(value-triples v)Inputs: [v]
Converts a value into a list of triples. Return the entity ID of the data coupled with the sequence of triples. NOTE: This may need to be dispatched to storage. e.g. Datomic could use properties to determine how to encode data.
Inputs: [v]
Converts a value into a list of triples.
Return the entity ID of the data coupled with the sequence of triples.
NOTE: This may need to be dispatched to storage.
e.g. Datomic could use properties to determine how to encode data.(value-triples-list vlist)Inputs: [vlist :- [s/Any]] Returns: EntityTriplesPair
Inputs: [vlist :- [s/Any]] Returns: EntityTriplesPair
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |