1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>J</title>
<link rel="stylesheet" href="doc.css" type="text/css">
</head>
<body>
<h1>J</h1>
<dl>
<dt><a name="+Joint"><code>+Joint</code></a>
<dd>Class for bidirectional object relations, a subclass of <code><a
href="refL.html#+Link">+Link</a></code>. Expects a (symbolic) attribute, and
list of classes as <code><a href="refT.html#type">type</a></code> of the
referred database object (of class <code><a
href="refE.html#+Entity">+Entity</a></code>). A <code>+Joint</code> corresponds
to two <code>+Link</code>s, where the attribute argument is the relation of the
back-link in the referred object. See also <code><a
href="ref.html#dbase">Database</a></code>.
<pre><code>
(class +Ord +Entity) # Order class
(rel pos (+List +Joint) ord (+Pos)) # List of positions in that order
...
(class +Pos +Entity) # Position class
(rel ord (+Joint) # Back-link to the parent order
</code></pre>
<dt><a name="job"><code>(job 'lst . prg) -> any</code></a>
<dd>Executes a job within its own environment (as specified by symbol-value
pairs in <code>lst</code>). The current values of all symbols are saved, the
symbols are bound to the values in <code>lst</code>, <code>prg</code> is
executed, then the (possibly modified) symbol values are (destructively) stored
in the environment list, and the symbols are restored to their original values.
The return value is the result of <code>prg</code>. Typically used in <code><a
href="refC.html#curry">curried</a></code> functions and <code><a
href="refR.html#*Run">*Run</a></code> tasks. See also <code><a
href="refE.html#env">env</a></code>, <code><a
href="refB.html#bind">bind</a></code>, <code><a
href="refL.html#let">let</a></code>, <code><a
href="refU.html#use">use</a></code> and <code><a
href="refS.html#state">state</a></code>.
<pre><code>
: (de tst ()
(job '((A . 0) (B . 0))
(println (inc 'A) (inc 'B 2)) ) )
-> tst
: (tst)
1 2
-> 2
: (tst)
2 4
-> 4
: (tst)
3 6
-> 6
: (pp 'tst)
(de tst NIL
(job '((A . 3) (B . 6))
(println (inc 'A) (inc 'B 2)) ) )
-> tst
</code></pre>
<dt><a name="journal"><code>(journal 'any ..) -> T</code></a>
<dd>Reads journal data from the files with the names <code>any</code>, and
writes all changes to the database. See also <code><a
href="refP.html#pool">pool</a></code>.
<pre><code>
: (journal "db.log")
-> T
</code></pre>
</dl>
</body>
</html>
|