GNU bug report logs -
#32724
26.1; sql.el: support presto client
Previous Next
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.
Full log
View this message in rfc822 format
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
This bug report was last modified 6 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.