示例#1
0
        public override object Visit(IdentifierExpression id)
        {
            id.NonNull(nameof(id)).Identifier.NonBlank(nameof(id.Identifier));

            //check that id is accepted
            var f = Translator.IdentifierFilter;

            if (f != null && !f(id))
            {
                throw new ASTException(StringConsts.AST_BAD_IDENTIFIER_ERROR.Args(id.Identifier));
            }
            return(id.Identifier);
        }
示例#2
0
文件: SqlBaseXlat.cs 项目: azist/azos
    public override object Visit(IdentifierExpression id)
    {
      id.NonNull(nameof(id)).Identifier.NonBlank(nameof(id.Identifier));

      //check that id is accepted
      var f = Translator.IdentifierFilter;
      if (f!=null && !f(id)) throw new ASTException(StringConsts.AST_BAD_IDENTIFIER_ERROR.Args(id.Identifier));

      m_Sql.Append(MasterAlias);
      m_Sql.Append('.');
      m_Sql.Append(IdentifierQuote);
      m_Sql.Append(id.Identifier);
      m_Sql.Append(IdentifierQuote);

      return m_Sql;
    }