MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/org/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/org/ob-sql.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:45 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/ob-sql.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'ob)
(defvar org-babel-default-header-args:sql nil)
(defvar org-babel-header-args:sql '((engine . :any) (out-file . :any)))
#@48 Expand BODY according to the values of PARAMS.
(defalias 'org-babel-expand-body:sql #[(body params) "\302\303\304\305	\306\"\"\"\207" [body params org-babel-sql-expand-vars mapcar cdr org-babel-get-header :var] 7 (#$ . 686)])
#@99 Execute a block of Sql code with Babel.
This function is called by `org-babel-execute-src-block'.
(defalias 'org-babel-execute:sql #[(body params) "\306\307\"A\306\310\"A\306\311\"A\312\313!\306\314\"A\206!\312\315!\316@\317!A\320A\321\"\203D\322\323\n\2069\316\324\f!\325\324
!%\202\254\320A\326\"\203]\322\327\n\206S\316\324\f!\324
!$\202\254\320A\330\"\203v\322\331\n\206l\316\324\f!\324
!$\202\254\320A\332\"\203\217\322\333\n\206\205\316\324\f!\324
!$\202\254\320A\334\"\203\250\322\335\324\f!\324
!\n\206\244\316$\202\254\336\337\")B\f\340\341\342!!CD\343\216rCq\210\317!E\320E\344\"\203\321\345\202\322\316)\346F\"\261\210)rCq\210\347\350\211D\350\351%\210,\352B!\210\353B!\210\354	\235\204\355	\235\204\356	\235\204\357	\235\204ed\232\203)\360\361!GrGq\210\362\216\363
!\210\364 +\202\264\360\361!HrHq\210\365\216\360\361!IrIq\210\366\216\367
!\210eb\210\370\371\350\372#\203U\373\374!@db\210\375u\210\376\377!\203p\201J\374!\210db\210\375u\210\202[\201K
!\210+\201L
\201M\"\210\201N\201O\201P\201Q \"\201R\306\201S\"A\306\201T\"A\"\201R\306\201U\"A\306\201V\"A\"#+.\207" [params result-params cmdline engine in-file out-file assoc :result-params :cmdline :engine org-babel-temp-file "sql-in-" :out-file "sql-out-" "" intern memql 'dbi format "dbish --batch '%s' < %s | sed '%s' > %s" org-babel-process-file-name "/^+/d;s/^|//;$d" 'monetdb "mclient -f tab %s < %s > %s" 'msosql "osql %s -s \"	\" -i %s -o %s" 'mysql "mysql %s < %s > %s" 'postgresql "psql -A -P footer=off -F \"	\"  -f %s -o %s %s" error "No support for the %s SQL engine" get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n\302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) 'dbi "/format partbox\n" org-babel-expand-body:sql write-region nil 0 message shell-command "scalar" "verbatim" "html" "code" generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) insert-file-contents-literally buffer-string ((byte-code "\301!\203\n\302!\210\301\207" [#3=#:temp-buffer buffer-name kill-buffer] 2)) ((byte-code "\301!\203\n\302!\210\301\207" [#4=#:temp-buffer buffer-name kill-buffer] 2)) insert-file-contents re-search-forward "^\\(-+\\)[^-]" t match-string-no-properties 1 -1 looking-at "\n" header-delim #5=#:--cl-var-- command #1# #6=#:temp-file #7=#:--cl-var-- body #2# #3# #4# delete-char write-file org-table-import (16) org-babel-reassemble-table mapcar #[(x) "@	\230\203	\302\207\207" [x header-delim hline] 2] org-table-to-lisp org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 8 (#$ . 919)])
#@44 Expand the variables held in VARS in BODY.
(defalias 'org-babel-sql-expand-vars #[(body vars) "\302\303\"\210	\207" [vars body mapc #[(pair) "\306\307\310@\"A\211<\2039\311\312!\211\313\314\315!!\316\216rq\210\317	\320\"c\210)rq\210\321\322\211\f\322\323%\210,\n)\202F	;\203B	\202F\307\324	\")
#\211\207" [pair val data-file #1=#:temp-buffer #2=#:temp-file body replace-regexp-in-string format "$%s" org-babel-temp-file "sql-data-" get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) orgtbl-to-csv (:fmt (lambda (el) (if (stringp el) el (format "%S" el)))) write-region nil 0 "%S"] 9]] 3 (#$ . 3630)])
#@57 Raise an error because Sql sessions aren't implemented.
(defalias 'org-babel-prep-session:sql #[(session params) "\300\301!\207" [error "SQL sessions not yet implemented"] 2 (#$ . 4338)])
(provide 'ob-sql)

MMCT - 2023