From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oJlIBR4c1WOlwwAAbAwnHQ (envelope-from ) for ; Sat, 28 Jan 2023 13:59:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eGYhBR4c1WNNLQAAauVa8A (envelope-from ) for ; Sat, 28 Jan 2023 13:59:10 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A550D3A73A for ; Sat, 28 Jan 2023 13:59:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLkmX-0003aP-N7; Sat, 28 Jan 2023 07:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLkmW-0003Zy-CC for emacs-orgmode@gnu.org; Sat, 28 Jan 2023 07:58:08 -0500 Received: from mail.bundesbrandschatzamt.de ([198.7.63.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLkmR-0004tc-9s for emacs-orgmode@gnu.org; Sat, 28 Jan 2023 07:58:05 -0500 Received-SPF: pass (mail.bundesbrandschatzamt.de: authenticated connection) receiver=mail.bundesbrandschatzamt.de; client-ip=91.64.203.22; helo=smtpclient.apple; envelope-from=baron@bundesbrandschatzamt.de; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from smtpclient.apple (ip5b40cb16.dynamic.kabel-deutschland.de [91.64.203.22]) (authenticated bits=0) by mail.bundesbrandschatzamt.de (8.14.7/8.14.7) with ESMTP id 30SCvxdB012392 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 12:58:00 GMT From: Andreas Gerler Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_4C821FBD-FFE1-4345-A35B-840735AC613E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: ob-sql dbconnection engine Date: Sat, 28 Jan 2023 13:57:52 +0100 In-Reply-To: <871qng86fa.fsf@localhost> Cc: emacs-orgmode@gnu.org To: Ihor Radchenko References: <31A92865-F761-42B4-BDD6-C8189CDE2045@bundesbrandschatzamt.de> <871qng86fa.fsf@localhost> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.bundesbrandschatzamt.de [198.7.63.95]); Sat, 28 Jan 2023 12:58:00 +0000 (UTC) X-DCC--Metrics: heimdall.bundesbrandschatzamt.de 1102; Body=2 Fuz1=2 Fuz2=2 X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: PGP_BLOCK,SPF_PASS,UNPARSEABLE_RELAY Received-SPF: permerror client-ip=198.7.63.95; envelope-from=baron@bundesbrandschatzamt.de; helo=mail.bundesbrandschatzamt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674910749; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=VPpOLZxUIbehL4qzuDZFixBAgUwc3Gz4VzPBRk/taf8=; b=Vsus/Oph8xBpcxkR3BmblcATrPq1spd8eCl1O1guuBjwnkiZdCEp04+uYEtp87uodd08kU Q6WVGzX9NXLqnA7bneHW6wrlMmtwrn6aQn67UKjaA1D9fEU1rS4eA5FDDZ4IWZB1dpuwe7 LHoN22bXwnfOUHxGzTBFyIyKQM3BLyj7TwO5vCRL4nNqr7Y0RVPAcSwUqVmkARifggbP0l LQQ5eExNqaqiIFPoZdb1TJs7GzUHUqfnWNi8b8ob6shbCHBvKXWh7EUHiKhUT9q9YNb4Fw tcl5/NFMahGpwborgIZxsfHl5N23vNfgIW2+sGcT6B+9aavic/ZGDyHkQ/Rezw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674910749; a=rsa-sha256; cv=none; b=LO6b+M3wejFHqNMQf3Q5zRkiJd6OMBjPD/Cl/sratpURWmP3E6/lUXt0s5xwz86iwWfXka Rai4RuDybxal045zCfzUiWDj7mkkUWchMqyJvV4029X3OUBZEDydRoS63DWPSXf2uVDVPC ZfX6myLu2WnKXveIl75TQD/Rb52bIc6teMxTb6RYywidaIKu3U3DE1sGmlGRjgr4bbxo63 t5dhowZQ1h2MjqpTVY01qSXhwTW9bN6TE1JdJPTwoR5Xk1ZXhylNiZ2zMGTUCmYeq174f1 yP/DTTBhhVbXOYBkqizDWkCsEUpRuG4rHkDjHAzNarQ/Lgu1jbORGtPrv296tQ== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.57 X-Spam-Score: -4.57 X-Migadu-Queue-Id: A550D3A73A X-TUID: r84svHv8vNIk --Apple-Mail=_4C821FBD-FFE1-4345-A35B-840735AC613E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 wrote: >=20 > Andreas Gerler writes: >=20 >> 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. >=20 > Thanks for the patch! > Could you please explain in more details what the patch does? >=20 > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at >=20 so long=E2=80=A6 Andreas Gerler =E2=80=94 http://www.bundesbrandschatzamt.de/~baron --Apple-Mail=_4C821FBD-FFE1-4345-A35B-840735AC613E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIzBAEBCgAdFiEERvQn3i5iUQoCDew4lRrK1qSO/JEFAmPVG9AACgkQlRrK1qSO /JES4w//XxCKkDgny1JBkLjAb1sMhalRfTMjWEGHWS6XMJi6dF7wH1zNklbF9jHJ pRQ75kjHxlK4eeVCvUTeoS6sjf8PAtsyNP+eGlwCrnCDm3L9WphahSL6MT66N44y VKP+5zJMf2n7JsyEqmKYF89vrsOhosCq9hG5GvY6f9eULH/iZBuAtTLWq8mPeA+w gtBFlkxV+53wkjNUw2lOnhBE9fSbeGcmg9anqf07mvxw6chZ6t5XOYbR3l5eZ0F0 unNuGO3CHyKS11Q9LsrbSu8N54WWEpOZ6s2sJUCVvvMKTN6k1JpLK1bUTNOwA/gv jJ/fN3eg55m1IlU5FG028+hwH3Uh498GGq7DbEBP+ZUG1EX+rlPmTxYkkOZzMKzD 9RzgDj+zrS79zF9tvnHWEghA/0ALPWPSrrZKWPim5yVIItiTs6SndUiZbPz1ojmS QzfzvmL7F0KfueREMhVPHvhj9g9SO9wPEcQshB2f4xmtf9KBWFpg4UTfvTN7Vx0j 9gDS0NQRfsJYH7Q2GDMJCGteNmOy1d++CkrF6zk8dEk4FoG6JtVShcCx6iEiq7Ba D5dnrnJ/2+V+d18DAaO6zSx7Uxc6voYWV40PQpgdPlciv3Xj/JUVWqsHgTJw9pGp CzlbJ9xCxj7iGRCcIH4mp+s8tEYIIPsqBwqCFHajLiQzpLV5+yc= =9e+H -----END PGP SIGNATURE----- --Apple-Mail=_4C821FBD-FFE1-4345-A35B-840735AC613E--