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 :- [[s/Keyword s/Any]]] 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 :- [[s/Keyword s/Any]]] 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 [[s/Keyword s/Any]])
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 [[s/Keyword s/Any]]) 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__9723)
(delta->str G__9727 G__9728)
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__9673 G__9674)
(id->json G__9678 G__9679 G__9680)
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__9584)
(ident-map->triples G__9579 G__9580)
Inputs: ([storage j] [j]) Returns: [s/Any [Triple]]
Converts a single map to triples for an ID'ed map
Inputs: ([storage j] [j]) Returns: [s/Any [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: [s/Any [Triple]]
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: [s/Any [Triple]] 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__9659 G__9660)
(pairs->json G__9664 G__9665 G__9666)
Inputs: ([store :- StorageType prop-vals :- [[s/Keyword s/Any]]] [store :- StorageType prop-vals :- [[s/Keyword s/Any]] 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 :- [[s/Keyword s/Any]]] [store :- StorageType prop-vals :- [[s/Keyword s/Any]] 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] :- [s/Keyword s/Any]] Returns: [Triple]
Takes a property-value pair associated with an entity, and builds triples around it
Inputs: [entity-id :- s/Any [property value] :- [s/Keyword s/Any]] 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: [[s/Keyword s/Any]]
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: [[s/Keyword s/Any]] 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] :- [s/Keyword s/Any]] 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] :- [s/Keyword s/Any]] 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__9694)
(store->json G__9698 G__9699)
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__9706)
(store->str G__9710 G__9711)
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: [(s/one s/Any "node ID") (s/one [Triple] "current list of triples")]
Inputs: [vlist :- [s/Any]] Returns: [(s/one s/Any "node ID") (s/one [Triple] "current list of triples")]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close