xref: /csrg-svn/lib/libc/db/test/README (revision 59622)
1*59622Sbostic#	@(#)README	5.7 (Berkeley) 05/01/93
256037Sbostic
356037SbosticThe script file consists of lines with a initial character which is
456037Sbosticthe "command" for that line.  Legal characters are as follows:
556037Sbostic
656553Sbosticc: compare a record
756553Sbostic	+ must be followed by [kK][dD]; the data value in the database
856553Sbostic	  associated with the specified key is compared to the specified
956553Sbostic	  data value.
1056057Sbostice: echo a string
1156555Sbostic	+ writes out the rest of the line into the output file; if the
1256555Sbostic	  last character is not a carriage-return, a newline is appended.
1356037Sbosticg: do a get command
1456037Sbostic	+ must be followed by [kK]
1556037Sbostic	+ writes out the retrieved data DBT.
1656037Sbosticp: do a put command
1756037Sbostic	+ must be followed by [kK][dD]
1856037Sbosticr: do a del command
1956037Sbostic	+ must be followed by [kK]
2056037Sbostics: do a seq command
2156057Sbostic	+ writes out the retrieved data DBT.
2256037Sbosticf: set the flags for the next command
2356037Sbostic	+ no value zero's the flags
2456037SbosticD [file]: data file
2556037Sbostic	+ set the current data value to the contents of the file
2656037Sbosticd [data]:
2756037Sbostic	+ set the current key value to the contents of the line.
2856037SbosticK [file]: key file
2956037Sbostic	+ set the current key value to the contents of the file
3056037Sbostick [data]:
3156037Sbostic	+ set the current key value to the contents of the line.
3256991Sbostico [r]: dump [reverse]
3356991Sbostic	+ dump the database out, if 'r' is set, in reverse order.
3456037Sbostic
3556037SbosticOptions to dbtest are as follows:
3656037Sbostic
37*59622Sbostic	-f: Use the file argument as the database file.
3856037Sbostic	-i: Use the rest of the argument to set elements in the info
3956037Sbostic	    structure.  If the type is btree, then "-i cachesize=10240"
4056037Sbostic	    will set BTREEINFO.cachesize to 10240.
4156037Sbostic	-o: The rest of the argument is the output file instead of
4256037Sbostic	    using stdout.
4356488Sbostic
4456488SbosticDbtest requires two arguments, the type of access "hash", "recno" or
4556488Sbostic"btree", and the script name.
46