Liking cljdoc? Tell your friends :D

asami.core

A storage implementation over in-memory indexing. Includes full query engine.

A storage implementation over in-memory indexing. Includes full query engine.
raw docstring

as-connectionclj/s≠

clj
(as-connection graph)
(as-connection graph uri)
cljs
(as-connection G__22987)
(as-connection G__22991 G__22992)

Inputs: ([graph :- Graphable] [graph :- Graphable uri :- s/Str]) Returns: ConnectionType

Creates a Database/Connection around an existing Graph. graph: The graph or graph wrapper to build a database around. uri: The uri of the database.

Inputs: ([graph :- Graphable] [graph :- Graphable uri :- s/Str])
Returns: ConnectionType

Creates a Database/Connection around an existing Graph.
 graph: The graph or graph wrapper to build a database around.
 uri: The uri of the database.
sourceraw docstring

as-ofclj/s

source

as-of-tclj/s

source

connectclj/s

(connect uri)

Inputs: [uri :- s/Str] Returns: ConnectionType

Connects to the specified database, returning a Connection. In-memory databases get created if they do not exist already. Memory graphs: asami:mem://dbname A standard graph asami:multi://dbname A multigraph

Inputs: [uri :- s/Str]
Returns: ConnectionType

Connects to the specified database, returning a Connection.
In-memory databases get created if they do not exist already.
Memory graphs:
asami:mem://dbname    A standard graph
asami:multi://dbname  A multigraph
sourceraw docstring

connectionsclj/s

source

create-databaseclj/s

(create-database uri)

Inputs: [uri :- s/Str] Returns: s/Bool

Creates database specified by uri. Returns true if the database was created, false if it already exists.

Inputs: [uri :- s/Str]
Returns: s/Bool

Creates database specified by uri. Returns true if the
 database was created, false if it already exists.
sourceraw docstring

dbclj/s

source

delete-databaseclj/s

(delete-database uri)

Inputs: [uri :- s/Str] Returns: s/Bool

Deletes the database specified by the URI. Returns true if the delete occurred.

Inputs: [uri :- s/Str]
Returns: s/Bool

Deletes the database specified by the URI.
 Returns true if the delete occurred.
sourceraw docstring

entityclj/s

source

graphclj/s

source

Graphableclj/s

source

qclj/s

(q query & inputs)

Execute a query against the provided inputs. The query can be a map, a seq, or a string. See the documentation at https://github.com/threatgrid/asami/wiki/Querying for a full description of queries. The end of the parameters may include a series of key/value pairs for query options. The only recognized option for now is: :planner :user This ensures that a query is executed in user-specified order, and not the order calculated by the optimizing planner.

Execute a query against the provided inputs.
The query can be a map, a seq, or a string.
See the documentation at https://github.com/threatgrid/asami/wiki/Querying
for a full description of queries.
The end of the parameters may include a series of key/value pairs for query options.
The only recognized option for now is:
  `:planner :user`
This ensures that a query is executed in user-specified order, and not the order calculated by the optimizing planner.
sourceraw docstring

show-planclj/s

(show-plan query & inputs)

Return a query plan and do not execute the query. All parameters are identical to the q function.

Return a query plan and do not execute the query.
All parameters are identical to the `q` function.
sourceraw docstring

sinceclj/s

source

since-tclj/s

source

transactclj/s

(transact {:keys [name state] :as connection}
          {:keys [tx-data tx-triples executor update-fn] :as tx-info})

Inputs: [{:keys [name state], :as connection} :- ConnectionType {:keys [tx-data tx-triples executor update-fn], :as tx-info} :- TransactData]

Updates a database. This is currently synchronous, but returns a future or delay for compatibility with Datomic. connection: The connection to the database to be updated. tx-info: This is either a seq of items to be transacted, or a map. If this is a map, then a :tx-data value will contain the same type of seq that tx-info may have. Each item to be transacted is one of: - vector of the form: [:db/add entity attribute value] - creates a datom - vector of the form: [:db/retract entity attribute value] - removes a datom - map: an entity to be inserted/updated. Alternatively, a map may have a :tx-triples key. If so, then this is a seq of 3 element vectors. Each vector in a :tx-triples seq will contain the raw values for [entity attribute value] Entities and assertions may have attributes that are keywords with a trailing ' character. When these appear an existing attribute without that character will be replaced. This only occurs for the top level entity, and is not applied to attributes appearing in nested structures. Entities can be assigned a :db/id value. If this is a negative number, then it is considered a temporary value and will be mapped to a system-allocated ID. Other entities can reference such an entity using that ID. Entities can be provided a :db/ident value of any type. This will be considered unique, and can be used to identify entities for updates in subsequent transactions.

Returns a future/delay object that will hold a map containing the following: :db-before database value before the transaction :db-after database value after the transaction :tx-data sequence of datoms produced by the transaction :tempids mapping of the temporary IDs in entities to the allocated nodes :executor Executor to be used to run the CompletableFuture

Inputs: [{:keys [name state], :as connection} :- ConnectionType {:keys [tx-data tx-triples executor update-fn], :as tx-info} :- TransactData]

Updates a database. This is currently synchronous, but returns a future or delay for compatibility with Datomic.
 connection: The connection to the database to be updated.
 tx-info: This is either a seq of items to be transacted, or a map.
          If this is a map, then a :tx-data value will contain the same type of seq that tx-info may have.
          Each item to be transacted is one of:
          - vector of the form: [:db/add entity attribute value] - creates a datom
          - vector of the form: [:db/retract entity attribute value] - removes a datom
          - map: an entity to be inserted/updated.
          Alternatively, a map may have a :tx-triples key. If so, then this is a seq of 3 element vectors.
          Each vector in a :tx-triples seq will contain the raw values for [entity attribute value]
Entities and assertions may have attributes that are keywords with a trailing ' character.
When these appear an existing attribute without that character will be replaced. This only occurs for the top level
entity, and is not applied to attributes appearing in nested structures.
Entities can be assigned a :db/id value. If this is a negative number, then it is considered a temporary value and
will be mapped to a system-allocated ID. Other entities can reference such an entity using that ID.
Entities can be provided a :db/ident value of any type. This will be considered unique, and can be used to identify
entities for updates in subsequent transactions.

Returns a future/delay object that will hold a map containing the following:
:db-before    database value before the transaction
:db-after     database value after the transaction
:tx-data      sequence of datoms produced by the transaction
:tempids      mapping of the temporary IDs in entities to the allocated nodes
:executor     Executor to be used to run the CompletableFuture
sourceraw docstring

TransactDataclj/s

source

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

× close