29 Register(config => config.Named(
"to_xml")
30 .WithStringParameter(
"s")
31 .WhenExecute(context =>
Simple(context, args => XmlFunctions.XmlType(args[0])))
32 .ReturnsType(XmlNodeType.XmlType));
34 Register(config => config.Named(
"appendchildxml")
35 .WithXmlParameter(
"obj")
36 .WithStringParameter(
"xpath")
37 .WithXmlParameter(
"value")
38 .WhenExecute(context =>
Simple(context, args => XmlFunctions.AppendChild(args[0], args[1], args[2])))
41 Register(config => config.Named(
"extract")
42 .WithXmlParameter(
"node")
43 .WithStringParameter(
"xpath")
44 .WhenExecute(context =>
Simple(context, args => XmlFunctions.Extract(args[0], args[1])))
47 Register(config => config.Named(
"extractvalue")
48 .WithXmlParameter(
"node")
49 .WithStringParameter(
"xpath")
50 .WhenExecute(context =>
Simple(context, args => XmlFunctions.ExtractValue(args[0], args[1])))
53 Register(config => config.Named(
"existsxml")
54 .WithXmlParameter(
"node")
55 .WithStringParameter(
"xpath")
56 .WhenExecute(context =>
Simple(context, args => XmlFunctions.Exists(args[0], args[1])))
59 Register(config => config.Named(
"insertbeforexml")
60 .WithXmlParameter(
"node")
61 .WithStringParameter(
"xpath")
62 .WithXmlParameter(
"value")
63 .WhenExecute(context =>
Simple(context, args => XmlFunctions.InsertBefore(args[0], args[1], args[2])))
66 Register(config => config.Named(
"insertchildxml")
67 .WithXmlParameter(
"node")
68 .WithStringParameter(
"xpath")
69 .WithXmlParameter(
"child")
70 .WithXmlParameter(
"value")
71 .WhenExecute(context =>
Simple(context, args => XmlFunctions.InsertChild(args[0], args[1], args[2], args[3])))
74 Register(config => config.Named(
"updatexml")
75 .WithXmlParameter(
"node")
76 .WithStringParameter(
"xpath")
77 .WithDynamicParameter(
"value")
78 .WhenExecute(context =>
Simple(context, args => XmlFunctions.Update(args[0], args[1], args[2])))
static readonly SqlType DynamicType
A special SqlType that is used to mark an argument of a function as dynamic.
A system routine that returns a value at the end of its execution.
void Register(FunctionInfo functionInfo, Func< InvokeContext, InvokeResult > body, Func< InvokeContext, SqlType > returnType)
static InvokeResult Simple(InvokeContext context, Func< DataObject[], DataObject > func)