My personal patches-in-progress branch of Org. See https://git.tecosaur.net/mirrors/org-mode/compare/main..tec/org-mode:dev.
Find a file
Viktor Rosenfeld bd3b1aee2f add support for MonetDB to SQL code blocks
* lisp/ob-sql.el(org-babel-execute:sql): Add support for MonetDB to
  SQL code blocks.

  Hi,

  the attached patch adds support for evaluating SQL blocks on MonetDB.
  The MonetDB client normally requires the password to be inputted on the
  console. To get around this, you have to use a dotfile ~/.monetdb with
  authentification data. Note that this file is ignored if you specify a
  user on the cmdline. See
  http://www.monetdb.org/Documentation/mclient-man-page for details.

  A usage example follows.

  Setup MonetDB test database and authentification data

  #+BEGIN_SRC sh :results output verbatim
  MONETDB_DIR=$HOME/unix/var/monetdb/demodb
  monetdbd create $MONETDB_DIR
  monetdbd start $MONETDB_DIR
  monetdb create demodb
  monetdb release demodb
  cat > ~/.monetdb <<EOF
  user=monetdb
  password=monetdb
  EOF
  #+END_SRC

  #+RESULTS:
  : created database in maintenance mode: demodb
  : taken database out of maintenance mode: demodb

  Data is returned without column names (the default return format
  cannot be parsed by Babel).

  #+BEGIN_SRC sql :engine monetdb :cmdline demodb
  CREATE TABLE foo ( bar INTEGER );
  SELECT 'Table count', count(*) FROM foo;
  #+END_SRC

  #+RESULTS:
  | Table count | 0 |

  The parameter "-i" is required on the command line in order to use
  special client commands. Also note that a newline is required at the
  end if the last line contains a special client command.

  #+BEGIN_SRC sql :engine monetdb :cmdline demodb -i :results output
  verbatim
  \d
  \?

  #+END_SRC

  #+RESULTS:
  #+begin_example
  TABLE  sys.foo
  \?      - show this message
  \<file  - read input from file
  \>file  - save response in file, or stdout if no file is given
  \|cmd   - pipe result to process, or stop when no command is given
  \h      - show the readline history
  \D table- dumps the table, or the complete database if none given.
  \d[Stvsfn]+ [obj] - list database objects, or describe if obj given
  \A      - enable auto commit
  \a      - disable auto commit
  \e      - echo the query in sql formatting mode
  \f      - format using a built-in renderer {csv,tab,raw,sql,xml}
  \w#     - set maximal page width (-1=unlimited, 0=terminal width,
  >0=limit to num)
  \r#     - set maximum rows per page (-1=raw)
  \L file - save client/server interaction
  \X      - trace mclient code
  \q      - terminate session
  #+end_example

  Have fun!
2012-02-25 09:44:18 -07:00
BUGFIXING Replace org-mode-p with usual (eq major-mode 'org-mode) check 2011-10-22 11:29:24 +02:00
contrib org-e-latex: Allow nested footnotes 2012-02-25 14:56:37 +01:00
doc Pull up ODT files from "maint" to "master" levels 2012-02-20 10:25:31 +05:30
etc/styles Pull up ODT files from "maint" to "master" levels 2012-02-20 10:25:31 +05:30
EXPERIMENTAL org-e-latex: Allow nested footnotes 2012-02-25 14:56:37 +01:00
lisp add support for MonetDB to SQL code blocks 2012-02-25 09:44:18 -07:00
testing org-e-latex: Allow nested footnotes 2012-02-25 14:56:37 +01:00
UTILITIES UTILITIES: Use a separate css for the HTML manuals. 2011-12-13 00:21:16 +01:00
.dir-locals.el Make .dir-locals.el a true copy of .dir-settings.el 2011-01-15 12:44:34 +01:00
.dir-settings.el Add .dir-settings.el file to unify coding styles. 2008-11-20 15:45:22 +01:00
.gitignore gitignore patch 2010-08-17 09:54:21 +02:00
.gitmodules Changes to suit latest ert structure. ERT is now a part of EMACS and the source of the ERT git submodule is deprecated, as are some files within. Changes testing/README and .gitmodules to suit. 2011-03-01 09:59:01 -07:00
Makefile Makefile: Support DESTDIR in Makefile 2012-02-24 16:20:25 +05:30
README README: remove the description of ORGWEBPAGES/ 2011-01-09 15:08:11 +01:00
README_DIST Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
README_GIT Update README_GIT 2011-07-08 15:22:21 +00:00
README_maintainer README_maintainer: update the link to "Git from bottom up". 2011-07-28 16:15:28 +02:00
request-assign-future.txt Release 5.13e 2008-01-31 11:37:24 +01:00

This is the Emacs Org project, an emacs subsystem for organizing your life

The homepage of Org is at http://orgmode.org

This distribution contains:

README
    This file.

README_DIST
    The README file for the distribution (zip and tar files)

README_GIT
    Information about the git repository and how to contribute
    to Org-mode development. 

lisp/
    Directory with all the Emacs Lisp files that make up Org.

doc/
    The documentation files.  org.texi is the source of the
    documentation, org.html and org.pdf are formatted versions of it.

contrib/
    A directory with third-party additions for Org.  Some really cool
    stuff is in there.

ChangeLog
    The standard ChangeLog file.

Makefile
    The makefile to compile and install Org, and also for maintenance
    tasks.

request-assign-future.txt
    The form that contributors have to sign and get processed with the
    FSF before contributed changes can be integrated into the Org
    core.  All files in this distribution except the CONTRIB directory
    have copyright assigned to the FSF.

EXPERIMENTAL
    Experimental code, not necessarily FSF copyright.