refactor macro for SQL parsing. Add possibility of validator in the documentation.