unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Carlos Pita <carlosjosepita@gmail.com>
Cc: "Michael R. Mauger" <michael@mauger.com>, 32724@debbugs.gnu.org
Subject: bug#32724: 26.1; sql.el: support presto client
Date: Sun, 23 Jun 2019 23:50:38 +0200	[thread overview]
Message-ID: <m3y31synrl.fsf@gnus.org> (raw)
In-Reply-To: <87efdyfxt8.fsf@gmail.com> (Carlos Pita's message of "Wed, 12 Sep 2018 14:08:35 -0300")

Carlos Pita <carlosjosepita@gmail.com> writes:

> Here is a tentative partial implementation:
>
> (defun sql-presto (&optional buffer)
>   (interactive "P")
>   (sql-product-interactive 'presto buffer))
>
> (defun sql-comint-presto (product options &optional buf-name)
>   (let* ((catalog-schema (split-string sql-database ":"))
>          (params (append options
>                          (list "--user" sql-user
>                                "--server" sql-server
>                                "--catalog" (car catalog-schema)
>                                "--schema" (cadr catalog-schema)))))
>     (sql-comint product params buf-name)))
>
> (defvar sql-presto-login-params '(user server database))
>
> (setf (alist-get 'presto sql-product-alist)
>       '(:name "Presto"
>         :font-lock sql-mode-ansi-font-lock-keywords
>         :sqli-program "bash"
>         :sqli-options ("-c" "PRESTO_PAGER= TERM=vt100 presto $@" "--")
>         :sqli-login sql-presto-login-params
>         :sqli-comint-func sql-comint-presto
>         :list-all "SHOW TABLES;"
>         :list-table "SHOW COLUMNS FROM %s;"
>         :prompt-regexp "^[[:alnum:]]+:[[:alnum:]]+> "
>         :prompt-cont-regexp "^[[:blank:]]+-> "
>         :terminator ";"))

I've Cc'd Michael Mauger on this -- perhaps he has a comment.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-06-23 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 17:08 bug#32724: 26.1; sql.el: support presto client Carlos Pita
2019-06-23 21:50 ` Lars Ingebrigtsen [this message]
2019-06-26  3:15   ` Michael Mauger
2019-06-26 11:02     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3y31synrl.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=32724@debbugs.gnu.org \
    --cc=carlosjosepita@gmail.com \
    --cc=michael@mauger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).