Home | History | Annotate | Line # | Download | only in db
      1  1.1  pgoyette #	$NetBSD: README,v 1.1 2011/01/07 15:05:58 pgoyette Exp $
      2  1.1  pgoyette #	@(#)README	8.8 (Berkeley) 7/31/94
      3  1.1  pgoyette 
      4  1.1  pgoyette Fairly large files (the command files) are built in this directory during
      5  1.1  pgoyette the test runs, and even larger files (the database files) are created in
      6  1.1  pgoyette "/var/tmp".  If the latter directory doesn't exist, set the environmental
      7  1.1  pgoyette variable TMPDIR to a directory where the files can be built.
      8  1.1  pgoyette 
      9  1.1  pgoyette =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     10  1.1  pgoyette The script file consists of lines with an initial character which is
     11  1.1  pgoyette the command for that line, or an initial character indicating a key
     12  1.1  pgoyette or data entry for a previous command.
     13  1.1  pgoyette 
     14  1.1  pgoyette Legal command characters are as follows:
     15  1.1  pgoyette 
     16  1.1  pgoyette c: compare a record
     17  1.1  pgoyette 	+ must be followed by [kK][dD]; the data value in the database
     18  1.1  pgoyette 	  associated with the specified key is compared to the specified
     19  1.1  pgoyette 	  data value.
     20  1.1  pgoyette e: echo a string
     21  1.1  pgoyette 	+ writes out the rest of the line into the output file; if the
     22  1.1  pgoyette 	  last character is not a carriage-return, a newline is appended.
     23  1.1  pgoyette f: set the flags for the next command
     24  1.1  pgoyette 	+ no value zero's the flags
     25  1.1  pgoyette g: do a get command
     26  1.1  pgoyette 	+ must be followed by [kK]
     27  1.1  pgoyette 	+ writes out the retrieved data DBT.
     28  1.1  pgoyette o [r]: dump [reverse]
     29  1.1  pgoyette 	+ dump the database out, if 'r' is set, in reverse order.
     30  1.1  pgoyette p: do a put command
     31  1.1  pgoyette 	+ must be followed by [kK][dD]
     32  1.1  pgoyette r: do a del command
     33  1.1  pgoyette 	+ must be followed by [kK] unless R_CURSOR flag set.
     34  1.1  pgoyette S: sync the database
     35  1.1  pgoyette s: do a seq command
     36  1.1  pgoyette 	+ must be followed by [kK] if R_CURSOR flag set.
     37  1.1  pgoyette 	+ writes out the retrieved data DBT.
     38  1.1  pgoyette 
     39  1.1  pgoyette Legal key/data characters are as follows:
     40  1.1  pgoyette 
     41  1.1  pgoyette D [file]: data file
     42  1.1  pgoyette 	+ set the current data value to the contents of the file
     43  1.1  pgoyette d [data]:
     44  1.1  pgoyette 	+ set the current key value to the contents of the line.
     45  1.1  pgoyette K [file]: key file
     46  1.1  pgoyette 	+ set the current key value to the contents of the file
     47  1.1  pgoyette k [data]:
     48  1.1  pgoyette 	+ set the current key value to the contents of the line.
     49  1.1  pgoyette 
     50  1.1  pgoyette Blank lines, lines with leading white space, and lines with leading
     51  1.1  pgoyette hash marks (#) are ignored.
     52  1.1  pgoyette 
     53  1.1  pgoyette Options to dbtest are as follows:
     54  1.1  pgoyette 
     55  1.1  pgoyette 	-d: Set the DB_LOCK flag.
     56  1.1  pgoyette 	-f: Use the file argument as the database file.
     57  1.1  pgoyette 	-i: Use the rest of the argument to set elements in the info
     58  1.1  pgoyette 	    structure.  If the type is btree, then "-i cachesize=10240"
     59  1.1  pgoyette 	    will set BTREEINFO.cachesize to 10240.
     60  1.1  pgoyette 	-o: The rest of the argument is the output file instead of
     61  1.1  pgoyette 	    using stdout.
     62  1.1  pgoyette 	-s: Don't delete the database file before opening it, i.e.
     63  1.1  pgoyette 	    use the database file from a previous run.
     64  1.1  pgoyette 
     65  1.1  pgoyette Dbtest requires two arguments, the type of access "hash", "recno"
     66  1.1  pgoyette or "btree", and the script name or "-" to indicate stdin.
     67