xref: /original-bsd/lib/libc/db/test/README (revision c3e32dec)
1#	@(#)README	8.1 (Berkeley) 06/04/93
2
3The script file consists of lines with a initial character which is
4the "command" for that line.  Legal characters are as follows:
5
6c: compare a record
7	+ must be followed by [kK][dD]; the data value in the database
8	  associated with the specified key is compared to the specified
9	  data value.
10e: echo a string
11	+ writes out the rest of the line into the output file; if the
12	  last character is not a carriage-return, a newline is appended.
13g: do a get command
14	+ must be followed by [kK]
15	+ writes out the retrieved data DBT.
16p: do a put command
17	+ must be followed by [kK][dD]
18r: do a del command
19	+ must be followed by [kK]
20s: do a seq command
21	+ writes out the retrieved data DBT.
22f: set the flags for the next command
23	+ no value zero's the flags
24D [file]: data file
25	+ set the current data value to the contents of the file
26d [data]:
27	+ set the current key value to the contents of the line.
28K [file]: key file
29	+ set the current key value to the contents of the file
30k [data]:
31	+ set the current key value to the contents of the line.
32o [r]: dump [reverse]
33	+ dump the database out, if 'r' is set, in reverse order.
34
35Options to dbtest are as follows:
36
37	-f: Use the file argument as the database file.
38	-i: Use the rest of the argument to set elements in the info
39	    structure.  If the type is btree, then "-i cachesize=10240"
40	    will set BTREEINFO.cachesize to 10240.
41	-o: The rest of the argument is the output file instead of
42	    using stdout.
43
44Dbtest requires two arguments, the type of access "hash", "recno" or
45"btree", and the script name.
46