Our building work is done. Next we can provide our query service. The core API is below:
Map result = (Map)G.execute(query);
query here is the G.apex query JSON string. And the result is the data after processing the query.
query
result