Skip to content

Commit

Permalink
MONDRIAN: CurrentDateMember doc now includes a reference to VB format…
Browse files Browse the repository at this point in the history
… spec.

    Reduce redundancy by implicitly generating signature of most MDX functions.
    Update MDX specification.

[git-p4: depot-paths = "//open/mondrian/": change = 9735]
  • Loading branch information
julianhyde committed Aug 9, 2007
1 parent ef96bb7 commit e363298
Show file tree
Hide file tree
Showing 22 changed files with 337 additions and 191 deletions.
108 changes: 88 additions & 20 deletions doc/mdx.html
Expand Up @@ -481,7 +481,7 @@ <h1>Syntax</h1>
</tr>
<tr>
<td valign=top><code>Cast</code></td>
<td>Converts values to another type
<td>Converts values to another type.
<h1>Syntax</h1>
Cast(&lt;Expression&gt; AS &lt;Type&gt;)
</td>
Expand Down Expand Up @@ -565,14 +565,14 @@ <h1>Syntax</h1>
</tr>
<tr>
<td valign=top><code>CurrentDateMember</code></td>
<td>Returns the member within the specified dimension corresponding to the current date, in the format specified by the format parameter.
<td>Returns the exact member within the specified dimension corresponding to the current date, in the format specified by the format parameter. If there is no such date, returns the NULL member. Format strings are the same as used by the MDX Format function, namely the Visual Basic format strings. See http://www.apostate.com/programming/vb-format.html.
<h1>Syntax</h1>
&lt;Member&gt; CurrentDateMember(&lt;Hierarchy&gt;, &lt;String&gt;)
</td>
</tr>
<tr>
<td valign=top><code>CurrentDateMember</code></td>
<td>Returns the closest or exact member within the specified dimension corresponding to the current date, in the format specified by the format parameter.
<td>Returns the closest or exact member within the specified dimension corresponding to the current date, in the format specified by the format parameter. Format strings are the same as used by the MDX Format function, namely the Visual Basic format strings. See http://www.apostate.com/programming/vb-format.html.
<h1>Syntax</h1>
&lt;Member&gt; CurrentDateMember(&lt;Hierarchy&gt;, &lt;String&gt;, &lt;Symbol&gt;)
</td>
Expand Down Expand Up @@ -703,6 +703,13 @@ <h1>Syntax</h1>
&lt;Set&gt; Except(&lt;Set&gt;, &lt;Set&gt;, &lt;Symbol&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Extract</code></td>
<td>Returns a set of tuples from extracted dimension elements. The opposite of Crossjoin.
<h1>Syntax</h1>
Extract(&lt;Set&gt;, &lt;Dimension&gt;[, &lt;Dimension&gt;...])
</td>
</tr>
<tr>
<td valign=top><code>Filter</code></td>
<td>Returns the set resulting from filtering a set based on a search condition.
Expand Down Expand Up @@ -748,6 +755,14 @@ <h1>Syntax</h1>
&lt;Set&gt; Generate(&lt;Set&gt;, &lt;Set&gt;, &lt;Symbol&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Generate</code></td>
<td>Applies a set to a string expression and joins resulting sets by string concatenation.
<h1>Syntax</h1>
&lt;String&gt; Generate(&lt;Set&gt;, &lt;String&gt;)<br/>
&lt;String&gt; Generate(&lt;Set&gt;, &lt;String&gt;, &lt;String&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Head</code></td>
<td>Returns the first specified number of elements in a set.
Expand Down Expand Up @@ -778,6 +793,13 @@ <h1>Syntax</h1>
&lt;Member&gt;.Hierarchy
</td>
</tr>
<tr>
<td valign=top><code>IIf</code></td>
<td>Returns boolean determined by a logical test.
<h1>Syntax</h1>
&lt;Logical Expression&gt; IIf(&lt;Logical Expression&gt;, &lt;Logical Expression&gt;, &lt;Numeric Expression&gt;)
</td>
</tr>
<tr>
<td valign=top><code>IIf</code></td>
<td>Returns one of two numeric values determined by a logical test.
Expand All @@ -794,29 +816,38 @@ <h1>Syntax</h1>
</tr>
<tr>
<td valign=top><code>IS</code></td>
<td>Returns whether an object is null
<td>Returns whether two objects are the same
<h1>Syntax</h1>
&lt;Member&gt; IS &lt;Null&gt;<br/>
&lt;Level&gt; IS &lt;Null&gt;<br/>
&lt;Hierarchy&gt; IS &lt;Null&gt;<br/>
&lt;Dimension&gt; IS &lt;Null&gt;
&lt;Member&gt; IS &lt;Member&gt;<br/>
&lt;Level&gt; IS &lt;Level&gt;<br/>
&lt;Hierarchy&gt; IS &lt;Hierarchy&gt;<br/>
&lt;Dimension&gt; IS &lt;Dimension&gt;<br/>
&lt;Tuple&gt; IS &lt;Tuple&gt;
</td>
</tr>
<tr>
<td valign=top>IN</td>
<td>Returns whether a member is contained in a set. <p><b>Syntax</b></p>
<code>&lt;Member&gt; IN &lt;Set&gt;</code><br/>
<td valign=top><code>IS EMPTY</code></td>
<td>Determines if an expression evaluates to the empty cell value.
<h1>Syntax</h1>
&lt;Member&gt; IS EMPTY<br/>
&lt;Tuple&gt; IS EMPTY
</td>
</tr>
<tr>
<td valign=top><code>IS</code></td>
<td>Returns whether two objects are the same
<td valign=top><code>IS NULL</code></td>
<td>Returns whether an object is null
<h1>Syntax</h1>
&lt;Member&gt; IS &lt;Member&gt;<br/>
&lt;Level&gt; IS &lt;Level&gt;<br/>
&lt;Hierarchy&gt; IS &lt;Hierarchy&gt;<br/>
&lt;Dimension&gt; IS &lt;Dimension&gt;<br/>
&lt;Tuple&gt; IS &lt;Tuple&gt;
&lt;Member&gt; IS NULL<br/>
&lt;Level&gt; IS NULL<br/>
&lt;Hierarchy&gt; IS NULL<br/>
&lt;Dimension&gt; IS NULL
</td>
</tr>
<tr>
<td valign=top><code>InStr</code></td>
<td>Returns the position of the first occurrence of one string within another. Implements very basic form of InStr
<h1>Syntax</h1>
&lt;Numeric Expression&gt; InStr(&lt;String&gt;, &lt;String&gt;)
</td>
</tr>
<tr>
Expand Down Expand Up @@ -892,6 +923,20 @@ <h1>Syntax</h1>
&lt;Member&gt; &lt;Member&gt;.Lead(&lt;Numeric Expression&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Left</code></td>
<td>Returns a specified number of characters from the left side of a string
<h1>Syntax</h1>
&lt;String&gt; Left(&lt;String&gt;, &lt;Numeric Expression&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Len</code></td>
<td>Returns the number of characters in a string
<h1>Syntax</h1>
&lt;Numeric Expression&gt; Len(&lt;String&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Level</code></td>
<td>Returns a member&#39;s level.
Expand Down Expand Up @@ -1003,6 +1048,20 @@ <h1>Syntax</h1>
&lt;Member&gt; Members(&lt;String&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Mid</code></td>
<td>Returns a specified number of characters from a string
<h1>Syntax</h1>
&lt;String&gt; Mid(&lt;String&gt;, &lt;Numeric Expression&gt;, &lt;Numeric Expression&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Mid</code></td>
<td>Returns all the characters starting from specified index from the string
<h1>Syntax</h1>
&lt;String&gt; Mid(&lt;String&gt;, &lt;Numeric Expression&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Min</code></td>
<td>Returns the minimum value of a numeric expression evaluated over a set.
Expand Down Expand Up @@ -1091,7 +1150,9 @@ <h1>Syntax</h1>
<td valign=top><code>OpeningPeriod</code></td>
<td>Returns the first descendant of a member at a level.
<h1>Syntax</h1>
<p>&lt;Member&gt; OpeningPeriod()<br/>&lt;Member&gt; OpeningPeriod(&lt;Level&gt;)<br/>&lt;Member&gt; OpeningPeriod(&lt;Level&gt;, &lt;Member&gt;)
&lt;Member&gt; OpeningPeriod()<br/>
&lt;Member&gt; OpeningPeriod(&lt;Level&gt;)<br/>
&lt;Member&gt; OpeningPeriod(&lt;Level&gt;, &lt;Member&gt;)
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1243,7 +1304,7 @@ <h1>Syntax</h1>
<td valign=top><code>StrToSet</code></td>
<td>Constructs a set from a string expression.
<h1>Syntax</h1>
StrToSet(&lt;String Expression&gt;)
&lt;Set&gt; StrToSet(&lt;String Expression&gt;)
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1329,6 +1390,13 @@ <h1>Syntax</h1>
&lt;String&gt; TupleToStr(&lt;Tuple&gt;)
</td>
</tr>
<tr>
<td valign=top><code>UCase</code></td>
<td>Returns a string that has been converted to uppercase
<h1>Syntax</h1>
&lt;String&gt; UCase(&lt;String&gt;)
</td>
</tr>
<tr>
<td valign=top><code>Union</code></td>
<td>Returns the union of two sets, optionally retaining duplicates.
Expand Down
7 changes: 5 additions & 2 deletions src/main/mondrian/olap/fun/AddCalculatedMembersFunDef.java
Expand Up @@ -24,9 +24,13 @@
/**
* Definition of the <code>AddCalculatedMembers</code> MDX function.
*
* AddCalculatedMembers adds calculated members that are siblings
* <p>AddCalculatedMembers adds calculated members that are siblings
* of the members in the set. The set is limited to one dimension.
*
* <p>Syntax:
*
* <blockquote><pre>AddCalculatedMembers(&lt;Set&gt;)</pre></blockquote>
* @author jhyde
* @version $Id$
* @since Mar 23, 2006
Expand All @@ -41,7 +45,6 @@ class AddCalculatedMembersFunDef extends FunDefBase {
private AddCalculatedMembersFunDef() {
super(
"AddCalculatedMembers",
"AddCalculatedMembers(<Set>)",
"Adds calculated members to a set.",
FLAG);
}
Expand Down

0 comments on commit e363298

Please sign in to comment.