emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ob-sql dbconnection engine


From: Andreas Gerler
Subject: Re: ob-sql dbconnection engine
Date: Sat, 28 Jan 2023 15:15:40 +0100

Hi!

and a new patch with proper commit message.

Attachment: 0002-lisp-ob-sql.el-sql-connection-alist-engine.patch
Description: Binary data


> On 28. Jan 2023, at 13:57, Andreas Gerler <baron@bundesbrandschatzamt.de> 
> wrote:
> 
> Hi!
> 
> without the patch your org source block has to look like:
> 
> #+begin_src sql :engine mysql :dbconnection mysqldb1
>  SELECT * FROM nodes;
> #+end_src
> 
> with that patch you can just type
> 
> #+begin_src sql :dbconnection mysqldb1
>  SELECT * FROM nodes;
> #+end_src
> 
> because your engine is mapped to sql-product in your sql-connection-alist:
> 
> (setq sql-connection-alist
>      '((mysqldb1 (sql-product 'mysql)
>                (sql-server "10.10.42.1")
>                (sql-user "dbadmin")
>                (sql-password "foo")
>                (sql-database "testdb"))))
> 
> 
>> On 27. Jan 2023, at 14:15, Ihor Radchenko <yantar92@posteo.net> wrote:
>> 
>> Andreas Gerler <baron@bundesbrandschatzamt.de> writes:
>> 
>>> as I am still learning more elisp it took me some try and error but I can 
>>> use the sql-product now within dbconnection.
>>> Using :engine still works as well.
>>> Still wondering if there is a more elegant way for the if clause.
>> 
>> Thanks for the patch!
>> Could you please explain in more details what the patch does?
>> 
>> --
>> Ihor Radchenko // yantar92,
>> Org mode contributor,
>> Learn more about Org mode at <https://orgmode.org/>.
>> Support Org development at <https://liberapay.com/org-mode>,
>> or support my work at <https://liberapay.com/yantar92>
>> 
> 
> 
> 
> so long…
> 
> Andreas Gerler
> 
>
> 
> http://www.bundesbrandschatzamt.de/~baron

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]