DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Properties | Static Private Member Functions | List of all members
Deveel.Data.Xml.XmlFunctionProvider Class Reference
Inheritance diagram for Deveel.Data.Xml.XmlFunctionProvider:
Deveel.Data.Routines.FunctionProvider Deveel.Data.Routines.IRoutineResolver Deveel.Data.Sql.Fluid.IConfigurationContext

Protected Member Functions

override ObjectName NormalizeName (ObjectName functionName)
 
override void OnInit ()
 
- Protected Member Functions inherited from Deveel.Data.Routines.FunctionProvider
 FunctionProvider ()
 
void Register (FunctionInfo functionInfo, Func< InvokeContext, InvokeResult > body, Func< InvokeContext, SqlType > returnType)
 
void Register (Func< IFunctionConfiguration, IFunctionConfiguration > config)
 
void Register (IFunction function)
 
virtual void Dispose (bool disposing)
 

Properties

override string SchemaName [get]
 
- Properties inherited from Deveel.Data.Routines.FunctionProvider
abstract string SchemaName [get]
 
- Properties inherited from Deveel.Data.Sql.Fluid.IConfigurationContext
string SchemaName [get]
 

Static Private Member Functions

static InvokeResult Simple (InvokeContext context, Func< DataObject[], DataObject > func)
 

Additional Inherited Members

- Public Member Functions inherited from Deveel.Data.Routines.FunctionProvider
IFunction ResolveFunction (Invoke invoke, IQuery query)
 
void Dispose ()
 

Detailed Description

Definition at line 10 of file XmlFunctionProvider.cs.

Member Function Documentation

override ObjectName Deveel.Data.Xml.XmlFunctionProvider.NormalizeName ( ObjectName  functionName)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Routines.FunctionProvider.

Definition at line 15 of file XmlFunctionProvider.cs.

15  {
16  if (functionName.Parent == null)
17  functionName = new ObjectName(new ObjectName(SchemaName), functionName.Name);
18 
19  return base.NormalizeName(functionName);
20  }
Describes the name of an object within a database.
Definition: ObjectName.cs:44
ObjectName Parent
Gets the parent reference of the current one, if any or null if none.
Definition: ObjectName.cs:99
string Name
Gets the name of the object being referenced.
Definition: ObjectName.cs:108
override void Deveel.Data.Xml.XmlFunctionProvider.OnInit ( )
inlineprotectedvirtual

Implements Deveel.Data.Routines.FunctionProvider.

Definition at line 28 of file XmlFunctionProvider.cs.

28  {
29  Register(config => config.Named("to_xml")
30  .WithStringParameter("s")
31  .WhenExecute(context => Simple(context, args => XmlFunctions.XmlType(args[0])))
32  .ReturnsType(XmlNodeType.XmlType));
33 
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])))
39  .ReturnsXmlType());
40 
41  Register(config => config.Named("extract")
42  .WithXmlParameter("node")
43  .WithStringParameter("xpath")
44  .WhenExecute(context => Simple(context, args => XmlFunctions.Extract(args[0], args[1])))
45  .ReturnsXmlType());
46 
47  Register(config => config.Named("extractvalue")
48  .WithXmlParameter("node")
49  .WithStringParameter("xpath")
50  .WhenExecute(context => Simple(context, args => XmlFunctions.ExtractValue(args[0], args[1])))
51  .ReturnsType(Function.DynamicType));
52 
53  Register(config => config.Named("existsxml")
54  .WithXmlParameter("node")
55  .WithStringParameter("xpath")
56  .WhenExecute(context => Simple(context, args => XmlFunctions.Exists(args[0], args[1])))
57  .ReturnsXmlType());
58 
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])))
64  .ReturnsXmlType());
65 
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])))
72  .ReturnsXmlType());
73 
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])))
79  .ReturnsXmlType());
80  }
static readonly SqlType DynamicType
A special SqlType that is used to mark an argument of a function as dynamic.
Definition: Function.cs:39
A system routine that returns a value at the end of its execution.
Definition: Function.cs:31
void Register(FunctionInfo functionInfo, Func< InvokeContext, InvokeResult > body, Func< InvokeContext, SqlType > returnType)
static InvokeResult Simple(InvokeContext context, Func< DataObject[], DataObject > func)
static InvokeResult Deveel.Data.Xml.XmlFunctionProvider.Simple ( InvokeContext  context,
Func< DataObject[], DataObject func 
)
inlinestaticprivate

Definition at line 22 of file XmlFunctionProvider.cs.

22  {
23  var args = context.EvaluatedArguments;
24  var funcResult = func(args);
25  return context.Result(funcResult);
26  }
InvokeResult Result(DataObject value)

Property Documentation

override string Deveel.Data.Xml.XmlFunctionProvider.SchemaName
get

Definition at line 11 of file XmlFunctionProvider.cs.


The documentation for this class was generated from the following file: