From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add support for sqsh sql src blocks Date: Mon, 28 Nov 2016 23:12:19 +0100 Message-ID: <87a8cjfe4c.fsf@nicolasgoaziou.fr> References: <87vavdkmes.fsf@ArchNemesis.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBU9v-0001Vc-0B for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 17:12:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBU9q-0001uK-Uh for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 17:12:22 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46164) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBU9q-0001tw-Ol for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 17:12:18 -0500 In-Reply-To: <87vavdkmes.fsf@ArchNemesis.i-did-not-set--mail-host-address--so-tickle-me> (madhat2r@dukefoo.com's message of "Thu, 24 Nov 2016 08:00:43 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: MaDhAt2r Cc: emacs-orgmode@gnu.org Hello, MaDhAt2r writes: > ob-sql-el: Add support for `sqsh' as an SQL engine Thank you for the patch. Some comments follow. > - (`mssql "SET NOCOUNT ON > + ((or `mssql `sqsh ) "SET NOCOUNT ON There is a spurious white space above. > - (org-babel-expand-body:sql body params))) > + (org-babel-expand-body:sql body params) > + ;; sqsh requires `go' inserted at EOF > + (if (equal (intern engine) `sqsh) > + "\ngo" > + "") > + )) ;; sqsh requires "go" inserted at EOF. also, do not leave dangling parenthesis at the end of the expression above. > + (cond > + ((equal (intern engine) 'sqsh) > + (org-table-import out-file '(4)) > + ) > + (t > + (org-table-import out-file '(16)) > + ) > + ) See above about parenthesis. Eventually, could you write a proper commit message, e.g. * lisp/ob-sql.el (org-babel-sql-dbstring-sqsh): New function (....): Added .... Regards, -- Nicolas Goaziou