mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #29132 from ChrisGrant/master
[parse] Added fullText function to Parse.Query
This commit is contained in:
Vendored
+8
@@ -634,6 +634,7 @@ declare namespace Parse {
|
||||
exists(key: string): Query<T>;
|
||||
find(options?: Query.FindOptions): Promise<T[]>;
|
||||
first(options?: Query.FirstOptions): Promise<T | undefined>;
|
||||
fullText(key: string, value: string, options?: Query.FullTextOptions): Query<T>;
|
||||
get(objectId: string, options?: Query.GetOptions): Promise<T>;
|
||||
greaterThan(key: string, value: any): Query<T>;
|
||||
greaterThanOrEqualTo(key: string, value: any): Query<T>;
|
||||
@@ -675,6 +676,13 @@ declare namespace Parse {
|
||||
// Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort
|
||||
sort?: {[key: string]: 1|-1};
|
||||
}
|
||||
|
||||
// According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText
|
||||
interface FullTextOptions {
|
||||
language?: string;
|
||||
caseSensitive?: boolean;
|
||||
diacriticSensitive?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,6 +83,7 @@ function test_query() {
|
||||
const query = new Parse.Query(GameScore);
|
||||
query.equalTo("playerName", "Dan Stemkoski");
|
||||
query.notEqualTo("playerName", "Michael Yabuti");
|
||||
query.fullText("playerName", "dan", { language: 'en', caseSensitive: false, diacriticSensitive: true });
|
||||
query.greaterThan("playerAge", 18);
|
||||
query.limit(10);
|
||||
query.skip(10);
|
||||
|
||||
Reference in New Issue
Block a user