Use a option array to automatically build queries.
Use context variable in query build.