implemented first basic support for mapped query.