Hmm, strange…
Using the example from @asbisen is the duckdata.db.wal
file getting created after the function is called but the moment the garbage collector starts it disappears (and the error opening the database is gone.)
I was hoping the Stmt() handle created by execute()
is the only thing that keeps the connection open but maybe there are more…
After a bit research I found some discussions that using finalizers for resource cleanup has some isseus (1, 2, 3 ) mostly because of garbage collection intervals.
And yeah, the current DuckDB julia package uses finalizers for cleanup.
Julia seems to lack a good way to have destructors that are based on the scope of variable (or at least that I’m aware of)