correct  generate prototype sql query
transition to the async version
refactor
add mysql module
refactor