(add-ns! connection prefix rdf-ns)
Adds a namespace prefix
Adds a namespace prefix
(ask connection text & args)
Executes a boolean query. Optional parameters may be provided as a map or named parameters. Parameter names are:
Executes a boolean query. Optional parameters may be provided as a map or named parameters. Parameter names are: - base, parameters, reasoning, limit, offset, converter, key-converter.
(assert-args & pairs)
Duplicates the functionality of the private clojure.core/assert-args
Duplicates the functionality of the private clojure.core/assert-args
(binding->map key-fn value-fn mb)
Converts a BindingSet into a map.
Converts a BindingSet into a map.
(clojure-data results)
(clojure-data results keyfn valfn)
Converts query results into Clojure data. Optionally uses functions for interpreting names and value bindings in results.
Converts query results into Clojure data. Optionally uses functions for interpreting names and value bindings in results.
(clojure-data* results keyfn valfn)
Typed dispatched conversion of query results into Clojure data
Typed dispatched conversion of query results into Clojure data
(configure-query q {:keys [parameters reasoning limit offset dataset]})
Configures a query is the valid parameters for that type of query
Configures a query is the valid parameters for that type of query
(connect c)
Creates a connection with the given parameters
Creates a connection with the given parameters
(convert-to-map [f & r :as args])
Converts an arguments array into a map. The arguments are either positional, named, or already in map form. This function is a fixpoint.
Converts an arguments array into a map. The arguments are either positional, named, or already in map form. This function is a fixpoint.
(create-db-spec db url user pass reasoning)
Helper function to create a dbspec with sensible defaults for nontypical parameters
Helper function to create a dbspec with sensible defaults for nontypical parameters
(create-query new-with-base new-without-base {:keys [base] :as args})
Creates a query using a map of optional arguments. new-with-base: Function that creates the query with a base URI. new-without-base: Function that creates the query without a base URI. args: A map containing any of the following: base, parameters, reasoning, limit, offset
Creates a query using a map of optional arguments. new-with-base: Function that creates the query with a base URI. new-without-base: Function that creates the query without a base URI. args: A map containing any of the following: base, parameters, reasoning, limit, offset
(execute q & args)
Executes a query that has already been created and configured. Valid parameters are key-converter and converter. Query configuration parameters are ignored.
Executes a query that has already been created and configured. Valid parameters are key-converter and converter. Query configuration parameters are ignored.
(execute* q
{:keys [key-converter converter]
:or {key-converter keyword converter values/standardize}})
(graph connection text & args)
Executes a graph query. Optional parameters may be provided as a map or named parameters. Parameter names are:
Executes a graph query. Optional parameters may be provided as a map or named parameters. Parameter names are: - base, parameters, reasoning, limit, offset, converter, key-converter.
(insert! connection triple-list)
(insert! connection triple-list graph-uri)
Inserts a statement (subject, predicate, object) represented as a 3 item vector. If a graph URI is specified, the statements will be added to the named graph.
Inserts a statement (subject, predicate, object) represented as a 3 item vector. If a graph URI is specified, the statements will be added to the named graph.
(key-map-results keyfn valfn results)
Converts a Iteration of bindings into a seq of keymaps.
Converts a Iteration of bindings into a seq of keymaps.
(list-namespaces connection)
Lists configured namespaces in the database
Lists configured namespaces in the database
(make-datasource db-spec)
Creates a Stardog datasource, i.e. ConnectionPool
Creates a Stardog datasource, i.e. ConnectionPool
(query connection text & args)
Executes a query and returns results. When constructing a query from text, the parameters are:
Executes a query and returns results. When constructing a query from text, the parameters are: - connection: The connection to query over (required). - text: The text of the connection (String - required). Remaining argument are optional, and may be positional args, a map of args, or named args. Mapped and named args use the keys: - base, parameters, reasoning, limit, offset, converter, key-converter Positional arguments are in order: - base: The base URI for the query (String). - parameters: A parameter map to bind parameters in the query (Map). - reasoning: boolean true/false for reasoning, or not - converter: A function to convert returned values with (Function). - key-converter: A function to convert returned binding names with (Function). - limit: The limit for the result. Must be present to use offset (integer). - offset: The offset to start the result (integer).
(remove! connection triple-list)
(remove! connection triple-list graph-uri)
Remove a statement from the database; nil's can be used in any position to indicate a wildcard matching anything in that position, thereby removing multiple statements. If a graph URI is specified, all statements matching the given SPO pattern will be removed from the named graph.
Remove a statement from the database; nil's can be used in any position to indicate a wildcard matching anything in that position, thereby removing multiple statements. If a graph URI is specified, all statements matching the given SPO pattern will be removed from the named graph.
(remove-all! connection)
Delete the entire contents of the database.
Delete the entire contents of the database.
(remove-named-graph! connection)
(remove-named-graph! connection graph-uri)
Remove the named graph and all the statements within from the database. If no graph URI is provided this will remove the default graph (no context). If you want to remove everything in the database regardless of context, use remove-all!.
Remove the named graph and all the statements within from the database. If no graph URI is provided this will remove the default graph (no context). If you want to remove everything in the database regardless of context, use remove-all!.
(remove-ns! connection prefix)
Removes a namespace prefix
Removes a namespace prefix
(statement->map value-fn mb)
Converts a Statement into a map.
Converts a Statement into a map.
(transact pool func)
(transact pool (something con ..)) Executes a function over a connection pool and transaction
(transact pool (something con ..)) Executes a function over a connection pool and transaction
(update! connection text & args)
Executes an update operation. Optional parameters may be provided as a map or named parameters. Parameter names are:
Executes an update operation. Optional parameters may be provided as a map or named parameters. Parameter names are: - base, parameters, reasoning, converter.
(vector-map-results valfn results)
Converts a Graph of statements into a seq of vectors.
Converts a Graph of statements into a seq of vectors.
(with-connection-pool bindings & body)
(with-connection-pool [con pool] .. con, body ..) Evaluates body in the context of an active connection
(with-connection-pool [con pool] .. con, body ..) Evaluates body in the context of an active connection
(with-connection-tx bindings & body)
(with-connection-tx binding-forms body) Establishes a connection and a transaction to execute the body within.
(with-connection-tx binding-forms body) Establishes a connection and a transaction to execute the body within.
(with-transaction connections & body)
(with-transaction [connection...] body) Executes the body with a transaction on each of the connections. At completion of the body the transaction is committed. If the body fails due to exception, the transaction is rolled back. This macro intentionally restricts connections to be symbols, to encourage them to be bindings in with-open.
(with-transaction [connection...] body) Executes the body with a transaction on each of the connections. At completion of the body the transaction is committed. If the body fails due to exception, the transaction is rolled back. This macro intentionally restricts connections to be symbols, to encourage them to be bindings in with-open.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close