Skip to content

Commit

Permalink
0.126.0
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomvh committed Oct 9, 2023
1 parent ba22aa9 commit 33fc917
Show file tree
Hide file tree
Showing 84 changed files with 13,608 additions and 4,279 deletions.
319 changes: 270 additions & 49 deletions docs/classes/ArithmeticFunctions.html

Large diffs are not rendered by default.

331 changes: 276 additions & 55 deletions docs/classes/ArithmeticOperators.html

Large diffs are not rendered by default.

315 changes: 268 additions & 47 deletions docs/classes/CollectionFunctions.html

Large diffs are not rendered by default.

271 changes: 249 additions & 22 deletions docs/classes/ComputeExpression.html

Large diffs are not rendered by default.

311 changes: 266 additions & 45 deletions docs/classes/ConditionalFunctions.html

Large diffs are not rendered by default.

295 changes: 262 additions & 33 deletions docs/classes/CountExpression.html

Large diffs are not rendered by default.

146 changes: 121 additions & 25 deletions docs/classes/CountField.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ <h6><b>Methods</b></h6>
<a href="#render" >render</a>
</li>
<li>
<a href="#toJSON" >toJSON</a>
<a href="#resolve" >resolve</a>
</li>
<li>
<a href="#toJson" >toJson</a>
</li>
</ul>
</td>
Expand Down Expand Up @@ -224,8 +227,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="78"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:78</a></div>
<div class="io-line">Defined in <a href="" data-line="82"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:82</a></div>
</td>
</tr>

Expand Down Expand Up @@ -261,8 +264,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="66"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:66</a></div>
<div class="io-line">Defined in <a href="" data-line="70"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:70</a></div>
</td>
</tr>

Expand Down Expand Up @@ -332,8 +335,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="88"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:88</a></div>
<div class="io-line">Defined in <a href="" data-line="96"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:96</a></div>
</td>
</tr>

Expand Down Expand Up @@ -473,16 +476,85 @@ <h3 id="methods">
<tbody>
<tr>
<td class="col-md-4">
<a name="toJSON"></a>
<a name="resolve"></a>
<span class="name">
<span ><b>toJSON</b></span>
<a href="#toJSON"><span class="icon ion-ios-link"></span></a>
<span ><b>resolve</b></span>
<a href="#resolve"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>toJSON()</code>
<code>resolve(parser: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a>)</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="91"
class="link-to-prism">projects/angular-odata/src/lib/resources/query/expressions/count.ts:91</a></div>
</td>
</tr>


<tr>
<td class="col-md-4">

<div class="io-description">
<b>Parameters :</b>

<table class="params">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Optional</td>
</tr>
</thead>
<tbody>
<tr>
<td>parser</td>
<td>
<code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
</td>

<td>
No
</td>


</tr>
</tbody>
</table>
</div>
<div>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

</div>
<div class="io-description">

</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="toJson"></a>
<span class="name">
<span ><b>toJson</b></span>
<a href="#toJson"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>toJson()</code>
</td>
</tr>

Expand Down Expand Up @@ -543,26 +615,26 @@ <h3 id="accessors">


<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Parser, QueryOption } from &#x27;../../../types&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Parser, ParserOptions, QueryOption } from &#x27;../../../types&#x27;;
import { Objects, Types } from &#x27;../../../utils&#x27;;
import type { QueryCustomType } from &#x27;../builder&#x27;;
import { Expression } from &#x27;./base&#x27;;
import { FilterExpression, FilterExpressionBuilder } from &#x27;./filter&#x27;;
import { render, FieldFactory, Renderable } from &#x27;./syntax&#x27;;
import { render, FieldFactory, Renderable, RenderableFactory } from &#x27;./syntax&#x27;;

