Пример #1
0
        public override void Visit(ArrayValueExpression array)
        {
            array.NonNull(nameof(array));

            if (array.ArrayValue == null)
            {
                m_Sql.Append(NullLiteral);
                return;
            }

            m_Sql.Append('(');
            var first = true;

            foreach (var elm in array.ArrayValue)
            {
                if (!first)
                {
                    m_Sql.Append(',');
                }

                if (elm == null)
                {
                    m_Sql.Append(NullLiteral);
                }
                else
                {
                    elm.Accept(this);
                }

                first = false;
            }

            m_Sql.Append(')');
        }
Пример #2
0
 public override object Visit(ArrayValueExpression array)
 {
     return(array.NonNull(nameof(array))
            .ArrayValue.NonNull(nameof(array))
            .Select(v => v.Accept(this) as BSONElement));
 }