Function: sql-set-sqli-buffer

sql-set-sqli-buffer is an interactive and byte-compiled function defined in sql.el.gz.

Signature

(sql-set-sqli-buffer)

Documentation

Set the SQLi buffer SQL strings are sent to.

Call this function in a SQL buffer in order to set the SQLi buffer SQL strings are sent to. Calling this function sets sql-buffer and runs sql-set-sqli-hook.

If you call it from a SQL buffer, this sets the local copy of sql-buffer.

If you call it from anywhere else, it sets the global copy of sql-buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-set-sqli-buffer ()
  "Set the SQLi buffer SQL strings are sent to.

Call this function in a SQL buffer in order to set the SQLi buffer SQL
strings are sent to.  Calling this function sets `sql-buffer' and runs
`sql-set-sqli-hook'.

If you call it from a SQL buffer, this sets the local copy of
`sql-buffer'.

If you call it from anywhere else, it sets the global copy of
`sql-buffer'."
  (interactive)
  (let ((default-buffer (sql-find-sqli-buffer)))
    (if (null default-buffer)
        (sql-product-interactive)
      (let ((new-buffer (read-buffer "New SQLi buffer: " default-buffer t)))
        (if (null (sql-buffer-live-p new-buffer))
            (user-error "Buffer %s is not a working SQLi buffer" new-buffer)
          (when new-buffer
            (setq sql-buffer new-buffer)
            (run-hooks 'sql-set-sqli-hook)))))))