Added cursor support to execute AQL queries