added simple interactive funciton for org sql update

This commit is contained in:
ndwarshuis 2019-01-02 22:32:14 -05:00
parent d5ccbd9fff
commit 997ed544e2
1 changed files with 11 additions and 1 deletions

View File

@ -3813,7 +3813,17 @@ This assumes an active connection is open."
**** interative functions **** interative functions
Interactive update commands go here. Interactive update commands go here.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun org-sql-user-update ()
"Update the Org SQL database."
(interactive)
;; TODO need to see if schema is correct?
;; for now this assumes the db exists and has a valid schema
(unless (get-buffer-process org-sql-buffer)
(message "Opening SQLi Buffer")
(org-sql-cmd-open-connection))
(message "Updating Org SQL database")
(org-sql-update-db)
(message "Org SQL update complete"))
#+END_SRC #+END_SRC
* tools * tools
** printing ** printing