| 1 |
<!-- $Id: Query.html,v 1.4 1999/04/29 16:17:01 fw Exp $ --> |
| 2 |
<head> |
| 3 |
<title>Query</title> |
| 4 |
</head> |
| 5 |
|
| 6 |
<BODY BGCOLOR=#ffffff> |
| 7 |
|
| 8 |
<h2>Query Commands</h2> |
| 9 |
|
| 10 |
The syntax of the acedb query language is a little complex but quite |
| 11 |
powerful. It is explained in the <A |
| 12 |
HREF="Query_syntax.html">Query_syntax</a> help section and in the |
| 13 |
latex document doc/query_syntax. The query interface allows you to |
| 14 |
write command files with parameters. You can load and execute these as |
| 15 |
external programs (in $ACEDB/wquery/xxx.qry). Thus you can prepare in |
| 16 |
advance sets of useful commands for selecting data.<p> |
| 17 |
|
| 18 |
An easier, but less powerful, interface is provided by the <A |
| 19 |
HREF="Query_Builder.html">Query_Builder</a> and <A |
| 20 |
HREF="Query_By_Example.html">Query_by_example</a> which can be accessed |
| 21 |
from the main acedb menu. The related <A |
| 22 |
HREF="Table_Maker.html">Table_Maker</a> allows the contruction of |
| 23 |
relational tables.<p> |
| 24 |
|
| 25 |
|
| 26 |
<h3>Buttons</h3> |
| 27 |
|
| 28 |
<ul> |
| 29 |
|
| 30 |
<li><strong>Quit</strong>: Quits this window with an option to save |
| 31 |
your current file of commands, provided you have given a file name. |
| 32 |
|
| 33 |
<li><strong>Help</strong>: Invokes this section of the help file. |
| 34 |
|
| 35 |
<li><strong>Print</strong>: Print this window to a postscript file and |
| 36 |
send to printer (ACEDB_LPR). |
| 37 |
|
| 38 |
<li><strong>Clear</strong>: Clears all the user-entry boxes on the |
| 39 |
window. |
| 40 |
|
| 41 |
<li><strong>New KeySet</strong>: Calls up a new, blank keyset window |
| 42 |
titled "Query Answer". |
| 43 |
|
| 44 |
<li><strong>By Example</strong>: Call up the Query-by-example window. |
| 45 |
|
| 46 |
<li><strong>Builder</strong>: Call up the Query Builder window. |
| 47 |
|
| 48 |
<li><strong>Load</strong>: Loads the file Directory/FileName.qry if it |
| 49 |
exists. The ending .qry is added automatically |
| 50 |
|
| 51 |
<li><strong>Save</strong>: Saves the present set of commands into the |
| 52 |
file Directory/FileName.qry if you have write access to Directory. |
| 53 |
The ending .qry is added automatically |
| 54 |
|
| 55 |
<li><strong>Search Locally</strong>: Execute the current query on the |
| 56 |
local database and put the found and selected objects in the Keyset |
| 57 |
(selection list). |
| 58 |
|
| 59 |
<li><strong>Search IGD</strong>: Execute the current query for IGD and |
| 60 |
put the found and selected objects in the Keyset (selection list). |
| 61 |
|
| 62 |
<li><strong>Search Server</strong>: Execute the current query on a |
| 63 |
remote ACEDB server and put the found and selected objects in the |
| 64 |
Keyset (selection list). |
| 65 |
|
| 66 |
<li><strong>Undo</strong>: Cancels the last command and redisplays the |
| 67 |
previous Keyset (selection list). |
| 68 |
|
| 69 |
</ul> |
| 70 |
|
| 71 |
<h3>Menu items:</h3> |
| 72 |
|
| 73 |
<ul> |
| 74 |
|
| 75 |
<li><strong>Quit</strong>: quits the window. |
| 76 |
|
| 77 |
<li><strong>Help</strong>: brings up this help. |
| 78 |
|
| 79 |
<li><strong>Print Window</strong>: prepares a Post Script file in ./PS |
| 80 |
which you can then print on your local laser printer. |
| 81 |
|
| 82 |
<li><strong>Refresh</strong>: Redraws the window. |
| 83 |
|
| 84 |
<li><strong>Clear Entries</strong>: Same as Clear Button: Clears all |
| 85 |
the user-entry boxes on the window. |
| 86 |
|
| 87 |
<li><strong>Query By Example</strong>: Same as the By Example Button. |
| 88 |
Call up the Query-by-example window. |
| 89 |
|
| 90 |
<li><strong>Query Builder</strong>: Same as the Builder Button. Call |
| 91 |
up the Query Builder window. |
| 92 |
|
| 93 |
<li><strong>Load From File</strong>: Same as Load Button: Loads the |
| 94 |
file Directory/FileName.qry if it exists. The ending .qry is added |
| 95 |
automatically |
| 96 |
|
| 97 |
<li><strong>Save To File</strong>: Same as Save Button: Saves the |
| 98 |
present set of commands into the file Directory/FileName.qry if you |
| 99 |
have write access to Directory. The ending .qry is added |
| 100 |
automatically |
| 101 |
|
| 102 |
<li><strong>Send</strong>: Same as Send Button: Not used widely |
| 103 |
yet. (For Otto Ritter) This command sends the query to a remote |
| 104 |
distributed database. |
| 105 |
|
| 106 |
<li><strong>Enable [Disable}Autosave</strong>: When enabled (either by |
| 107 |
setenv ACEDB_AUTOSAVE or from menu on query window), this function |
| 108 |
will save the current series of query commands by appending the it to |
| 109 |
the end of a time-stamp labelled file in wquery/. These files can be |
| 110 |
later edited (using a simple text editor) and/or loaded. The backup |
| 111 |
save occurs whenever a Find (query search) is executed. |
| 112 |
|
| 113 |
<li><strong>Search Locally</strong>: Same as Search Locally Button: |
| 114 |
Execute the current query and put the found and selected objects in |
| 115 |
the Keyset (selection list). |
| 116 |
|
| 117 |
<li><strong>Search IGD</strong>: Same as Search IGD Button: Execute |
| 118 |
the current query for IGD and put the found and selected objects in |
| 119 |
the Keyset (selection list). |
| 120 |
|
| 121 |
<li><strong>Search Server</strong>: Same as Search Server Button: |
| 122 |
Execute the current query on a remote ACEDB server and put the found |
| 123 |
and selected objects in the Keyset (selection list). |
| 124 |
|
| 125 |
<li><strong>Undo Search</strong>: Same as Undo Button: Cancels the |
| 126 |
last command and redisplays the previous Keyset (selection list). |
| 127 |
|
| 128 |
</ul> |
| 129 |
|
| 130 |
<h3>Other details</h3> |
| 131 |
|
| 132 |
<strong>Direct Query Commands</strong> allows the FULL query syntax. |
| 133 |
See help on <A HREF="Query_syntax.html">Query_syntax</a> for more |
| 134 |
details. Edit the text box the same as any User Entry Boxes (pick with |
| 135 |
mouse, use keyboard). Execute a query command by clicking (again) on |
| 136 |
the left mouse button or hitting the RETURN key.<p> |
| 137 |
|
| 138 |
If you edit the last command line a new, blank box is created for the |
| 139 |
next input query command.<p> |
| 140 |
|
| 141 |
<strong>Scope</strong>: If the query starts as <strong>FIND |
| 142 |
my_class</strong>, the whole class my_class is searched; otherwise the |
| 143 |
query commands act on the active Keyset (selection list). To select |
| 144 |
another KeySet, pick it once (the pink label "Selected KeySet" will |
| 145 |
appear in the KeySet window). See <A HREF="KeySet.html">help on |
| 146 |
KeySets</a> for more information.<p> |
| 147 |
|
| 148 |
to <a href="TOC.html">Table of Contents</a><p> |
| 149 |
|
| 150 |
last edited: July 1994<p> |
| 151 |
|
| 152 |
</BODY> |