Пример #1
0
 private static void QuoteTable(Table table, Dialect.Dialect dialect)
 {
     if (!table.IsQuoted && dialect.IsKeyword(table.Name))
     {
         table.IsQuoted = true;
     }
     foreach (var column in table.ColumnIterator)
     {
         if (!column.IsQuoted && dialect.IsKeyword(column.Name))
         {
             column.IsQuoted = true;
         }
     }
 }
        private static void QuoteTable(Table table, Dialect.Dialect dialect)
        {
            if (!table.IsQuoted && dialect.IsKeyword(table.Name))
            {
                table.IsQuoted = true;
            }

            QuoteColumns(table.ColumnIterator, dialect);
        }
Пример #3
0
 private static bool IsFunctionOrKeyword(string lcToken, string nextToken, Dialect.Dialect dialect,
                                         SQLFunctionRegistry functionRegistry)
 {
     return("(".Equals(nextToken) ||
            Keywords.Contains(lcToken) ||
            functionRegistry.HasFunction(lcToken) ||
            dialect.IsKeyword(lcToken) ||
            dialect.IsKnownToken(lcToken, nextToken) ||
            FunctionKeywords.Contains(lcToken));
 }
 private static void QuoteColumns(IEnumerable <Column> columns, Dialect.Dialect dialect)
 {
     foreach (var column in columns)
     {
         if (!column.IsQuoted && dialect.IsKeyword(column.Name))
         {
             column.IsQuoted = true;
         }
     }
 }