When you have written the queries and the query handler support scripts, you put the scripts in the following location:
$factory/Application/DSScriptsThen you put the queries in the following location:
$factory/Application/QueriesExcept where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License