Книга: 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.)

Оглавление книги

Оглавление статьи/книги

Генерация: 1.063. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз