home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / CONTRIB / MBASE / MBASE50.TAR / mbase / dox / vr.dox < prev   
Encoding:
Text File  |  1992-10-02  |  5.0 KB  |  98 lines

  1. VR -- View Relation                                               MetalBase 5.0
  2. -------------------------------------------------------------------------------
  3.  
  4.                                    Curses
  5.  
  6.      Take a look at curses.dox if you're using MS-DOS and don't have curses.
  7.  
  8.                                   Functions
  9.  
  10. VR is utility which allows visual querying and modification of the records
  11. in any relation.  I'll be honest here--I modeled it directly after Informix'
  12. enter2 command... not a bad port, if I do say so, seeing as I have no idea
  13. how they did theirs.  So thanks for the idea, Informix; you know, imitation is
  14. the sincerest form of flattery...
  15.  
  16. The command-line format is trivial:
  17.     % vr [relationname[.rel]]
  18. If not compiled with -DNOENCRYPT, vr will ask for an encryption password after
  19. every time a relation is specified; on the command line, or with the 'Rel'
  20. option from the main menu.  This password is hashed using the standard
  21. strtokey() function in MetalBase, and is used to open the relation.  If a
  22. relation is specified on the command line which cannot be opened, vr will
  23. return to the command line after indicating the error.  Once at the main
  24. menu, though, vr will not exit until you tell it to; errors instead appear on
  25. the bottom line of the display, highlighted (nifty, eh?).
  26.  
  27. The various functions performed by vr are:
  28.  
  29. First  -- Find the first record in the given relation, on the current index.
  30.           When a relation is first opened, the current index is set to the
  31.           first specified in the schema; afterwards, it may be selected using
  32.           the 'Idx' option, described below.
  33. Last   -- Find the last record in the relation, following the current index.
  34. Next   -- Find the next record sequentially.  If no current record is selected
  35.           (the fields shown will all be blank or 0), this function acts as if
  36.           you had selected 'First'.
  37. Prev   -- Find the previous record sequentially.  If no current record is
  38.           selected, this function acts as if you had selected 'Last'.
  39. Gteq   -- Find the record which is greater than or equal to a specified record,
  40.           alphabetically/numerically (whichever is appropriate for each field).
  41.           When you select Gteq or Equ (described below), all fields will
  42.           disappear from the display other than those used by the current
  43.           index; these will appear in the order in which they are used by the
  44.           index.  Enter as many as you like, starting with the first
  45.           (naturally); when you hit accept the transaction (movement is
  46.           described later), it will search for the appropriate record and, if
  47.           found, display it.
  48. Equ    -- Similar to Gteq, Equ will accept only a record which is exactly equal
  49.           to that specified for the relevant fields; if one is not found, the
  50.           query fails.
  51. Idx    -- Selecting Idx will allow you to change which index is currently being
  52.           used to search.  A list will appear for you of valid indices and
  53.           their order; you may enter either their name or number.
  54. Screen -- If a relation has more than 18 fields, they will not all fit on the
  55.           display at once; selecting 'screen' will toggle which set of 18
  56.           is displayed.
  57. Add    -- 'Add' allows you, obviously enough, to add a new record to the
  58.           relation.
  59. Upd    -- Similarly, 'Upd' allows you to update the current record.
  60. Del    -- And, 'Del' deletes the current record.  After the record has been
  61.           deleted, the record will disappear and you'll have to make another
  62.           query.
  63. Rel    -- 'Rel' allows you to open a new relation.
  64.  
  65.                                Standard Keys
  66.  
  67. Other than movement keys, the following are accepted:
  68.    Ctrl-A  : Accept data-entry--same as ":w" or ":x" if in vi-emulation mode.
  69.    Ctrl-C  : Abort data-entry.
  70.    Ctrl-Q  : Abort data-entry.
  71.    Ctrl-U  : Undo any changes (to this field only)
  72.    PgUp    : Works like an up-arrow
  73.    PgDn    : Works like an down-arrow
  74.    Del     : Works like a backspace
  75.  
  76. The arrow keys work just dandy in *nix, or if you're using the same curses
  77. package I am... don't know about any others.
  78.  
  79.                                   Movement
  80.  
  81. Users who are not familiar with the editor vi will probably wish NOT to compile
  82. vr with -DVI_EMU; if this isn't present, it removes some of the input routine's
  83. editing and movement commands, but allows the user to enter text in a more
  84. intuitive manner.
  85.  
  86. Arrow keys operate as expected; vi'ers, you may ARROW _past_ the end of a line
  87. of text, whereas space and 'l' will not let you (in keeping with vi's
  88. conventions).  Others, you are in perpetual insert, with backspace and DEL
  89. always destructive, and left-arrow not (unless in VI-emulation).
  90.  
  91. Vi'ers, there are some extra ways to exit a template entry: normally, you
  92. may only accept a transaction, and then, only by hitting return on the last
  93. field in the set.  Without VI you can abort a transaction by hitting ESC
  94. twice; you may want to hit it 3 times, just to make it catch the second
  95. more quickly; with vi, typing :q (no return) will abort a transaction, and :w
  96. or :x will accept it, from any point.
  97.  
  98.