design document for sql_wrapper