eq( )


Refines a query to match items whose specified property value equals the specified value.

The eq() function refines a JoinRequestsQueryBuilder to only match items where the value of the specified property equals the specified value.

It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.

Matching strings with eq() is case sensitive, so "text" is not equal to "Text".

Method Declaration
Copy
function eq(propertyName: string, value: any): JoinRequestsQueryBuilder;
Method Parameters
propertyNamestringRequired

The property whose value will be compared with value.

Supported property:

  • status

valueanyRequired

The value to match against.

Returns
JavaScript
const query = joinRequests.queryJoinRequests().eq("status", "APPROVED");
Did this help?

find( )


Returns the items that match the query.

The find() function returns a Promise that resolves to the results found by the query and some information about the results. The Promise is rejected if find() is called with incorrect permissions or if any of the functions used to refine the query are invalid.

Method Declaration
Copy
function find(options: Options): Promise<JoinRequestsQueryResult>;
Method Parameters
optionsOptions

Authorization options.

Returns
Return Type:Promise<JoinRequestsQueryResult>
JavaScript
const queryResults = joinRequests.queryJoinRequests().find();
Did this help?

hasSome( )


Refines a query to match items whose specified property value contains any of the specified values.

The hasSome() function refines a JoinRequestsQueryBuilder to only match items where any of the values of the array of the specified property equal any of the specified values.

Matching with hasSome() is case sensitive, so "text" is not equal to "Text".

Method Declaration
Copy
function hasSome(
  propertyName: string,
  values: Array<string>,
): JoinRequestsQueryBuilder;
Method Parameters
propertyNamestringRequired

The property whose value will be compared with value.

Supported property:

  • status

valuesArray<string>Required

The value to match against.

Returns
JavaScript
const query = joinRequests .queryJoinRequests() .hasSome("status", ["APPROVED", "PENDING"]);
Did this help?

limit( )


Limits the number of items the query returns.

The limit() function defines the number of results a query returns in each page. Only one page of results is retrieved at a time. The next() and prev() functions are used to navigate the pages of a query result.

By default, limit is set to 50.

The maximum value that limit() can accept is 1000.

Method Declaration
Copy
function limit(limit: string): JoinRequestsQueryBuilder;
Method Parameters
limitstringRequired

limit The number of items to return, which is also the pageSize of the results object.

Returns
JavaScript
const query = joinRequests.queryJoinRequests().limit(10);
Did this help?

ne( )


Refines a query to match items whose specified property value does not equal the specified value.

The ne() function refines a JoinRequestsQueryBuilder to only match items where the value of the specified property does not equal the specified value.

It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.

Matching strings with ne() is case sensitive, so "text" is not equal to "Text".

Method Declaration
Copy
function ne(propertyName: string, value: any): JoinRequestsQueryBuilder;
Method Parameters
propertyNamestringRequired

The property whose value will be compared with value.

Supported property:

  • status

valueanyRequired

The value to match against.

Returns
JavaScript
const query = joinRequests.queryJoinRequests().ne("status", "APPROVED");
Did this help?

or( )


Adds an or condition to the query.

The or() function adds an inclusive or condition to a JoinRequestsQueryBuilder. A query with an or returns all the items that match the query as defined up to the or function, the items that match the query passed to the or function, and the items that match both.

The or() function is designed to work with 2 or more queries. If you use it on its own, it will return all the items that meet the query criteria.

Method Declaration
Copy
function or(query: JoinRequestsQueryBuilder): JoinRequestsQueryBuilder;
Method Parameters

A query to add to the initial query as an or condition.

Returns
JavaScript
const query = query1.or(query2);
Did this help?