kostafey / ejc-sql

Emacs SQL client uses Clojure JDBC.
278 stars 29 forks source link

tip for org mode users that export their notes #159

Closed mbarton98 closed 2 years ago

mbarton98 commented 2 years ago

I was trying to export to pdf with C-c C-e l o and would get an error to run ejc-connect first. Then I realized that export is a "new" buffer, so I added the :cache yes to the header and that allowed the export to use the cached results rather than invoking the query again.


***** demo sql
#+begin_src sql :results raw :exports both :cache yes
SELECT 
     whencreated,
     whenChanged,
     userAccountControl
FROM 
     GCSnap where samaccountname like 'guest'
#+end_src

#+RESULTS[e2e15d13332ce674b982da1bb01327abaf8644ab]:
| whencreated           | whenchanged           | useraccountcontrol |
|-----------------------+-----------------------+--------------------|
| 2014-06-09 18:51:05.0 | 2019-10-11 23:08:53.0 |                514 |
kostafey commented 2 years ago

Unfortunately, ejc-sql can't help here. It's an org-mode related issue.