10 using NUnit.Framework;
12 namespace Deveel.Data.Xml {
25 var invoke =
new Invoke(functionName, args);
27 return Query.InvokeFunction(invoke);
32 const string text =
"TO_XML('<root>value</root>')";
34 var result = ParseAndInvoke(text);
36 Assert.IsNotNull(result);
38 Assert.IsFalse(result.IsNull);
43 const string text =
"EXTRACT(TO_XML('<root><child>value</child></root>'), '/root/child')";
45 var result = ParseAndInvoke(text);
47 Assert.IsNotNull(result);
49 Assert.IsFalse(result.IsNull);
54 const string text =
"EXTRACTVALUE(TO_XML('<root><child>value</child></root>'), '/root/child/text()')";
56 var result = ParseAndInvoke(text);
58 Assert.IsNotNull(result);
60 Assert.IsFalse(result.IsNull);
65 const string text =
"UPDATEXML(TO_XML('<root><child>value</child></root>'), '/root/child/text()', 'value2')";
67 var result = ParseAndInvoke(text);
69 Assert.IsNotNull(result);
71 Assert.IsFalse(result.IsNull);
static SqlExpression Parse(string s)
Parses the given SQL string to an expression that can be evaluated.
override void RegisterServices(ServiceContainer container)
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
The information about the invocation of a routine, including the full name and arguments (as SqlExpre...
DataObject ParseAndInvoke(string text)
Defines the base class for instances that represent SQL expression tree nodes.