MarkLogic XCC/.Net Library

Request.SetNewIntegerVariable Method (String, String, Int64)

Convenience method that creates a new XSInteger, binds it to this Request and then returns the new XSInteger instance. This method is equivalent to:

            XdmVariable temp = ValueFactory.newVariable (
            ValueFactory.newXName (namespace, localname),
            ValueFactory.newValue (ValueType.XS_INTEGER, value));
            request.setVariable (temp);
            return temp;
            
[Visual Basic]
Function SetNewIntegerVariable( _
   ByVal ns As String, _
   ByVal localname As String, _
   ByVal val As Long _
) As XdmVariable
[C#]
XdmVariable SetNewIntegerVariable(
   string ns,
   string localname,
   long val
);

Parameters

ns
A namespace String, or null for the default namespace.
localname
The local name as a String.
val
A long that contains the value. Note that XQuery integers may contain much larger values that Java ints. If you need to specify a value larger than can be expressed by a long, use ValueFactory.newValue(ValueType, Object) and pass a Decimal object as the value.

Return Value

An instance of XSInteger

See Also

Request Interface | Marklogic.Xcc Namespace | Request.SetNewIntegerVariable Overload List