ejc-sql icon indicating copy to clipboard operation
ejc-sql copied to clipboard

Can ejc-sql support sql.el's sql-interactive-mode?

Open stardiviner opened this issue 5 years ago • 3 comments

Is ejc-sql possible to provide code complete for sql.el's sql-interactive-mode buffer?

stardiviner avatar Dec 25 '19 08:12 stardiviner

Here is my temporary solution:

(defun ejc-sql-interactive-mode-setup ()
  "Setup ejc-sql completion in `sql-interactive-mode'."
  (interactive)
  (call-interactively 'ejc-connect)
  (ejc-sql-mode)
  (auto-complete-mode 1)
  (ejc-ac-setup))
(add-hook 'sql-interactive-mode #'ejc-sql-interactive-mode-setup)

WDYT?

stardiviner avatar Jan 23 '20 11:01 stardiviner

@stardiviner, how do you plan to connect to the desired database? Are you going to use sql-mode connection engine? Maybe this ad-hoc workaround will be ok for you. But for future development, I think it's worth to provide ejs-sql own DB connection for sql-interactive-mode.

kostafey avatar Feb 02 '20 02:02 kostafey

I agree, thanks that this is on the ejc-sql planning list.

stardiviner avatar Feb 02 '20 08:02 stardiviner