GNU bug report logs - #32724
26.1; sql.el: support presto client

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Wed, 12 Sep 2018 17:09:01 UTC

Severity: wishlist

Tags: patch

Found in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32724 in the body.
You can then email your comments to 32724 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32724; Package emacs. (Wed, 12 Sep 2018 17:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Sep 2018 17:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; sql.el: support presto client
Date: Wed, 12 Sep 2018 14:08:35 -0300
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 ";"))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32724; Package emacs. (Sun, 23 Jun 2019 21:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 32724 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: "Michael R. Mauger" <michael <at> mauger.com>, 32724 <at> debbugs.gnu.org
Subject: Re: bug#32724: 26.1; sql.el: support presto client
Date: Sun, 23 Jun 2019 23:50:38 +0200
Carlos Pita <carlosjosepita <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32724; Package emacs. (Wed, 26 Jun 2019 03:17:03 GMT) Full text and rfc822 format available.

Message #11 received at 32724 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <mmauger <at> protonmail.com>
To: larsi <at> gnus.org, carlosjosepita <at> gmail.com
Cc: michael <at> mauger.com, 32724 <at> debbugs.gnu.org
Subject: Re: bug#32724: 26.1; sql.el: support presto client
Date: Wed, 26 Jun 2019 03:15:43 +0000
[Message part 1 (text/plain, inline)]
-------- Original Message --------
> On Jun 23, 2019, 5:50 PM, Lars Ingebrigtsen < larsi <at> gnus.org> wrote:
> Carlos Pita <carlosjosepita <at> gmail.com> writes:
> > Here is a tentative partial implementation:
> >
> > ...
> I've Cc'd Michael Mauger on this -- perhaps he has a comment.

I'm sorry, I thought I had already responded to this on debbugs already...

My recommendation is to implement this as an ELPA package. That way it can be on a more frequent release cycle than core Emacs, and it gives you and others more leeway to provide more workflow features tailored specifically to Presto.

You've gone to this much effort.
You are going to have to assign your copyright to the FSF if the code is included in sql.el or in an ELPA module.
Come join us and become a package maintainer. I can certainly provide some guidance, but you've got a solid starting point.

Come join the Free side! :)

-- MICHAEL <at> MAUGER.COM // FSF and EFF member // GNU Emacs sql.el maintainer
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32724; Package emacs. (Wed, 26 Jun 2019 11:04:02 GMT) Full text and rfc822 format available.

Message #14 received at 32724 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Mauger <mmauger <at> protonmail.com>
Cc: michael <at> mauger.com, carlosjosepita <at> gmail.com, 32724 <at> debbugs.gnu.org
Subject: Re: bug#32724: 26.1; sql.el: support presto client
Date: Wed, 26 Jun 2019 13:02:58 +0200
Michael Mauger <mmauger <at> protonmail.com> writes:

> My recommendation is to implement this as an ELPA package. That way it
> can be on a more frequent release cycle than core Emacs, and it gives
> you and others more leeway to provide more workflow features tailored
> specifically to Presto.

OK; then this doesn't seem applicable to the Emacs bug tracker, and I'm
closing this bug report.

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




bug closed, send any further explanations to 32724 <at> debbugs.gnu.org and Carlos Pita <carlosjosepita <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 26 Jun 2019 11:04:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 24 Jul 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.