示例#1
0
 protected string FormatHints(ITableHints hinting)
 {
     if (!hinting.TableHints.Any())
     {
         return("");
     }
     return(String.Format(" WITH ({0})", String.Join(", ", hinting.TableHints.Select(t => t.Hint).ToArray())));
 }
示例#2
0
 private void ProcessHint(ITableHints hintable)
 {
     if (Tokenizer.IsNextToken(_tableHints))
     {
         var hint = new TableHint {
             Hint = Tokenizer.Current.Value
         };
         hintable.TableHints.Add(hint);
         Tokenizer.ReadNextToken();
     }
 }
示例#3
0
 protected void ProcessTableHints(ITableHints hintable, With with = With.Optional)
 {
     if (with == With.Optional && Tokenizer.Current == Constants.OpenBracket)
     {
         using (Tokenizer.ExpectBrackets())
         {
             ProcessHint(hintable);
         }
     }
     else if (Tokenizer.TokenEquals(Constants.With))
     {
         if (Tokenizer.IsNextToken(Constants.OpenBracket))
         {
             using (Tokenizer.ExpectBrackets())
             {
                 do
                 {
                     ProcessHint(hintable);
                 }while (Tokenizer.TokenEquals(Constants.Comma));
             }
         }
     }
 }
 protected void ProcessTableHints(ITableHints hintable)
 {
     ProcessTableHints(hintable, With.Optional);
 }