Pass query parameters to query
Extract connection interface