From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sA+ENOAnxWNcLAAAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 11:33:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UACeNOAnxWMVagEA9RJhRA (envelope-from ) for ; Mon, 16 Jan 2023 11:33:04 +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 4DD79A802 for ; Mon, 16 Jan 2023 11:33:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHMnQ-0004fN-TL; Mon, 16 Jan 2023 05:32:57 -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 1pHMnA-0004as-6v for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:32:41 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pHMn8-00078M-DV for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:32:39 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NwSyD3tgpz9sb2; Mon, 16 Jan 2023 11:32:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus.my; s=MBO0001; t=1673865140; h=from:from: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; bh=TFzleAARuqnpijlzIpbwDucoGG8xqgIWyW2XzpBnLIA=; b=EDf2KxeSNY5kfvxk6Z0ztlIqeOC1+6KeFPzA3Mwg0EBh0nzypl9MfOvDXtYLEpCoCtlAbc 5i/F9GxMcCGSf502pcnAbRkDK7il+6b3EokaMeUTkEmn7arwo+B10y23QURpbnXEckTt8s eSsMVkpvgVtEMv6R2IvvyI8/SyTkAYyCozvq2e37IAHcXDMYjXQs0aOfLRd6Bez/OdlTyW 3IJaFEf6wI2Q8BEX1gEy8C+Dgzu9EElRGc7kdx/a7G1qzjpxMKa6AJxjT1HXmgrRaiN4PH jfiIIFFcoelXX+HwcKbDbeJlM0cMBM0zoRdg3+G57DIDYQNmLHrnl4LAS1QbZw== References: From: Daniel Kraus To: Andreas Gerler Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] ob-sql sql-connection-alist Date: Mon, 16 Jan 2023 11:25:18 +0100 In-reply-to: Message-ID: <87cz7ebwig.fsf@kraus.my> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=80.241.56.152; envelope-from=daniel@kraus.my; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673865184; a=rsa-sha256; cv=none; b=CP+KJ3UbWItmK4gW6Htjfza/YRndv00fQKJvxhx2y58wOzezmQrkCTo+nXVH9keALcKUW/ DPxlecohe1MAZTa5VKSj8RWnaYstjkS/u0XwktcOglFhPph/3gLZyt17aVg4vPOnveOsW+ fw+WEoHCNwtV/6fC8S9V4y7XUgFfB4XKZZQ4lSUhXtDwW719KrrifEC/FFAz2pQ86ev3nY xd7QSMKKslq2mLKT4xwCdyQjjFtYuOODUAltR27zGSMwkFhAd/B+u3Z0NaxGBFhEbmUoU/ nwvBOgjTXs3YSd7KkcLQW0LHIh4lxWsPRgoZBb83QIaztz/vFFN2IKsKixaILg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=EDf2KxeS; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673865184; 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:dkim-signature; bh=TFzleAARuqnpijlzIpbwDucoGG8xqgIWyW2XzpBnLIA=; b=ectEidr/+HAHiSFImSlyatcBDg6geXyELpupwy1J6cA+2F1mWa50+0cSq9pLriTZYzWlHr jOmW7On0wImNA04m7V566TGRcNUB7Jy1cMRKEHoGMWKEW/b25CcJ2FdVUATjtSieRX9ffB V9q9Oe4G2ovnEn9tqqa2uRIrC7etDspLXmtHF3WIfcpipiNIX5iGzmI/ftquBbn3n/yMZT 7Qx/ABRzx31Dzig5FyUeGPrb0qNB3/dAYloGOSAJe37BHMBDNvUGbLM3wKdtnuzlMcV6QA C6Nz4nPd26CW2Mio/7h1DtF8dqresQ3ZzlprWVlkKIKoB3F66otBdmX5WpD52g== X-Migadu-Spam-Score: -3.72 X-Spam-Score: -3.72 X-Migadu-Queue-Id: 4DD79A802 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=EDf2KxeS; 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"; dmarc=none X-TUID: SOVHSLzFxORk Hi! Andreas Gerler writes: > Last week I heard about using ob-sql with credentials stored in the variable used by isql. > However I had to modify ob-sql to get it actually working. > Can somebody test the pach before I send in a commit? > > #+begin_src sql :engine mysql :dbconnection testdb > show tables; > #+end_src I actually use this feature daily. You have to quote the dbconnection. So this works currently: > #+begin_src sql :engine mysql :dbconnection 'testdb but I would agree that not needing the quote makes sense. And since `assoc-string` works with symbol and string (i.e. it's backwards compatible) I would install the patch if you send it. > I was considering writing another patch to map the sql-product to engine. > That way we could get rid of another parameter in the src block. > Opinions? I agree. Specifying :engine when it's already in the connection-alist is unnecessary. Thanks, Daniel