When I create a SQLite memory database - how do I delete it when I finish? Is it automatically freed when the script ends and closes the connection?
$pdo = new PDO('sqlite::memory:');
Yes, what is happening.
The most common way to make a SQLite database exist exclusively in memory is to open the database using a special file name: "memory:" ...... When this is done, the disk file will not be opened. Instead, a new database created exclusively in memory. The database ceases to exist as soon as the connection to the database is closed. Each: memory: the database is different from any other. So, opening two connections to the database filename ": memory:" will create two independent databases in memory. - SQLite
Source: https://habr.com/ru/post/909015/More articles:ODBC ConnectionString - c #Moving breakpoints in Visual Studio - c ++How many bytes does a string occupy? A char? - c ++The most efficient way to detect and remove elements in an array based on the first and last value of elements is comparisonlibgdx and the android app. Image as background - javaHow can I get color rendition in an autotest using Test / Unit, MiniTest? - ruby-on-railsA sticky footer, or rather: content doesn't stretch to the footer - cssHow to insert database rows for specific cases using PHPUnit - phpStretch background image in IE8 - cssHow to calculate elapsed time in seconds in VBA? - vbaAll Articles