IFTSArrayPromise
Promise like object for contents array.
Almost methods are the same interface as IndexedFTS and IFTSTransaction. But this class will processing all contents without using indexes. Please consider using IFTSTransaction directly if it can.
Static Method Summary
Static Public Methods | ||
public static |
reject(indexes: Set<string>, value: object): IFTSArrayPromise Make rejected promise. |
|
public static |
resolve(indexes: Set<string>, value: object[]): IFTSArrayPromise Make resolved promise. |
Constructor Summary
Public Constructor | ||
public |
constructor(indexes: Set<string>, promise: Promise<object[]>) |
Method Summary
Public Methods | ||
public |
between(column: object, lower: object, upper: object): IFTSArrayPromise Get contents that have property is between argument values. |
|
public |
Set error handling function. |
|
public |
equals(column: object, value: object): IFTSArrayPromise Get contents that have fully matched property. |
|
public |
Filtering elements by function and make a new IFTSArrayPromise. |
|
public |
greater(column: object, value: object): IFTSArrayPromise Get contents that have property greater than value. |
|
public |
greaterOrEquals(column: object, value: object): IFTSArrayPromise Get contents that have property greater than value or equals value. |
|
public |
lower(column: object, value: object): IFTSArrayPromise Get contents that have property lower than value. |
|
public |
lowerOrEquals(column: object, value: object): IFTSArrayPromise Get contents that have property lower than value or equals value. |
|
public |
Do something process for each elements and make a new IFTSArrayPromise. |
|
public |
Get contents that have matched property by full-text search. |
|
public |
searchWord(columns: object | object[], query: string, options: object): IFTSArrayPromise Find contents that have fully matched word in property. |
|
public |
sort(column: object, order: 'asc' | 'desc', offset: Number, limit: Number): IFTSArrayPromise Sort contents. |
|
public |
Set next function. |
Static Public Methods
public static reject(indexes: Set<string>, value: object): IFTSArrayPromise source
Make rejected promise.
public static resolve(indexes: Set<string>, value: object[]): IFTSArrayPromise source
Make resolved promise.
Public Constructors
Public Methods
public between(column: object, lower: object, upper: object): IFTSArrayPromise source
Get contents that have property is between argument values.
public catch(fun: function(error: *): *): Promise source
Set error handling function.
Params:
Name | Type | Attribute | Description |
fun | function(error: *): * | error handling function. |
public equals(column: object, value: object): IFTSArrayPromise source
Get contents that have fully matched property.
public filter(fun: function(content: object, index: Number): boolean): IFTSArrayPromise source
Filtering elements by function and make a new IFTSArrayPromise.
public greater(column: object, value: object): IFTSArrayPromise source
Get contents that have property greater than value.
public greaterOrEquals(column: object, value: object): IFTSArrayPromise source
Get contents that have property greater than value or equals value.
public lower(column: object, value: object): IFTSArrayPromise source
Get contents that have property lower than value.
public lowerOrEquals(column: object, value: object): IFTSArrayPromise source
Get contents that have property lower than value or equals value.
public map(fun: function(content: object, index: Number): object): IFTSArrayPromise source
Do something process for each elements and make a new IFTSArrayPromise.
public search(columns: object | object[], query: string, options: object): IFTSArrayPromise source
Get contents that have matched property by full-text search.
This method can search even if didn't made ngram index.
WARNING: This method always processes all contents without using indexes. Please consider using IFTSTransaction#search.
public searchWord(columns: object | object[], query: string, options: object): IFTSArrayPromise source
Find contents that have fully matched word in property.
This method can search even if didn't made word index.
WARNING: This method always processes all contents without using indexes. Please consider using IFTSTransaction#searchWord.
public sort(column: object, order: 'asc' | 'desc', offset: Number, limit: Number): IFTSArrayPromise source
Sort contents.