sdk/dotnet/src/Microsoft.Datasync.Client.SQLiteStore/Utils/SqlQueryFormatter.cs
/// <summary>
/// Visitor for a unary operator.
/// </summary>
/// <param name="node">The incoming node.</param>
/// <returns>The processed node.</returns>
Visitor for a unary operator.
Visitor for a unary operator .
public override QueryNode Visit(UnaryOperatorNode node)
        {
            if (node.OperatorKind == UnaryOperatorKind.Negate)
            {
                sql.Append("-(");
            }
            else if (node.OperatorKind == UnaryOperatorKind.Not)
            {
                sql.Append("NOT(");
            }
            QueryNode operand = node.Operand.Accept(this);
            sql.Append(')');
            return (operand != node.Operand) ? new UnaryOperatorNode(node.OperatorKind, operand) : node;
        }
public override QueryNode Visit ( UnaryOperatorNode node ) { if ( node . OperatorKind == UnaryOperatorKind . Negate ) { sql . Append ( " " ) ; } else if ( node . OperatorKind == UnaryOperatorKind . Not ) { sql . Append ( " " ) ; } QueryNode operand = node . Operand . Accept ( this ) ; sql . Append ( ' ' ) ; return ( operand != node . Operand ) ? new UnaryOperatorNode ( node . OperatorKind , operand ) : node ; }
Visitor for a unary operator.
Visitor for a unary operator .
The processed node.
The processed node .
node
UnaryOperatorNode
The incoming node.
The incoming node .