Пример #1
0
 protected string SoqlToSql(SoqlQueryExpression expr, SqlDataSource ds)
 {
     using (StringWriter sw1 = new StringWriter())
     {
         SoqlToSqlConverter converter = new SoqlToSqlConverter(sw1, this.DatabaseSchema, ds.SqlBuilder);
         log.Trace("Converting: {0}", expr);
         converter.ConvertQuery(expr);
         log.Trace("Converted: {0}", sw1);
         return sw1.ToString();
     }
 }
Пример #2
0
 private string SoqlToSql(SoqlQueryExpression queryExpression, SchemaInfo schemaInfo, bool generateColumnAliases)
 {
     StringWriter sw = new StringWriter();
     SoqlToSqlConverter converter = new SoqlToSqlConverter(sw, schemaInfo, SqlBuilder);
     converter.IndentOutput = this.IndentQueries;
     converter.GenerateColumnAliases = generateColumnAliases;
     converter.UpperLike = this.UpperLike;
     //logger.Trace("Converting {0}", queryExpression);
     converter.ConvertQuery(queryExpression);
     string query = sw.ToString();
     //logger.Trace("Converted as {0}", query);
     return query;
 }