In #683 I started a new section of internals documentation covering the Database class: https://datasette.readthedocs.io/en/latest/internals.html#database-class
I decided not to document .execute() and .execute_against_connection_in_thread() yet because I'm not 100% happy with their API design yet.