Книга: Learning GNU Emacs, 3rd Edition
9.7.2.1 Interactive mode
9.7.2.1 Interactive mode
Start the interactive mode by typing M-x sql-mysql (or rather, your own variant of the interactive modes shown in Table 9-9).
Table 9-9. Commands for entering database-specific SQL modes
sql-db2 | sql-linter | sql-postgres |
sql-informix | sql-ms (Microsoft) | sql-solid |
sql-ingres | sql-mysql | sql-sqlite |
sql-interbase | sql-oracle | sql-sybase |
You'll be prompted for things like your username and password, the database or catalog to use, and the server to contact. Remember the prerequisites, though; many modes require that you have a normal command-line client available. The mode simply supplies an intelligent layer on top of those clients.
After you get connected, just type normal SQL commands that your server understands. Most interactive clients have some type of "end-of-line" marker to let the system know when to send a completed command. In MySQL, for example, you can end statements with a semicolon (;) or the g sequence.
Emacs keeps these commands in a history buffer for you so that you can revisit them. M-p and M-n allow you navigate to previous and next commands respectively. (C-p and C-n simply allow you to move around in the buffer as you would expect.)
- 4.2.4. A Hybrid Model
- 9.7.2 Modes of Operation
- 9.7.2.2 Editing mode
- 1.1.4. Model Explorer - навигатор модели
- Листинг 14.2. Использование параметра XMLWriteMode при сохранении объекта ADO.NET DataSet
- Getting Interactive
- Entering and Exiting PHP Mode
- 3.4.2. The Transaction Model
- Running yum Noninteractively
- 17.2.2. Preemption Models
- 17.4.9. Runtime Control of Locking Mode
- 1.3.14 Sleep Mode