[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] ob-sql sql-connection-alist
From: |
Daniel Kraus |
Subject: |
Re: [BUG] ob-sql sql-connection-alist |
Date: |
Mon, 16 Jan 2023 11:45:58 +0100 |
Ihor Radchenko <yantar92@posteo.net> writes:
> Andreas Gerler <baron@bundesbrandschatzamt.de> writes:
>> (setq sql-connection-alist
>> '((testdb (sql-product 'mysql)
>> (sql-server "127.0.0.1")
>> (sql-user "mysql”)
>> (sql-port 3306)
>> (sql-password “foo")
>> (sql-database "mysql"))))
>
> I am looking at the docstring of `sql-connection-alist':
>
> An alist of connection parameters for interacting with a SQL product.
> Each element of the alist is as follows:
>
> (CONNECTION \(SQL-VARIABLE VALUE) ...)
>
> Where CONNECTION is a case-insensitive string identifying the
> connection, ...
>
> So, your "setq" example is incorrect: must use "testdb" instead of
> `testdb' symbol.
I'm not sure why but I also have the connection as a symbol in my
`sql-connection-alist`.
Looking in `sql.el` `(sql-connect)`, they also use
`assoc-string` to receive the connection:
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/sql.el?h=ac2a6fc83fac6390892b068a830ebe0f22364e05#n4398
So I think that change is good and supports both formats
(same as `sql-connect`).
Cheers,
Daniel
- Re: [BUG] ob-sql sql-connection-alist, (continued)
- Re: [BUG] ob-sql sql-connection-alist, Andreas Gerler, 2023/01/20
- Re: [BUG] ob-sql sql-connection-alist, Ihor Radchenko, 2023/01/21
- Re: [BUG] ob-sql sql-connection-alist, Andreas Gerler, 2023/01/21
- Re: [BUG] ob-sql sql-connection-alist, Bastien Guerry, 2023/01/22
- Re: [BUG] ob-sql sql-connection-alist, Bastien Guerry, 2023/01/26
- Re: [BUG] ob-sql sql-connection-alist, Ihor Radchenko, 2023/01/27
- Re: [BUG] ob-sql sql-connection-alist, Ihor Radchenko, 2023/01/27
- Re: [BUG] ob-sql sql-connection-alist, Andreas Gerler, 2023/01/27
- Re: [BUG] ob-sql sql-connection-alist, Andreas Gerler, 2023/01/28
Re: [BUG] ob-sql sql-connection-alist, Ihor Radchenko, 2023/01/16
- Re: [BUG] ob-sql sql-connection-alist,
Daniel Kraus <=