Re-hand-coding SQLite3 stuff, sigh