export class CountField&lt;T&gt; implements Renderable {
constructor(
protected field: any,
private values: { [name: string]: any } &#x3D; {},
private values: { [name: string]: any } &#x3D; {}
) {}

get [Symbol.toStringTag]() {
return &#x27;CountField&#x27;;
}

toJSON() {
toJson() {
return {
field: this.field.toJSON(),
field: this.field.toJson(),
};
}

Expand All @@ -571,11 +643,13 @@ <h3 id="accessors">
escape,
prefix,
parser,
options,
}: {
aliases?: QueryCustomType[];
escape?: boolean;
prefix?: string;
parser?: Parser&lt;T&gt;;
options?: ParserOptions;
}): string {
const params: { [name: string]: string } &#x3D; [
QueryOption.filter,
Expand All @@ -590,6 +664,7 @@ <h3 id="accessors">
prefix,
escape,
parser,
options,
});
}
return Object.assign(acc, { [key]: value });
Expand All @@ -599,6 +674,7 @@ <h3 id="accessors">
escape,
prefix,
parser,
options,
})}/$count&#x60;;
if (!Types.isEmpty(params)) {
count &#x3D; &#x60;${count}(${Object.keys(params)
Expand All @@ -611,24 +687,28 @@ <h3 id="accessors">
filter(
opts: (
builder: FilterExpressionBuilder&lt;T&gt;,
current?: FilterExpression&lt;T&gt;,
) &#x3D;&gt; FilterExpression&lt;T&gt;,
current?: FilterExpression&lt;T&gt;
) &#x3D;&gt; FilterExpression&lt;T&gt;
) {
return this.option(
QueryOption.filter,
FilterExpression.filter&lt;T&gt;(opts, this.values[QueryOption.filter]),
FilterExpression.filter&lt;T&gt;(opts, this.values[QueryOption.filter])
);
}

clone() {
const values &#x3D; Object.keys(this.values).reduce(
(acc, key) &#x3D;&gt;
Object.assign(acc, { [key]: Objects.clone(this.values[key]) }),
{},
{}
);
return new CountField&lt;T&gt;(this.field.clone(), values);
}

resolve(parser: any) {
return parser;
}

// Option Handler
private option&lt;O&gt;(name: QueryOption, opts?: O) {
if (opts !&#x3D;&#x3D; undefined) this.values[name] &#x3D; opts;
Expand All @@ -649,19 +729,23 @@ <h3 id="accessors">
super({ children });
}

get [Symbol.toStringTag]() {
return &#x27;CountExpression&#x27;;
}

static count&lt;T&gt;(
opts: (
builder: CountExpressionBuilder&lt;T&gt;,
current?: CountExpression&lt;T&gt;,
current?: CountExpression&lt;T&gt;
) &#x3D;&gt; CountExpression&lt;T&gt;,
current?: CountExpression&lt;T&gt;,
current?: CountExpression&lt;T&gt;
): CountExpression&lt;T&gt; {
return opts(
{
t: FieldFactory&lt;Readonly&lt;Required&lt;T&gt;&gt;&gt;(),
e: () &#x3D;&gt; new CountExpression&lt;T&gt;(),
},
current,
current
) as CountExpression&lt;T&gt;;
}

Expand All @@ -670,19 +754,31 @@ <h3 id="accessors">
return this;
}

override toJson() {
const json &#x3D; super.toJson();
return Object.assign(json, {});
}

