[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-12 Thread vinref
Hi I double-check changes to the db by running the SQLite3 client in a terminal. The memory db is only accessible by the same client/session so it won’t work. I also run multiple processes doing different things in the same image so each process needs its own connection/handle to SQLite3 so

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-12 Thread Julián Maestri
As far as I know you need to tell it to open a file called :memory: and in Pharo-SQLite3 you should be able to use: SQLite3Connection memory I've never done this before in Pharo, but it's worth trying, it should be faster and easier to set up. https://www.sqlite.org/inmemorydb.html

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-12 Thread Esteban Maringolo
After I set up the tests I knew that was possible, but never knew how to actually do it. Regards! Esteban A. Maringolo On Thu, Aug 12, 2021 at 8:55 PM Julián Maestri wrote: > > Not exactly what you are asking for, but did you consider using sqlite in > memory? > > On Sat, 7 Aug 2021 at 23:23,

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-12 Thread Julián Maestri
Not exactly what you are asking for, but did you consider using sqlite in memory? On Sat, 7 Aug 2021 at 23:23, Esteban Maringolo wrote: > I've been doing exactly that. It is, creating a new DB file for each > test, and I was having the same problem as you. > > I suggested a change to the driver

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-07 Thread Esteban Maringolo
I've been doing exactly that. It is, creating a new DB file for each test, and I was having the same problem as you. I suggested a change to the driver to cover that situation: https://github.com/pharo-rdbms/Pharo-SQLite3/pull/22/files Try applying that change and see if that works. I still

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-07 Thread vinref
Hi Actually I will just do a bunch of DROP TABLE IF EXISTS instead of dropping the db altogether. Thanks, Vince

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-07 Thread vinref
Hi Looking at SQLite3Connection>>#close: "Let FFIExternalResourceManager take care." "dbHandle ifNotNil: \[ library close: dbHandle \]." dbHandle := nil. isOpen := false. The commented out lines means that SQLite3Library>>#apiClose is not called when calling