A storage implementation over in-memory indexing.
A storage implementation over in-memory indexing.
(as-database graph)
Inputs: [graph :- GraphType] Returns: DatabaseType
Creates a Database around an existing Graph. graph: The graph to build a database around.
Inputs: [graph :- GraphType] Returns: DatabaseType Creates a Database around an existing Graph. graph: The graph to build a database around.
(as-of* {:keys [graph history timestamp] :as db} t)
Inputs: [{:keys [graph history timestamp], :as db} :- DatabaseType t :- (s/cond-pre s/Int (s/pred instant?))] Returns: DatabaseType
Retrieves the database as of a given moment, inclusive. The t value may be an instant, or a transaction ID. The database returned will be whatever database was the latest at the specified time or transaction.
Inputs: [{:keys [graph history timestamp], :as db} :- DatabaseType t :- (s/cond-pre s/Int (s/pred instant?))] Returns: DatabaseType Retrieves the database as of a given moment, inclusive. The t value may be an instant, or a transaction ID. The database returned will be whatever database was the latest at the specified time or transaction.
(as-of-t* {history :history :as db})
Inputs: [{history :history, :as db} :- DatabaseType] Returns: s/Int
Returns the as-of point for a database, or nil if none
Inputs: [{history :history, :as db} :- DatabaseType] Returns: s/Int Returns the as-of point for a database, or nil if none
(db* connection)
Inputs: [connection :- ConnectionType] Returns: DatabaseType
Retrieves the most recent value of the database for reading.
Inputs: [connection :- ConnectionType] Returns: DatabaseType Retrieves the most recent value of the database for reading.
(entity* {graph :graph :as db} id nested?)
Inputs: [{graph :graph, :as db} id nested?] Returns: #:s{Any s/Any}
Returns an entity based on an identifier, either the :db/id or a :db/ident if this is available. This eagerly retrieves the entity. Objects may be nested, but references to top level objects will be nil in order to avoid loops.
Inputs: [{graph :graph, :as db} id nested?] Returns: #:s{Any s/Any} Returns an entity based on an identifier, either the :db/id or a :db/ident if this is available. This eagerly retrieves the entity. Objects may be nested, but references to top level objects will be nil in order to avoid loops.
(graph* database)
Inputs: [database :- DatabaseType] Returns: GraphType
Returns the Graph object associated with a Database
Inputs: [database :- DatabaseType] Returns: GraphType Returns the Graph object associated with a Database
(instant? t)
Tests if a value is a timestamp
Tests if a value is a timestamp
(new-connection name gr)
Creates a memory Connection object
Creates a memory Connection object
(now)
Creates an object to represent the current time
Creates an object to represent the current time
(since* {:keys [graph history timestamp] :as db} t)
Inputs: [{:keys [graph history timestamp], :as db} :- DatabaseType t :- (s/cond-pre s/Int (s/pred instant?))] Returns: (s/maybe DatabaseType)
Returns the value of the database since some point t, exclusive. t can be a transaction number, or instant.
Inputs: [{:keys [graph history timestamp], :as db} :- DatabaseType t :- (s/cond-pre s/Int (s/pred instant?))] Returns: (s/maybe DatabaseType) Returns the value of the database since some point t, exclusive. t can be a transaction number, or instant.
(since-t* {history :history :as db})
Inputs: [{history :history, :as db} :- DatabaseType] Returns: s/Int
Returns the since point of a database, or nil if none
Inputs: [{history :history, :as db} :- DatabaseType] Returns: s/Int Returns the since point of a database, or nil if none
(transact-data* conn asserts retracts)
Removes a series of tuples from the latest graph, and asserts new tuples into the graph. Updates the connection to the new graph.
Removes a series of tuples from the latest graph, and asserts new tuples into the graph. Updates the connection to the new graph.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close