/// <summary> /// Gets the SQL filter compatible with the SQL database engine. /// </summary> /// <param name="UseParameters">Replaces strings entered with parameters (Use GetParameters() to get the filled parameters)</param> /// <returns>The SQL filter string</returns> public SQLDATA GetSQLFilter(bool UseParameters) { _useParams = UseParameters; _params = new Dictionary<string, string>(); _groupClauseStack = new Stack<string>(); StringBuilder sqlQuery = new StringBuilder(); BuildSQL(sqlQuery, _head); SQLDATA ret = new SQLDATA(); ret.Filters = sqlQuery.ToString(); // Make a copy so the internal reference isnt tainted if (_useParams) ret.Parameters = new Dictionary<string, string>(_params); return ret; }
public string GetSQLFilter() { SQLDATA ret = GetSQLFilter(false); return ret.Filters; }