protected string FormatHints(ITableHints hinting) { if (!hinting.TableHints.Any()) { return(""); } return(String.Format(" WITH ({0})", String.Join(", ", hinting.TableHints.Select(t => t.Hint).ToArray()))); }
private void ProcessHint(ITableHints hintable) { if (Tokenizer.IsNextToken(_tableHints)) { var hint = new TableHint { Hint = Tokenizer.Current.Value }; hintable.TableHints.Add(hint); Tokenizer.ReadNextToken(); } }
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); }