emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default


From: Ihor Radchenko
Subject: Re: [PATCH] ob-sqlite: Use a transient in-memory database by default
Date: Thu, 04 May 2023 10:27:08 +0000

Max Nikulin <manikulin@gmail.com> writes:

>> I am unsure what is better, to add a fallback here or to add :db 
>> ":memory" to the org-babel-default-header-args:sqlite variable.
>
> Perhaps it is better to keep current behavior with error by default and 
> just to recommend more prominently using file local header arguments
>
> #+PROPERTY: header-args:sqlite :db ":memory"
>
> Changing defaults is a compromise. Perhaps you mostly use src blocks as 
> playground and in-memory database is really convenient for you. However 
> missed :db file in a block creating tables may cause a *delayed* error 
> that will happen on attempt to insert some data to these tables later. 
> It is harder to figure out that :db parameter was forgotten several 
> screens above. The cost of debugging might be higher than adding a 
> property line to files where a user is experimenting with sqlite features.

We can simply display a warning when :db is not specified. Something
like

"ob-sql: :db header argument not specified.  Using in-memory database"

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]