aboutsummaryrefslogtreecommitdiff
path: root/datalog-api.html
diff options
context:
space:
mode:
Diffstat (limited to 'datalog-api.html')
-rw-r--r--datalog-api.html120
1 files changed, 97 insertions, 23 deletions
diff --git a/datalog-api.html b/datalog-api.html
index 1e5a1893..e1d3d5bc 100644
--- a/datalog-api.html
+++ b/datalog-api.html
@@ -146,11 +146,15 @@ by <span id="author">Jeffrey Straszheim</span><br />
</pre><pre>
</pre><h2>Overview</h2>
<pre id="namespace-docstr">A Clojure implementation of Datalog</pre>
+
+
<br />
<h2>Public Variables and Functions</h2>
<h2 id="namespace-name">datalog.database</h2>
<pre id="namespace-docstr"></pre>
+
+
<br />
<div id="var-entry">
<hr />
@@ -159,7 +163,9 @@ by <span id="author">Jeffrey Straszheim</span><br />
<pre id="var-usage">Usage: (add-index db name key)
</pre>
<pre id="var-docstr">Adds an index to an empty relation named name</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L85" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/add-relation">add-relation</h2>
@@ -167,7 +173,9 @@ by <span id="author">Jeffrey Straszheim</span><br />
<pre id="var-usage">Usage: (add-relation db name keys)
</pre>
<pre id="var-docstr">Adds a relation to the database</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L80" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/add-tuple">add-tuple</h2>
@@ -181,7 +189,9 @@ by <span id="author">Jeffrey Straszheim</span><br />
the new database.
[rel tuple] adds to the relation object. Returns the new relation.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L171" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/add-tuples">add-tuples</h2>
@@ -192,7 +202,9 @@ the new database.
(add-tuples db
[:rel-name :key-1 1 :key-2 2]
[:rel-name :key-1 2 :key-2 3])</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L206" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/any-match?">any-match?</h2>
@@ -200,7 +212,9 @@ the new database.
<pre id="var-usage">Usage: (any-match? db rn pt)
</pre>
<pre id="var-docstr">Finds if there are any matching records for the partial tuple</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L252" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/database-counts">database-counts</h2>
@@ -208,7 +222,9 @@ the new database.
<pre id="var-usage">Usage: (database-counts db)
</pre>
<pre id="var-docstr">Returns a map with the count of elements in each relation.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L143" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/database-merge">database-merge</h2>
@@ -216,7 +232,9 @@ the new database.
<pre id="var-usage">Usage: (database-merge dbs)
</pre>
<pre id="var-docstr">Merges databases together</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L276" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/database-merge-parallel">database-merge-parallel</h2>
@@ -224,7 +242,9 @@ the new database.
<pre id="var-usage">Usage: (database-merge-parallel dbs)
</pre>
<pre id="var-docstr">Merges databases together in parallel</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L281" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/datalog-relation">datalog-relation</h2>
@@ -232,7 +252,9 @@ the new database.
<pre id="var-usage">Usage: (datalog-relation schema data indexes)
</pre>
<pre id="var-docstr">Creates a relation</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L75" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/ensure-relation">ensure-relation</h2>
@@ -240,7 +262,9 @@ the new database.
<pre id="var-usage">Usage: (ensure-relation db name keys indexes)
</pre>
<pre id="var-docstr">If the database lacks the named relation, add it</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L95" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/get-relation">get-relation</h2>
@@ -248,7 +272,9 @@ the new database.
<pre id="var-usage">Usage: (get-relation db rel-name)
</pre>
<pre id="var-docstr">Get a relation object by name</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L129" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/make-database">make-database</h2>
@@ -262,7 +288,9 @@ the new database.
(relation :sally [:jen :becky])
(index :sally :jen)
(index :sally :becky))</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L108" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/merge-relations">merge-relations</h2>
@@ -270,7 +298,9 @@ the new database.
<pre id="var-usage">Usage: (merge-relations r1 r2)
</pre>
<pre id="var-docstr">Merges two relations</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L266" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/remove-tuple">remove-tuple</h2>
@@ -285,7 +315,9 @@ returns a new database.
[rel tuple] removes the tuple from the relation. Returns the new
relation.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L189" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/replace-relation">replace-relation</h2>
@@ -293,7 +325,9 @@ relation.</pre>
<pre id="var-usage">Usage: (replace-relation db rel-name rel)
</pre>
<pre id="var-docstr">Add or replace a fully constructed relation object to the database.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L134" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.database/select">select</h2>
@@ -301,10 +335,14 @@ relation.</pre>
<pre id="var-usage">Usage: (select db rn pt)
</pre>
<pre id="var-docstr">finds all matching tuples to the partial tuple (pt) in the relation named (rn)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/2ede388a9267d175bfaa7781ee9d57532eb4f20f/src/main/clojure/clojure/contrib/datalog/database.clj#L247" id="var-source">Source</a>
+
+
+
</div>
<h2 id="namespace-name">datalog.literals</h2>
<pre id="namespace-docstr"></pre>
+
+
<br />
<div id="var-entry">
<hr />
@@ -314,6 +352,8 @@ relation.</pre>
</pre>
<pre id="var-docstr">Returns an unevaluated expression (to be used in a macro) of an
atom.</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L132" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -322,6 +362,8 @@ atom.</pre>
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">(Returns an unevaluated expression (to be used in macros) of a
literal.</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L127" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -329,6 +371,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Converts a struct representing a literal to a normal list</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L163" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -336,6 +380,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Return the column names this applies to</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L47" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -343,6 +389,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Return the predicate/relation this conditional operates over</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L43" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -350,6 +398,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Returns the logic vars used by this literal</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L51" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -358,6 +408,8 @@ literal.</pre>
<pre id="var-usage">Usage: (negated? l)
</pre>
<pre id="var-docstr">Is this literal a negated literal?</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L111" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -365,6 +417,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Returns the logic vars used in a negative position</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L59" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -372,6 +426,8 @@ literal.</pre>
<span id="var-type">multimethod</span><br />
<pre id="var-usage">No usage documentation available</pre>
<pre id="var-docstr">Returns the logic vars used in a positive position</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L55" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
@@ -380,10 +436,14 @@ literal.</pre>
<pre id="var-usage">Usage: (positive? l)
</pre>
<pre id="var-docstr">Is this a positive literal?</pre>
+
+
<a href="http://github.com/richhickey/clojure-contrib/blob/78ee9b3e64c5ac6082fb223fc79292175e8e4f0c/src/main/clojure/clojure/contrib/datalog/literals.clj#L116" id="var-source">Source</a>
</div>
<h2 id="namespace-name">datalog.util</h2>
<pre id="namespace-docstr"></pre>
+
+
<br />
<div id="var-entry">
<hr />
@@ -392,7 +452,9 @@ literal.</pre>
<pre id="var-usage">Usage: (is-query-var? sym)
</pre>
<pre id="var-docstr">Is this a query variable: e.g. a symbol prefixed with ??</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L33" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/is-var?">is-var?</h2>
@@ -400,7 +462,9 @@ literal.</pre>
<pre id="var-usage">Usage: (is-var? sym)
</pre>
<pre id="var-docstr">Is this a logic variable: e.g. a symbol prefixed with a ?</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L25" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/keys-to-vals">keys-to-vals</h2>
@@ -408,7 +472,9 @@ literal.</pre>
<pre id="var-usage">Usage: (keys-to-vals m ks)
</pre>
<pre id="var-docstr">Given a map and a collection of keys, return the collection of vals</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L49" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/map-values">map-values</h2>
@@ -416,7 +482,9 @@ literal.</pre>
<pre id="var-usage">Usage: (map-values f hash)
</pre>
<pre id="var-docstr">Like map, but works over the values of a hash map</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L41" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/preduce">preduce</h2>
@@ -428,7 +496,9 @@ parallel using f.
f - a function of 2 arguments.
data - a collection of hashes.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L62" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/reverse-map">reverse-map</h2>
@@ -436,7 +506,9 @@ data - a collection of hashes.</pre>
<pre id="var-usage">Usage: (reverse-map m)
</pre>
<pre id="var-docstr">Reverse the keys/values of a map</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L54" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.datalog.util/trace-datalog">trace-datalog</h2>
@@ -444,7 +516,9 @@ data - a collection of hashes.</pre>
<pre id="var-usage">Usage: (trace-datalog &amp; body)
</pre>
<pre id="var-docstr">If *test-datalog* is set to true, run the enclosed commands</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/ec6a7579d6b1c0bfa42e3666cfad196cffc966fe/src/main/clojure/clojure/contrib/datalog/util.clj#L82" id="var-source">Source</a>
+
+
+
</div>