emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* RFC: ob-sql-mode.el: Use sql-mode with Org Babel
@ 2016-12-16 11:09 Nik Clayton
  0 siblings, 0 replies; 2+ messages in thread
From: Nik Clayton @ 2016-12-16 11:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

Hoi,

I'd like to solicit feedback on ob-sql-mode.el,
https://github.com/nikclayton/org-mode/commit/106b22e9ef4835e15efc47d63aaeee675a1ebb69
.

This introduces a new Org Babel language, "sql-mode". Unlike the current
"sql" language, this one uses sql-mode to manage the interaction with the
SQL interpreters, so it supports all the backends that sql-mode supports.

It also supports sessions, so you can have different src blocks connected
to different databases or configurations in that database.

If you have, for example, "sqlite" installed on your system, you can put
the following (rather trivial) query in an Org file and evaluate it in the
usual way

#+BEGIN_SRC sql-mode :product sqlite
SELECT 1, 2, 3;
#+END_SRC

The evaluation result will look like

#+RESULTS:
: 1|2|3


Org property headers and drawers are also supported, so you could omit the
:product argument if you had

#+PROPERTY: header-args:sql-mode :product sqlite

or a property drawer that looked like

:PROPERTIES:
:header-args: :product sqlite
:END:

in scope.

​I'm about to go on vacation for a few weeks, so won't have the chance to
respond to feedback until early January, but I wanted to get this out
there. I'm releasing this in my capacity as a Google employee, and Google
has a copyright assignment on file with the FSF.​

Best, ​N
-- 
Google Switzerland GmbH, Identifikationsnummer: CH-020.4.028.116-1

[-- Attachment #2: Type: text/html, Size: 4245 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RFC: ob-sql-mode.el: Use sql-mode with Org Babel
       [not found] ` <CAFZUrCyco6ROHdoTRn=SAdzujNWq9WSt3c4X5EB_cBBZ27iosw@mail.gmail.com>
@ 2016-12-17  9:33   ` Nik Clayton
  0 siblings, 0 replies; 2+ messages in thread
From: Nik Clayton @ 2016-12-17  9:33 UTC (permalink / raw)
  To: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

Hoi,

I'd like to solicit feedback on ob-sql-mode.el, https://github
.com/nikclayton/org-mode/commit/106b22e9ef4835e15efc47d63aaeee675a1ebb69.

This introduces a new Org Babel language, "sql-mode". Unlike the current
"sql" language, this one uses sql-mode to manage the interaction with the
SQL interpreters, so it supports all the backends that sql-mode supports.

It also supports sessions, so you can have different src blocks connected
to different databases or configurations in that database.

If you have, for example, "sqlite" installed on your system, you can put
the following (rather trivial) query in an Org file and evaluate it in the
usual way

#+BEGIN_SRC sql-mode :product sqlite
SELECT 1, 2, 3;
#+END_SRC

The evaluation result will look like

#+RESULTS:
: 1|2|3


Org property headers and drawers are also supported, so you could omit the
:product argument if you had

#+PROPERTY: header-args:sql-mode :product sqlite

or a property drawer that looked like

:PROPERTIES:
:header-args: :product sqlite
:END:

in scope.

​I'm about to go on vacation for a few weeks, so won't have the chance to
respond to feedback in detail until early January, but I wanted to get this
out there. I'm releasing this in my capacity as a Google employee, and
Google has a copyright assignment on file with the FSF.​

Best, ​N
-- 
Google Switzerland GmbH, Identifikationsnummer: CH-020.4.028.116-1

[-- Attachment #2: Type: text/html, Size: 4173 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-17  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-16 11:09 RFC: ob-sql-mode.el: Use sql-mode with Org Babel Nik Clayton
     [not found] <CAFZUrCzndSLvTAPUXcOALOnpSjaAVK9pe9C8ShNyvZCWKdZ+Dg@mail.gmail.com>
     [not found] ` <CAFZUrCyco6ROHdoTRn=SAdzujNWq9WSt3c4X5EB_cBBZ27iosw@mail.gmail.com>
2016-12-17  9:33   ` Nik Clayton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).