SQLite In-Memory Database

SQLite has an option for running completely in-memory, rather than using a local file on disk. This may be perfect for doing one-time data manipulation or other short-term tasks.

Just use :memory: instead of the database filename, and you’ll get the in-memory database. Or use an empty string, to use memory only, but a temporary file on disk if memory starts to run low.

View code on GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s