support for native queries, rest api

support for native queries by persistence, most of rest api