Datastore from query prototype