emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Gerler <baron@bundesbrandschatzamt.de>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] ob-sql sql-connection-alist
Date: Sat, 28 Jan 2023 15:13:36 +0100	[thread overview]
Message-ID: <2839FBAB-0282-4AA7-B364-E49E441DF1B1@bundesbrandschatzamt.de> (raw)
In-Reply-To: <F2176E17-FC21-429F-969F-2F23237B12B2@bundesbrandschatzamt.de>


[-- Attachment #1.1: Type: text/plain, Size: 43 bytes --]

Hi!

I added the missing changelog entry.


[-- Attachment #1.2: 0001-lisp-ob-sql.el-allow-string-in-sql-connection-alist.patch --]
[-- Type: application/octet-stream, Size: 1125 bytes --]

From 37c4d1779ca2a426610bb61cb3a15f85775fa916 Mon Sep 17 00:00:00 2001
From: Andreas Gerler <baron@bundesbrandschatzamt.de>
Date: Fri, 20 Jan 2023 18:17:51 +0100
Subject: [PATCH 1/2] lisp/ob-sql.el: allow string in sql-connection-alist

* ob-sql.el (org-babel-find-db-connection-param): read
sql-connection-alist like sql.el/sql-connect and allow strings.

Signed-off-by: Andreas Gerler <baron@bundesbrandschatzamt.de>
---
 lisp/ob-sql.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 39a4573a5..f73e7003f 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -234,7 +234,7 @@ database connections."
                                   (:database . sql-database)))
                   (mapped-name (cdr (assq name name-mapping))))
              (cadr (assq mapped-name
-                         (cdr (assoc dbconnection sql-connection-alist))))))))
+                         (cdr (assoc-string dbconnection sql-connection-alist t))))))))
 
 (defun org-babel-execute:sql (body params)
   "Execute a block of Sql code with Babel.
-- 
2.39.0


[-- Attachment #1.3: Type: text/plain, Size: 239 bytes --]



> On 27. Jan 2023, at 17:58, Andreas Gerler <baron@bundesbrandschatzamt.de> wrote:
> 
> Hi!
> 
> I can prepare a new commit this weekend.
> 




so long…

Andreas Gerler
—

http://www.bundesbrandschatzamt.de/~baron

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 874 bytes --]

  reply	other threads:[~2023-01-28 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 16:00 [BUG] ob-sql sql-connection-alist Andreas Gerler
2023-01-16 10:25 ` Daniel Kraus
2023-01-20 17:24   ` Andreas Gerler
2023-01-20 17:30     ` Andreas Gerler
2023-01-20 20:41       ` Daniel Kraus
2023-01-20 21:03         ` Andreas Gerler
2023-01-21  8:48         ` Ihor Radchenko
2023-01-21 12:15           ` Andreas Gerler
2023-01-22 10:58           ` Bastien Guerry
2023-01-26 10:44           ` Bastien Guerry
2023-01-27 13:13             ` Ihor Radchenko
2023-01-27 13:18             ` Ihor Radchenko
2023-01-27 16:58               ` Andreas Gerler
2023-01-28 14:13                 ` Andreas Gerler [this message]
2023-01-30 16:59                   ` Daniel Kraus
2023-01-16 10:33 ` Ihor Radchenko
2023-01-16 10:45   ` Daniel Kraus
2023-01-16 11:05     ` Ihor Radchenko

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.orgmode.org/

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

  git send-email \
    --in-reply-to=2839FBAB-0282-4AA7-B364-E49E441DF1B1@bundesbrandschatzamt.de \
    --to=baron@bundesbrandschatzamt.de \
    --cc=emacs-orgmode@gnu.org \
    /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/org-mode.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).