emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Ag Ibragimov <agzam.ibragimov@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: ob-sql src blocks with a totally custom engine
Date: Wed, 17 Jun 2020 07:20:08 +0800	[thread overview]
Message-ID: <87pn9ypphz.fsf@gmail.com> (raw)
In-Reply-To: <m2o8pig34r.fsf@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Ag Ibragimov <agzam.ibragimov@gmail.com> writes:

> Is it possible to have source code SQL blocks that are processed with a custom command line tool?
> e.g. how can I make something like this to work:
>
> #+begin_src sql :cmdline "osqueryi --json"
>  select * from processes limit 5;
> #+end_src

I think it's possible. Should not be hard to implement. You can check out ob-sql.el source code.

>
> For those who don't know what osquery is, here's a quote from https://osquery.io: "Osquery uses basic SQL commands to leverage a relational data-model to describe a device."

This is interesting project.

>
> I vaguely remember there was a way to basically "pipe" entire code block to be executed in a given cmd line tool, but I am struggling to find how to do that. There's a way, right? But even then, I think it requires the code block to be of sh-mode of shell-mode, but I want it to be SQL because osquery uses SQL.


- -- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7pU6gUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOTXQf/Z3CT2/mTjtCeaSGaZSzziO3TQVzO
k8eIu/6cX9byVIg96DOpiyWy6+u89C9YTT78w2vqPy353P6+XOskkBBGPLyHlPqa
PyePGNvOAGiFevT7CB0b2X6HuzhkL3bTJt7PQhkc/PakrN2Da7/MewC2UBNML5lQ
t27KEv3JKjQcY79LtcEr0vT0TxXAY1gluO2Flm/b7jXF4DnNBOTfItqGdmTDOxRE
t45jbbM/1SrpwsFvSTLQNI3WBklXDZNF3soiSoc+tw0g0Cn/MQqLKDN1ZE1zbGBf
T8exQ+TuXjQn3yMC8zAhwIluaoCTxyN3gJIIVtT6ZCKrEblcvQxL3aonjA==
=yK3s
-----END PGP SIGNATURE-----


      reply	other threads:[~2020-06-16 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 20:35 ob-sql src blocks with a totally custom engine Ag Ibragimov
2020-06-16 23:20 ` stardiviner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn9ypphz.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=agzam.ibragimov@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).