/// <summary>
        /// Executes a query. Calls the generic method Execute{{T}} to actually execute the query.
        /// </summary>
        /// <param name="expression">The query expression.</param>
        /// <returns>The result of the query.</returns>
        public object Execute(Expression expression)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            var translatedQuery = SequoiaQueryTranslator.Translate(this, expression);

            return(translatedQuery.Execute());
        }
        // public methods
        /// <summary>
        /// Builds the MongoDB query that will be sent to the server when the LINQ query is executed.
        /// </summary>
        /// <typeparam name="T">The type of the documents being queried.</typeparam>
        /// <param name="query">The LINQ query.</param>
        /// <returns>The MongoDB query.</returns>
        public ISequoiaQuery BuildMongoQuery <T>(SequoiaQueryable <T> query)
        {
            var translatedQuery = SequoiaQueryTranslator.Translate(this, ((IQueryable)query).Expression);

            return(((SelectQuery)translatedQuery).BuildQuery());
        }