Azavea.Open.DAO.SQL.SqlDaLayer.CreateQuery C# (CSharp) Method

CreateQuery() public method

Builds the query based on a serializable criteria.
public CreateQuery ( ClassMapping mapping, DaoCriteria crit ) : IDaQuery
mapping ClassMapping The mapping of the table for which to build the query string.
crit Azavea.Open.DAO.Criteria.DaoCriteria The criteria to use for "where" comparisons.
return IDaQuery
        public override IDaQuery CreateQuery(ClassMapping mapping, DaoCriteria crit)
        {
            SqlDaQuery retVal = _sqlQueryCache.Get();

            retVal.Sql.Append("SELECT * FROM ");
            retVal.Sql.Append(mapping.Table);
            ExpressionsToQuery(retVal, crit, mapping);
            OrdersToQuery(retVal, crit, mapping);

            // Don't return the objects, we'll do that in DisposeOfQuery.
            return retVal;
        }

Same methods

SqlDaLayer::CreateQuery ( string queryStr, IEnumerable queryParams, ClassMapping mapping ) : IDaQuery