I actually found that in SQLite's source code! I love it too.