WIP on #to_sql and it's unit test