.js file, contains functions to return a query based on parameters