static fromJson&lt;T&gt;(json: { [name: string]: any }): CountExpression&lt;T&gt; {
return new CountExpression&lt;T&gt;({
children: json[&#x27;children&#x27;].map((c: any) &#x3D;&gt; RenderableFactory(c)),
});
}
render({
aliases,
escape,
prefix,
parser,
options,
}: {
aliases?: QueryCustomType[];
escape?: boolean;
prefix?: string;
parser?: Parser&lt;T&gt;;
options?: ParserOptions;
} &#x3D; {}): string {
let content &#x3D; this._children
.map((n) &#x3D;&gt; n.render({ aliases, escape, prefix, parser }))
.map((n) &#x3D;&gt; n.render({ aliases, escape, prefix, parser, options }))
.join(&#x60;,&#x60;);
return content;
}
Expand All @@ -695,7 +791,7 @@ <h3 id="accessors">

field&lt;F&gt;(
field: F[],
opts?: (e: { t: F; f: CountField&lt;F&gt; }) &#x3D;&gt; CountExpression&lt;F&gt;,
opts?: (e: { t: F; f: CountField&lt;F&gt; }) &#x3D;&gt; CountExpression&lt;F&gt;
): CountExpression&lt;F&gt; {
let countField &#x3D; new CountField&lt;F&gt;(field);
if (opts !&#x3D;&#x3D; undefined)
Expand Down
18 changes: 9 additions & 9 deletions docs/classes/CsdlSchema.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h3 id="constructor">Constructor</h3>
<tbody>
<tr>
<td class="col-md-4">
<code>constructor(namespace: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, alias?: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, enumTypes?: <a href="../classes/CsdlEnumType.html" target="_self">CsdlEnumType[]</a>, complexTypes?: <a href="../classes/CsdlComplexType.html" target="_self">CsdlComplexType[]</a>, entityTypes?: <a href="../classes/CsdlEntityType.html" target="_self">CsdlEntityType[]</a>, functions?: CsdlFunction[], actions?: <a href="../classes/CsdlAction.html" target="_self">CsdlAction[]</a>, entityContainer?: <a href="../classes/CsdlEntityContainer.html" target="_self">CsdlEntityContainer</a>, typeDefinitions?: <a href="../classes/CsdlTypeDefinition.html" target="_self">CsdlTypeDefinition[]</a>, terms?: <a href="../classes/CsdlTerm.html" target="_self">CsdlTerm[]</a>, annotationsList?: CsdlAnnotations[], annotationList?: <a href="../classes/CsdlAnnotation.html" target="_self">CsdlAnnotation[]</a>)</code>
<code>constructor(namespace: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, alias?: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, enumTypes?: CsdlEnumType[], complexTypes?: CsdlComplexType[], entityTypes?: CsdlEntityType[], functions?: CsdlFunction[], actions?: <a href="../classes/CsdlAction.html" target="_self">CsdlAction[]</a>, entityContainer?: <a href="../classes/CsdlEntityContainer.html" target="_self">CsdlEntityContainer</a>, typeDefinitions?: CsdlTypeDefinition[], terms?: <a href="../classes/CsdlTerm.html" target="_self">CsdlTerm[]</a>, annotationsList?: CsdlAnnotations[], annotationList?: <a href="../classes/CsdlAnnotation.html" target="_self">CsdlAnnotation[]</a>)</code>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -222,7 +222,7 @@ <h3 id="constructor">Constructor</h3>
<td>enumTypes</td>

<td>
<code><a href="../classes/CsdlEnumType.html" target="_self" >CsdlEnumType[]</a></code>
<code>CsdlEnumType[]</code>
</td>

<td>
Expand All @@ -234,7 +234,7 @@ <h3 id="constructor">Constructor</h3>
<td>complexTypes</td>

<td>
<code><a href="../classes/CsdlComplexType.html" target="_self" >CsdlComplexType[]</a></code>
<code>CsdlComplexType[]</code>
</td>

<td>
Expand All @@ -246,7 +246,7 @@ <h3 id="constructor">Constructor</h3>
<td>entityTypes</td>

<td>
<code><a href="../classes/CsdlEntityType.html" target="_self" >CsdlEntityType[]</a></code>
<code>CsdlEntityType[]</code>
</td>

<td>
Expand Down Expand Up @@ -294,7 +294,7 @@ <h3 id="constructor">Constructor</h3>
<td>typeDefinitions</td>

<td>
<code><a href="../classes/CsdlTypeDefinition.html" target="_self" >CsdlTypeDefinition[]</a></code>
<code>CsdlTypeDefinition[]</code>
</td>

<td>
Expand Down Expand Up @@ -451,7 +451,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="../classes/CsdlComplexType.html" target="_self" >CsdlComplexType[]</a></code>
<i>Type : </i> <code>CsdlComplexType[]</code>

</td>
</tr>
Expand Down Expand Up @@ -507,7 +507,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="../classes/CsdlEntityType.html" target="_self" >CsdlEntityType[]</a></code>
<i>Type : </i> <code>CsdlEntityType[]</code>

</td>
</tr>
Expand Down Expand Up @@ -535,7 +535,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="../classes/CsdlEnumType.html" target="_self" >CsdlEnumType[]</a></code>
<i>Type : </i> <code>CsdlEnumType[]</code>

</td>
</tr>
Expand Down Expand Up @@ -646,7 +646,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="../classes/CsdlTypeDefinition.html" target="_self" >CsdlTypeDefinition[]</a></code>
<i>Type : </i> <code>CsdlTypeDefinition[]</code>

</td>
</tr>
Expand Down
Loading

0 comments on commit 33fc917

Please sign in to comment.