From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John Dell'Aquila" Subject: patch: Oracle engine for SQL blocks Date: Wed, 11 Jun 2014 00:10:32 -0500 Message-ID: <1402463432.31873.127469781.7224901D@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="_----------=_1402463432318731"; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuao3-0002fn-Lj for emacs-orgmode@gnu.org; Wed, 11 Jun 2014 01:10:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wuanz-0004Wq-1o for emacs-orgmode@gnu.org; Wed, 11 Jun 2014 01:10:39 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuany-0004Wa-Lh for emacs-orgmode@gnu.org; Wed, 11 Jun 2014 01:10:34 -0400 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id AD77621532 for ; Wed, 11 Jun 2014 01:10:32 -0400 (EDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --_----------=_1402463432318731 Content-Transfer-Encoding: 7bit Content-Type: text/plain Hi, This patch makes Oracle a supported database for SQL source code blocks: - separate or unified logins, take your pick of: :dbuser user :dbpassword password :dbhost connect_id :dbuser user/password@connect_id :cmdline user/password@connect_id - support for :colnames on/off - helpful error messages in minibuffer if execution fails - good looking result block (most of the time) I've tested this extensively on Windows 7. It only needs the sqlplus executable and < > file redirection, so it should work everywhere. I am willing to execute an FSF copyright assignment. Regards, John --_----------=_1402463432318731 Content-Disposition: attachment; filename="0001-ob-sql.el-Implement-Oracle-engine.patch" Content-Id: <1402463320.31246.4ed3312b8f88a9c0b89a2c9c606cca5213dcd7e2.46FF570F@content.messagingengine.com> Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name="0001-ob-sql.el-Implement-Oracle-engine.patch" RnJvbSAwOGUwMTEyNGE3ZjY1ZmJkZWVjOGQxNGYwZTdiNTU1YmIxNTY1YWQ5 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKb2huIERlbGwnQXF1 aWxhIDxkZWxsYXFAbWwxLm5ldD4KRGF0ZTogVHVlLCAxMCBKdW4gMjAxNCAy MDozMzozMSAtMDUwMApTdWJqZWN0OiBbUEFUQ0hdIG9iLXNxbC5lbDogSW1w bGVtZW50IE9yYWNsZSBlbmdpbmUKCiogbGlzcC9vYi1zcWwuZWwgKG9yZy1i YWJlbC1leGVjdXRlOnNxbCk6IEFkZCBPcmFjbGUgc3VwcG9ydCB3aXRoCnBy b3BlciBlcnJvciBoYW5kbGluZy4KLS0tCiBsaXNwL29iLXNxbC5lbCB8IDQx ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrCiAx IGZpbGUgY2hhbmdlZCwgNDEgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBh L2xpc3Avb2Itc3FsLmVsIGIvbGlzcC9vYi1zcWwuZWwKaW5kZXggN2I4NWRm OC4uNDJhMDNhMSAxMDA2NDQKLS0tIGEvbGlzcC9vYi1zcWwuZWwKKysrIGIv bGlzcC9vYi1zcWwuZWwKQEAgLTEyOCwxMSArMTI4LDMxIEBAIFRoaXMgZnVu Y3Rpb24gaXMgY2FsbGVkIGJ5IGBvcmctYmFiZWwtZXhlY3V0ZS1zcmMtYmxv Y2snLiIKIAkJCQkgIChvcmctYmFiZWwtcHJvY2Vzcy1maWxlLW5hbWUgaW4t ZmlsZSk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IVxuIiBuaWwgdCkKKwkJ IChkZWxldGUtcmVnaW9uIChwb2ludC1taW4pIChwb2ludCkpKQorCSAgICAg OzsgQW55dGhpbmcgbGVmdD8KKwkgICAgIChpZiAoZXEgKGJ1ZmZlci1zaXpl KSAwKQorCQkgKGlmIChzdHJpbmctbWF0Y2ggIjsiIGJvZHkpCisJCSAgICAg KGVycm9yICJObyByb3dzIHNlbGVjdGVkIikgCisJCSAgIChlcnJvciAiTm8g cm93cyBzZWxlY3RlZCAobmVlZCBmaW5hbCA7IHBlcmhhcHM/KSIpKSkKKwkg ICAgIDs7IFNjYW4gZm9yICpsYXN0KiBPcmFjbGUgb3IgU1FMKlBsdXMgZXJy b3IsIGluY2x1ZGUgdXAKKwkgICAgIDs7IHRvIDUgcHJlY2VkaW5nIGxpbmVz IGluIGVycm9yIG1lc3NhZ2UKKwkgICAgIChnb3RvLWNoYXIgKHBvaW50LW1h eCkpCisJICAgICAoaWYgKHJlLXNlYXJjaC1iYWNrd2FyZCAiXlxcKE9SQVxc fFNQMlxcKS1bMC05XSs6ICIgbmlsIHQpCisJCSAobGV0ICgocCAobGluZS1l bmQtcG9zaXRpb24pKSkKKwkJICAgKGZvcndhcmQtbGluZSAtNSkKKwkJICAg KGVycm9yIChidWZmZXItc3Vic3RyaW5nLW5vLXByb3BlcnRpZXMgKHBvaW50 KSBwKSkpKQorCSAgICAgKHdyaXRlLWZpbGUgb3V0LWZpbGUpKSkKIAkgICh0 CiAJICAgOzsgTmVlZCB0byBmaWd1cmUgb3V0IHRoZSBkZWxpbWl0ZXIgZm9y IHRoZSBoZWFkZXIgcm93CiAJICAgKHdpdGgtdGVtcC1idWZmZXIKLS0gCjEu OS4yLm1zeXNnaXQuMAoK --_----------=_1402463432318731--