From 0633a666b1499386365571997a7cd5152cb98a80 Mon Sep 17 00:00:00 2001
From: Fredrik Noring <noring@nocrew.org>
Date: Mon, 25 May 1998 01:08:24 +0200
Subject: [PATCH] More Yabu changes.

Rev: tutorial/tutorial.wmml:1.84
---
 tutorial/tutorial.wmml | 232 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 196 insertions(+), 36 deletions(-)

diff --git a/tutorial/tutorial.wmml b/tutorial/tutorial.wmml
index ee3daa8155..f1b71ef4ee 100644
--- a/tutorial/tutorial.wmml
+++ b/tutorial/tutorial.wmml
@@ -7310,6 +7310,10 @@ object t = ADT.Table.table( ({ ({ "Blixt", "Gordon" }),
 </example>
 </man_example>
 
+<man_see>
+ADT.Table.ASCII.encode
+</man_see>
+
 </method>
 
 <hr noshade size=1>
@@ -7609,7 +7613,7 @@ rows in both tables must be equal.
 
 <hr noshade size=1>
 
-<method name=ADT.Table.ASCII-&gt;encode title="produces an ASCII formated table">
+<method name=ADT.Table.ASCII.encode title="produces an ASCII formated table">
 <man_syntax>
 string encode(object <i>table</i>, mapping|void <i>options</i>);<br>
 </man_syntax>
@@ -7662,29 +7666,23 @@ write(.Table.ASCII.encode(t->select("frukt")->distinct("frukt")->
 
 <module name=Yabu>
 <section title="Yabu">
-Yabu is an all purpose database, used to store data records associated with a
+Yabu is a all purpose database, used to store data records associated with a
 unique key. Yabu is very similar to mappings, however, records are
 stored in files and not in memory. Also, Yabu features <i>tables</i>,
 which is a way to handle several mapping-like structures in the same
 database. A characteristic feature of Yabu is that it allows for
-<i>transactions</i>. A transaction is a sequence of database manipulations
+<i>transactions</i>. A transaction is a sequence of database commands
 that will be accepted in whole, or not at all.<p>
 
-Alot of effort have been put to make sure that Yabu is crash safe.
-This means that the database should survive process kills, core dumps
-and such. Also, all non-commited and pending transactions will be
-cancelled in case of a crash.<p>
-
-<man_note>
-It is very important not to open the same a database more than
-once at a time. Otherwise there will be conflicts and most likely
-strange failures and unpredictable behaviours. Yabu does not check
-weather a database is already open or not.
-</man_note>
+Some effort have been made to make sure that Yabu is crash safe.
+This means that the database should survive process kills, core
+dumps and such -- although this is not something that can absolutely
+guaranteed. Also, all non-commited and pending transactions will
+be cancelled in case of a crash.<p>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;create title="opens a Yabu database">
+<method name=Yabu.db-&gt;create title="Open a Yabu database">
 <man_syntax>
 void create(string <i>directory</i>, string <i>mode</i>);
 </man_syntax>
@@ -7695,7 +7693,7 @@ Create takes two arguments:<p>
 store its files. Yabu will create the directory if it does not exist,
 provided Yabu is opened in write and create mode (see below).<p>
 <li><i>mode</i> is a string specifying the mode in which Yabu will
-operate. There are four switches available:<p>
+operate. There are five switches available:<p>
 <blockquote>
 "r" - Read mode. No database entries can be altered and no files will
 be modified.<p>
@@ -7703,11 +7701,20 @@ be modified.<p>
 only used togheter with write mode.<p>
 "w" - Write mode. The database can be altered and the files will be
 updates accordingly.<p>
-"C" - Compress mode. Provided the <link to=Gz>Gz-module</link> is
+"t" - Transaction mode. The database now allows transactions.<p>
+"C" - Compress mode. Provided the <link to=Gz>Gz module</link> is
 available, all records will be compressed before stored on to disk.<p>
 </blockquote>
 </ol>
 </man_description>
+
+<man_note>
+It is very important not to open the same a database more than
+once at a time. Otherwise there will be conflicts and most likely
+strange failures and unpredictable behaviours. Yabu does not check
+weather a database is already open or not.
+</man_note>
+
 <man_example>
 <example language=pike>
 // Open a database in create/write mode.
@@ -7720,11 +7727,21 @@ object db = Yabu.db("my.database", "r");
 object db = Yabu.db("my.database", "cwC");
 </example>
 </man_example>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;`[],
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;sync,
+Yabu.db-&gt;purge
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;table title="opens a table">
+<method name=Yabu.db-&gt;table title="Open a table">
 <man_syntax>
 object(table) table(string <i>table_name</i>);<br>
 </man_syntax>
@@ -7732,33 +7749,80 @@ object(table) table(string <i>table_name</i>);<br>
 This method opens a table with <i>table_name</i>. If the table
 does not exist, it will be created. A table object will be returned.
 </man_description>
+
+<man_see>
+Yabu.db-&gt;`[],
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;sync,
+Yabu.db-&gt;purge
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;`[] title="opens a table">
+<method name=Yabu.db-&gt;`[] title="Open a table">
 <man_syntax>
 object(table) `[](string <i>table_name</i>);<br>
 </man_syntax>
 <man_description>
-Synonymous with <link to=Yabu.db.table>table</link>.
+Synonymous with <link to=Yabu.db.table>Yabu.table-&gt;table</link>.
 </man_description>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;sync,
+Yabu.db-&gt;purge
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;_indices title="lists all tables">
+<method name=Yabu.db-&gt;list_tables title="List all tables">
 <man_syntax>
-array(string) _indices();<br>
+array(string) list_tables();<br>
 </man_syntax>
 <man_description>
 This method lists all available tables.
 </man_description>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;`[],
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;sync,
+Yabu.db-&gt;purge
+</man_see>
+
+</method>
+
+<hr noshade size=1>
+
+<method name=Yabu.db-&gt;_indices title="List all tables">
+<man_syntax>
+array(string) _indices();<br>
+</man_syntax>
+<man_description>
+Synonymous with <link to=Yabu.table.set>Yabu.table-&gt;list_tables</link>.
+</man_description>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;`[],
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;sync,
+Yabu.db-&gt;purge
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;sync title="synchronizes the database">
+<method name=Yabu.db-&gt;sync title="Synchronize database">
 <man_syntax>
 void sync();<br>
 </man_syntax>
@@ -7768,22 +7832,40 @@ about the database in memory for performance reasons. Syncing is recommended
 when one wants the information on disk to be updated with the current
 information in memory.
 </man_description>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;`[],
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;purge
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.db-&gt;purge title="deletes the database">
+<method name=Yabu.db-&gt;purge title="Delete database">
 <man_syntax>
 void purge();<br>
 </man_syntax>
 <man_description>
 This method deletes the whole database and all database files stored on disk.
 </man_description>
+
+<man_see>
+Yabu.db-&gt;table,
+Yabu.db-&gt;`[],
+Yabu.db-&gt;list_tables,
+Yabu.db-&gt;_indices,
+Yabu.db-&gt;sync
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;set title="stores a record in the table">
+<method name=Yabu.table-&gt;set title="Store a record in a table">
 <man_syntax>
 mixed set(string key, mixed data);<br>
 </man_syntax>
@@ -7792,21 +7874,35 @@ This method stores the contents of <i>data</i> as a record with the name
 <i>key</i>. If a record with that name already exists, it will be
 replaced. Records can only be added to the database in write mode.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;get,
+Yabu.table-&gt;delete,
+Yabu.table-&gt;list_keys
+</man_see>
+
 </method>
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;`[]= title="stores a record in the table">
+<method name=Yabu.table-&gt;`[]= title="Store a record in a table">
 <man_syntax>
 mixed `[]=(string key, mixed data);<br>
 </man_syntax>
 <man_description>
-Synonymous with <link to=Yabu.table.set>set</link>.
+Synonymous with <link to=Yabu.table.set>Yabu.table-&gt;set</link>.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;get,
+Yabu.table-&gt;delete,
+Yabu.table-&gt;list_keys
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;get title="fetch a record in the table">
+<method name=Yabu.table-&gt;get title="Fetch a record from a table">
 <man_syntax>
 mixed get(string key);<br>
 </man_syntax>
@@ -7814,44 +7910,90 @@ mixed get(string key);<br>
 This method fetches the data associated with the record name
 <i>key</i>. If a record does not exist, zero is returned.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;set,
+Yabu.table-&gt;delete,
+Yabu.table-&gt;list_keys
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;`[] title="fetch a record in the table">
+<method name=Yabu.table-&gt;`[] title="Fetch a record from a table">
 <man_syntax>
 mixed `[](string key);<br>
 </man_syntax>
 <man_description>
-Synonymous with <link to=Yabu.table.get>get</link>.
+Synonymous with <link to=Yabu.table.get>Yabu.table-&gt;get</link>.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;set,
+Yabu.table-&gt;delete,
+Yabu.table-&gt;list_keys
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;list_keys title="lists the records in the table">
+<method name=Yabu.table-&gt;list_keys title="List the records in a table">
 <man_syntax>
 array(string) list_keys();<br>
 </man_syntax>
 <man_description>
 This method lists all record names in the table.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;set,
+Yabu.table-&gt;get,
+Yabu.table-&gt;delete
+</man_see>
+
+</method>
+
+<hr noshade size=1>
+
+<method name=Yabu.table-&gt;_indices title="List the records in a table">
+<man_syntax>
+array(string) _indices();<br>
+</man_syntax>
+<man_description>
+Synonymous with <link to=Yabu.table.get>Yabu.table-&gt;list_keys</link>.
+</man_description>
+
+<man_see>
+Yabu.table-&gt;set,
+Yabu.table-&gt;get,
+Yabu.table-&gt;delete
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;delete title="deletes a record from a table">
+<method name=Yabu.table-&gt;delete title="Delete a record in a table">
 <man_syntax>
 void delete(string <i>key</i>);<br>
 </man_syntax>
 <man_description>
 This method deletes the record with the name <i>key</i>.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;set,
+Yabu.table-&gt;get,
+Yabu.table-&gt;list_keys
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;purge title="deletes a table">
+<method name=Yabu.table-&gt;purge title="Delete a table">
 <man_syntax>
 void purge();<br>
 </man_syntax>
@@ -7862,7 +8004,7 @@ This method deletes the whole table and the table files on disk.
 
 <hr noshade size=1>
 
-<method name=Yabu.table-&gt;transaction title="begins a transaction">
+<method name=Yabu.table-&gt;transaction title="Begin a transaction">
 <man_syntax>
 object(transaction) transaction();<br>
 </man_syntax>
@@ -7879,11 +8021,17 @@ before the transaction is commited, a conflict will arise upon commit.
 A transaction can be cancelled using <link to=Yabu.transaction.rollback>
 rollback</link>.
 </man_description>
+
+<man_see>
+Yabu.transaction-&gt;commit,
+Yabu.transaction-&gt;rollback
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.transaction-&gt;commit title="commits a transaction">
+<method name=Yabu.transaction-&gt;commit title="Commit a transaction">
 <man_syntax>
 void commit();<br>
 </man_syntax>
@@ -7892,11 +8040,17 @@ This method commits the changes made in a transaction. If a record affected
 by the transaction is altered during the transaction, a conflict will
 arise and an error is thrown.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;transaction,
+Yabu.transaction-&gt;rollback
+</man_see>
+
 </method>
 
 <hr noshade size=1>
 
-<method name=Yabu.transaction-&gt;rollback title="rollbacks a transaction">
+<method name=Yabu.transaction-&gt;rollback title="Rollback a transaction">
 <man_syntax>
 void rollback();<br>
 </man_syntax>
@@ -7904,6 +8058,12 @@ void rollback();<br>
 This method cancels a transaction. All changes made in the transaction
 are lost.
 </man_description>
+
+<man_see>
+Yabu.table-&gt;transaction,
+Yabu.transaction-&gt;commit
+</man_see>
+
 </method>
 
 </section>
-- 
GitLab