better support for writing in-memory data to sqlite