home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / lib / libc / db / test / README < prev    next >
Encoding:
Text File  |  1993-06-04  |  1.6 KB  |  46 lines

  1. #    @(#)README    8.1 (Berkeley) 6/4/93
  2.  
  3. The script file consists of lines with a initial character which is
  4. the "command" for that line.  Legal characters are as follows:
  5.  
  6. c: 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.
  10. e: 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.
  13. g: do a get command
  14.     + must be followed by [kK]
  15.     + writes out the retrieved data DBT.
  16. p: do a put command
  17.     + must be followed by [kK][dD]
  18. r: do a del command
  19.     + must be followed by [kK]
  20. s: do a seq command
  21.     + writes out the retrieved data DBT.
  22. f: set the flags for the next command
  23.     + no value zero's the flags
  24. D [file]: data file
  25.     + set the current data value to the contents of the file
  26. d [data]:
  27.     + set the current key value to the contents of the line.
  28. K [file]: key file
  29.     + set the current key value to the contents of the file
  30. k [data]:
  31.     + set the current key value to the contents of the line.
  32. o [r]: dump [reverse]
  33.     + dump the database out, if 'r' is set, in reverse order.
  34.  
  35. Options 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.  
  44. Dbtest requires two arguments, the type of access "hash", "recno" or
  45. "btree", and the script name.
  46.