Query

## Query Commands

The syntax of the acedb query language is a little complex but quite powerful. It is explained in the Query_syntax help section and in the latex document doc/query_syntax. The query interface allows you to write command files with parameters. You can load and execute these as external programs (in $ACEDB/wquery/xxx.qry). Thus you can prepare in advance sets of useful commands for selecting data.

An easier, but less powerful, interface is provided by the Query_Builder and Query_by_example which can be accessed from the main acedb menu. The related Table_Maker allows the contruction of relational tables.

### Buttons

- Quit: Quits this window with an option to save your current file of commands, provided you have given a file name.
- Help: Invokes this section of the help file.
- Print: Print this window to a postscript file and send to printer (ACEDB_LPR).
- Clear: Clears all the user-entry boxes on the window.
- New KeySet: Calls up a new, blank keyset window titled "Query Answer".
- By Example: Call up the Query-by-example window.
- Builder: Call up the Query Builder window.
- Load: Loads the file Directory/FileName.qry if it exists. The ending .qry is added automatically
- Save: Saves the present set of commands into the file Directory/FileName.qry if you have write access to Directory. The ending .qry is added automatically
- Search Locally: Execute the current query on the local database and put the found and selected objects in the Keyset (selection list).
- Search IGD: Execute the current query for IGD and put the found and selected objects in the Keyset (selection list).
- Search Server: Execute the current query on a remote ACEDB server and put the found and selected objects in the Keyset (selection list).
- Undo: Cancels the last command and redisplays the previous Keyset (selection list).

### Menu items:

- Quit: quits the window.
- Help: brings up this help.
- Print Window: prepares a Post Script file in ./PS which you can then print on your local laser printer.
- Refresh: Redraws the window.
- Clear Entries: Same as Clear Button: Clears all the user-entry boxes on the window.
- Query By Example: Same as the By Example Button. Call up the Query-by-example window.
- Query Builder: Same as the Builder Button. Call up the Query Builder window.
- Load From File: Same as Load Button: Loads the file Directory/FileName.qry if it exists. The ending .qry is added automatically
- Save To File: Same as Save Button: Saves the present set of commands into the file Directory/FileName.qry if you have write access to Directory. The ending .qry is added automatically
- Send: Same as Send Button: Not used widely yet. (For Otto Ritter) This command sends the query to a remote distributed database.
- Enable [Disable}Autosave: When enabled (either by setenv ACEDB_AUTOSAVE or from menu on query window), this function will save the current series of query commands by appending the it to the end of a time-stamp labelled file in wquery/. These files can be later edited (using a simple text editor) and/or loaded. The backup save occurs whenever a Find (query search) is executed.
- Search Locally: Same as Search Locally Button: Execute the current query and put the found and selected objects in the Keyset (selection list).
- Search IGD: Same as Search IGD Button: Execute the current query for IGD and put the found and selected objects in the Keyset (selection list).
- Search Server: Same as Search Server Button: Execute the current query on a remote ACEDB server and put the found and selected objects in the Keyset (selection list).
- Undo Search: Same as Undo Button: Cancels the last command and redisplays the previous Keyset (selection list).

### Other details

Direct Query Commands allows the FULL query syntax. See help on Query_syntax for more details. Edit the text box the same as any User Entry Boxes (pick with mouse, use keyboard). Execute a query command by clicking (again) on the left mouse button or hitting the RETURN key.

If you edit the last command line a new, blank box is created for the next input query command.

Scope: If the query starts as FIND my_class, the whole class my_class is searched; otherwise the query commands act on the active Keyset (selection list). To select another KeySet, pick it once (the pink label "Selected KeySet" will appear in the KeySet window). See help on KeySets for more information.

to Table of Contents

last edited: July 1994