Exemplo n.º 1
0
 /// <summary>
 /// Takes any recursive SqlString parts and flattens them, resulting in an SqlString with only strings, fields and Parameters.
 /// </summary>
 /// <returns></returns>
 internal SqlString Flatten()
 {
     var sql = new SqlString();
     Flatten(sql);
     return sql;
 }
Exemplo n.º 2
0
 private void Flatten(SqlString cur)
 {
     // pull out all parts to the top level
     foreach (var p in Parts)
     {
         if (p is SqlString)
             ((SqlString)p).Flatten(cur);
         else
             cur.Parts.Add(p);
     }
 }
Exemplo n.º 3
0
 public SqlString Add(SqlString sql)
 {
     Parts.Add(sql);
     return this;
 }