;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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:sqlite nil) #@30 Sqlite specific header args. (defvar org-babel-header-args:sqlite '((db . :any) (header . :any) (echo . :any) (bail . :any) (csv . :any) (column . :any) (html . :any) (line . :any) (list . :any) (separator . :any) (nullvalue . :any)) (#$ . 472)) #@66 Expand BODY according to the values of PARAMS. (fn BODY PARAMS) (defalias 'org-babel-expand-body:sqlite #[514 "\300\301!\"\207" [org-babel-sqlite-expand-vars org-babel--get-vars] 6 (#$ . 724)]) (defvar org-babel-sqlite3-command "sqlite3") #@120 Execute a block of Sqlite code with Babel. This function is called by `org-babel-execute-src-block'. (fn BODY PARAMS) (defalias 'org-babel-execute:sqlite #[514 "\301\302\236A\206 \303!\304\236A\305\236A\306\236A\307\236A\310\232\311\312\313\314\315\316\317\320 !\321\"\322\323%\324\325\326\327\330\331\332\333\257\"\"\204@\334\335!\210\336\337!r\211q\210\314\340\341\317\320!\342\"\343$\216\344\345\346\347B\350\203c\351\202d\352B\353\n\203s\354\355\f\"\202t\303B\356\n\203\203\354\357\f\"\202\204\303B\360\361\362 \363#B\364\330 \235\204\266\327 \235\204\266\332 \235\204\266\333 \235\204\266\331 \235\204\266 \203\272\303\202\273\365B\366B\257\"\367  \"\"c\210\370\235?\205q\371\235\204\372\235\204\373\235\204\374\235\204\375\235\204\376\235\204\377\235\204\201@\235\204\201A\235\204\201B\235\203&\201C\235\204&\201D \202qed\232\2030\303\202q\201Eed\330\235\206Z\327\235\206Z\332\235\206Z\333\235\206Z\331\235\206Z?\205a\201F#\210\201G\201H\201I \"!\262*\262\207" [org-babel-sqlite3-command split-string :results "" :db :separator :nullvalue :colnames "yes" delq nil mapcar make-byte-code 257 "\211\300\236@\207" vconcat vector [] 3 "\n\n(fn ARG)" :header :echo :bail :column :csv :html :line :list error "ob-sqlite: can't evaluate without a database" generate-new-buffer " *temp*" 0 "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] 2 org-babel-eval org-fill-template "%cmd %header %separator %nullvalue %others %csv %db " "cmd" "header" "-header" "-noheader" "separator" format "-separator %s" "nullvalue" "-nullvalue %s" "others" mapconcat #[257 "\300\301\302!\303\304O\"\207" [format "-%s" symbol-name 1 nil] 6 "\n\n(fn ARG)"] " " "csv" "-csv" "db " org-babel-expand-body:sqlite "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" buffer-string org-table-convert-region (4) org-babel-sqlite-table-or-scalar org-babel-sqlite-offset-colnames org-table-to-lisp] 21 (#$ . 973)]) #@60 Expand the variables held in VARS in BODY. (fn BODY VARS) (defalias 'org-babel-sqlite-expand-vars #[514 "C\300\301\302\303\304\305!\306\"\307\310%\"\210\211\242\207" [mapc make-byte-code 257 "\300\301\302\303@\"A\211<\203C\304\305!\211\306\307\310!!\311\312\313\314\315!\316\"\317$\216r\211q\210\320\321\"c\210)r\211q\210\322\321\211\321\312%\210*\266\211\262\202P\211;\203L\211\202P\302\323\"\262\300\242#\240\207" vconcat vector [replace-regexp-in-string format "$%s" org-babel-temp-file "sqlite-data-" get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 orgtbl-to-csv nil write-region "%S"] 14 "\n\n(fn PAIR)"] 10 (#$ . 3022)]) #@68 If RESULT looks like a trivial table, then unwrap it. (fn RESULT) (defalias 'org-babel-sqlite-table-or-scalar #[257 "\211G\300\232\203\211@G\300\232\203\301@@\302\"\207\303\304\"\207" [1 org-babel-read t mapcar #[257 "\211\300=\203\300\207\301\302\"\207" [hline mapcar org-babel-sqlite--read-cell] 4 "\n\n(fn ROW)"]] 4 (#$ . 3774)]) #@90 If HEADERS-P is non-nil then offset the first row as column names. (fn TABLE HEADERS-P) (defalias 'org-babel-sqlite-offset-colnames #[514 "\211\203\f@\300ABB\207\207" [hline] 5 (#$ . 4123)]) #@163 Raise an error because support for SQLite sessions isn't implemented. Prepare SESSION according to the header arguments specified in PARAMS. (fn SESSION PARAMS) (defalias 'org-babel-prep-session:sqlite #[514 "\300\301!\207" [error "SQLite sessions not yet implemented"] 4 (#$ . 4326)]) #@59 Process CELL to remove unnecessary characters. (fn CELL) (defalias 'org-babel-sqlite--read-cell #[257 "\300\301\"\207" [org-babel-read t] 4 (#$ . 4619)]) (provide 'ob-sqlite)