EmbeddedParser Class |
The basic format for an embedded function inside an expression (e.g. a SQL statement) is !fnXXX[flags](params) where ALL embedded functions must start with "!fn" (case-sensitive), be followed by the function name (also case-sensitive), optionally followed by activation flags (currently only "$" is supported indicating that the result should be AnsiQuoted), followed by an open parenthesis and closing parenthesis between which a set of comma-separated parameters may optionally be specified. For example, !fnBitTest(0x00000002, 1) tests whether or not the 1st bit (0-indexed) is set (which it is in this case) and evaluates to 1 if so, else 0.
The parser includes a set of intrinsic functions:
In addition to these intinsic functions, the parser supports application-specific static substitution functions and dynamic functions. Functions can be registered programmatically by calling RegisterFunction(String, String, String) on the parser or by calling RegisterEmbeddedFunction(String, String, String) on the application.
Static substitution functions can be specified in meta-data via the NetQuarry studio by creating Session Properties and setting the GenEmbeddedFunc attribute on each. Dynamic functions can be configured in meta-data as well by setting up FunctionParser Components. FunctionParser components implement the IFunctionParser interface. The IFunctionParser interface allows the platform to interrogate the component in order to determine which functions it supports and to invoke those functions when encountered during embedded function resolution.
Namespace: NetQuarry
The EmbeddedParser type exposes the following members.
Name | Description | |
---|---|---|
EmbeddedParser |
Creates and initializes a new instance of EmbeddedParse.
|
Name | Description | |
---|---|---|
Contains |
Checks for the existence of a particular function.
| |
DevInfoHtml |
Generates an HTML representation of the set of embedded functions appropriate
for display to a developer.
| |
Equals | (Inherited from Object.) | |
ExtractFunctions |
Parse the specified expression and return the set of embedded functions referenced
in the expression.
| |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Load |
Loads intrinsic functions into the parser.
| |
LoadCustomParsers |
Loads custom functions into the parser. Custom functions must be added as components
to the application of type functionparser implementing the IFunctionParser interface.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Parse |
Parses the string and returns the expanded result.
| |
RegisterFunction |
Adds a simple subsitution function to the collection of functions.
| |
RegisterParser |
Register the functions for the specified IFunctionParser object.
| |
ToString | (Inherited from Object.) |
Name | Description | |
---|---|---|
EqualValue |
Determines if the object value is equal to another object. If the two objects are null, then this returns true.
There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways).
If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.) |