From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uIOjIEEw6mZQvAAAe85BDQ:P1 (envelope-from ) for ; Wed, 18 Sep 2024 01:43:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uIOjIEEw6mZQvAAAe85BDQ (envelope-from ) for ; Wed, 18 Sep 2024 03:43:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=7d.nz header.s=20240212 header.b=n8toFFYm; 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=pass (policy=reject) header.from=7d.nz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726623809; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dRlWzM6I/EBtTLWNrNSeTInVIcH0cjIJ3xfnSYkyr4Q=; b=KtG8RABAlIJxc0X0HZ2nvMNWhfJpnD5/ljETu8uZ4mkoiZpH/VrPApz0x4iH5nE18UjCX5 ar1FzIRUQOBrYYC9Gqi/lLg7a3PrdiSPbZNgBsuPn+aGRT8tpIdOECBU1vTl4Yi2+1Yy3f EtftXK83iusSofx9qe6NMtNOq+GnJ/56onGLVVLOz72QxuNIJlsCov+OI2q4oMnl0yafVd fhPtxHezxraT4U7PBav99h4WGaBPCj0zARGs8+QQ32fZXIvbrHGC9XWmSD/7n2OE5FQDMN VSv0faowpTzbTqFky3bguLQTVgjJdiHGmQjqJhKx4ZL76D0IQ5RWEKaSurnUDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=7d.nz header.s=20240212 header.b=n8toFFYm; 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=pass (policy=reject) header.from=7d.nz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726623809; a=rsa-sha256; cv=none; b=GymlIHNcy4rqgcDofVaICwis6iAFcGhxRGDk3+OjkvvOvaBpgDxxgX5X7zOGKLLC5Mb16X gAH4xoEJmyTUomdRhn9kjL6LgsOZybIHbT2962uHaWLcuyYtV6Y44VPXk3psGRNW7hGRdv qGEtTEbyjxVbNw0Y9CVUH9Lmvn3npG8dQAVZ//KH8ojlbFTqY6Bicncb5TlcLCf77Gl0hh BXj21a9QcjQ0Ry0LoyLpWdu4dLMVx8n3lcB5kGaX6arcO4dHdVU3MHfED5/hIwY7Y7sn6x edaTKEt6G8m/VJUhQ1UIEWPCOKZazhs0M1gIY2iM9gtRAjDko3lHgDu4RoqO5g== 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 0A95F72E0 for ; Wed, 18 Sep 2024 03:43:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqjho-0006Lw-3p; Tue, 17 Sep 2024 21:42:08 -0400 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 1sqjhm-0006LQ-8Q for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 21:42:06 -0400 Received: from smtp-bc0d.mail.infomaniak.ch ([2001:1600:7:10::bc0d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqjhj-0007jI-Tv for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 21:42:05 -0400 Received: from smtp-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4X7hGH2c6wzdFy; Wed, 18 Sep 2024 03:41:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=7d.nz; s=20240212; t=1726623719; bh=dRlWzM6I/EBtTLWNrNSeTInVIcH0cjIJ3xfnSYkyr4Q=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=n8toFFYmTXQR/DN77TF3w/zS1e+MwhPIUL7rLFx8VhL7ZPzEZGolxaSJuMtKHtOhg gPuA/K9ZeIHb5W0P2y9I+JRMGmOwStUlWD0DwOG93ttAE4HZL9NmlFI/pXEPuu6VF3 utDU+XHlPTc102brbe0qp9kN3FjauV7jDLl5Uvjm/hhAydMJXX9nrMBOPBX19aeGUW K1Ak6A8YbZGVhalkEQDk3X3hpgg0k/D6ckGyN7SMWS6IGIA5SY7KSguEYQtRe0eBOo +bAaxkFyrsEpjIQq6o/dN7Y4aMinlXhM3lG8l6APhg3aUIQ8HqlEda0At5B6Rain+p PzasaBsN3tu6w== Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4X7hGG69gWzRsv; Wed, 18 Sep 2024 03:41:58 +0200 (CEST) Message-ID: <3a694658-9184-4c45-ac17-6e6083a21517@7d.nz> Date: Wed, 18 Sep 2024 03:41:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Phil Estival Subject: Re: package submission : ob-sql-session To: Adam Porter Cc: emacs-devel@gnu.org, Org Mode List References: <1a69c5fb-4069-45c8-b37b-4d54ef88b92d@alphapapa.net> Content-Language: fr, en-ZA In-Reply-To: <1a69c5fb-4069-45c8-b37b-4d54ef88b92d@alphapapa.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha Received-SPF: pass client-ip=2001:1600:7:10::bc0d; envelope-from=pe@7d.nz; helo=smtp-bc0d.mail.infomaniak.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable 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 X-Migadu-Spam-Score: -5.61 X-Spam-Score: -5.61 X-Migadu-Queue-Id: 0A95F72E0 X-Migadu-Scanner: mx10.migadu.com X-TUID: A+QREGx8LOQu Hi Adam, * [2024-09-18 00:25] Adam Porter: > > Hi Phil, > > On 9/17/24 05:00, Phil Estival wrote: > >>> Also, for org-sql-session (which sounds very useful), it would be good >>> to compare and contrast it with the package it's meant to supersede. >> >> The following comparison was added to the readme file. >> >> ob-sql-mode : >> - is very simple : forward the sql source through `sql-redirect' >> - has a test suite >> - but gives clunky output >> - no :results table >> - sql client shell commands messes up output >> - prompt again for connection parameters when restarting a session >> >> ob-sql-session : >> - handle large results >> - has :results tables >> - accept header variables (:var) >> - accept sql client shell commands >> - keep login parameters >> - prompt only for blank connection parameters >> - can use `with-environment-variables' >> - provide some more tests >> >>> since it's meant to integrate with org-babel, it might be good to >>> discuss its inclusion on the Org mailing list also. > To be clear, this makes 3 implementations of SQL support for Org Babel > that I know of: > > 1. The built-in Org Babel SQL support, aka ob-sql, documented at > > > 2. ob-sql-mode, hosted at , > which advertises itself as "an alternative backend for Org-Babel SQL SRC > blocks that uses sql-mode to evaluate the query instead of Org-Babel's > built-in SQL backends." > > 3. Your new ob-sql-session library. > > You've mentioned how your library compares to ob-sql-mode, but how does > it compare to the built-in ob-sql library? > Here is a comparison with ob-sql-mode ob-sql-session exists is for session support, which is in the TODOs of ob-sql. - ob-sql command execution relies on org-babel-eval (→ process-file → call-process). - ob-sql-session runs an inferior process (in which sqli-interactive-mode can be activated when needed). The process output is filtered (e.g. results and prompts). When a session is demanded, this shell stays open for further commands and can keep a state (typically, when given special SQL commands). |-----------+----------------------------+----------------------------| | | ob-sql | ob-sql-session | |-----------+----------------------------+----------------------------| | Feat. | - cmdline | - support for sessions | | | - colnames as header arg | - optionnal colnames | |-----------+----------------------------+----------------------------| | TODO | | | |-----------+----------------------------+----------------------------| | | - support for sessions | - colnames as header arg | | | - support for more engines | - support for more engines | |-----------+----------------------------+----------------------------| | engines | | | | supported | | | |-----------+----------------------------+----------------------------| | | - mysql | - Postgresql | | | - dbi | - sqlite | | | - mssql | | | | - sqsh | | | | - postgresql | | | | - oracle | | | | - vertica | | | | - saphana | | |-----------+----------------------------+----------------------------| ob-sql-session adapts sql-connect of sql.el by declaring ob-sql-connect, in order to prompt only for missing connection parameters. - ob-sql defines org-babel-sql-dbstring-[engine] to be provided on a shell command line. - likewise, ob-sql-session has to define - a connection string, - the prompt, - and the terminal command prefix for a every supported SQL client shell (or "engines") - ob-sql-session requires sql.el. With the above defined, it should be compatible with most database of the sql.el's zoo. maybe. Phil