Class: SearchBuilder¶
The SearchBuilder is an API for building OData Search options.
Hierarchy¶
-
SearchBuilder
Implements¶
IDebuggable
Summary¶
Constructors¶
Properties¶
Class Properties¶
Currently none in this class.
Inherited Properties¶
Accessors¶
Class Accessors¶
Inherited Accessors¶
Methods¶
Class Methods¶
Inherited Methods¶
Constructors¶
Constructor¶
+ new SearchBuilder(context: IContext, ...terms: string[] | SearchBuilder[]): SearchBuilder
Overrides QueryOptionBuilder.constructor
Parameters:
| Name | Type |
|---|---|
| context | IContext |
| terms | string[] | SearchBuilder[] |
Returns: SearchBuilder
Accessors¶
terms¶
Get Signature¶
▸ getter
Returns¶
ISearchTerm[]
Methods¶
and¶
▸ and(...terms: string[] | SearchBuilder[]): this
The OData and operator is added to the search option by invoking the SearchBuilder and API.
Parameters:
| Name | Type | Description |
|---|---|---|
| terms | string[] | SearchBuilder[] | A comma-separated list of SearchBuilder or string. |
Returns: this
Returns a SearchBuilder instance for chaining.
build¶
▸ build(): Promise<any>
Asynchronously build the search string based on all added SearchItems.
Overrides QueryOptionBuilder.build
Returns: Promise<any>
Returns a Promise with the search string.
Protected createSearchTerm¶
▸ createSearchTerm(term: any): string
Create the search string for a specific SearchItem.
Parameters:
| Name | Type | Description |
|---|---|---|
| term | any | The search item. |
Returns: string
Returns a search string.
not¶
▸ not(...terms: string[] | SearchBuilder[]): this
The OData not operator is added to the search option by invoking the SearchBuilder and API.
Parameters:
| Name | Type | Description |
|---|---|---|
| terms | string[] | SearchBuilder[] | a comma-separated list of SearchBuilder or string. |
Returns: this
return a SearchBuilder instance for chaining
or¶
▸ or(...terms: string[] | SearchBuilder[]): this
The OData or operator is added to the search option by invoking the SearchBuilder or API.
Parameters:
| Name | Type | Description |
|---|---|---|
| terms | string[] | SearchBuilder[] | A comma-separated list of SearchBuilder or string. |
Returns: this
Returns a SearchBuilder instance for chaining.