Options
All
  • Public
  • Public/Protected
  • All
Menu
description

This class augments Queryable objects enabling account-sessions to be queried by address and by transactionsCount.

The main purpose of this class shall be to perform queries against the account-sessions collection.

since

v0.3.2

Hierarchy

Index

Constructors

Properties

The document entry used as a filter. This property can be used to query documents by equality of fields.

Note that queries with more complex operators must use the filterQuery property instead and leave this one blank.

example

Setting a document

 document: {} as Document
document: { field: value } as Document
access

public

var

{TDocument}

filterQuery?: FilterQuery<AccountSessionDocument>

The custom filter query that must be used. This property can be used to filter results using enhanced mongodb operators, including: $ne, $in, $gte, $lte, etc.

Note that queries that use only the equality operator can use the document property as well which removes the need to specify the operators (always uses equality).

example

Setting a filterQuery

 filterQuery: {
$ne: { field: value },
$gte: { otherField: otherValue }
} as FilterQuery<Document>
access

public

var

{FilterQuery}

order: string

Determines the order direction that is being requested. This will define the order direction of results that are returned.

Possible values are:

  • "asc": Sorts the results in ascending order, i.e. "first in, first out".
  • "desc": Sorts the results in descendeing order, i.e. "last in, first out".

example

Setting a order direction

 order: "asc"
order: "desc"
access

public

see

{Sortable}

var

{string}

pageNumber: number

Determines the page number that is being requested. This will also define the offset of results that are returned.

example

Setting a pageNumber

 pageNumber: 3
access

public

see

{Pageable}

var

{number}

pageSize: number

Determines the page size that is being requested. This will also define the maximum number of results that are returned.

example

Setting a document

 pageSize: 100
access

public

see

{Pageable}

var

{number}

sort: string

Determines the sort field that is being requested. This will define the field used to sort results that are returned.

example

Setting a sort field name

 sort: "address"
access

public

see

{Sortable}

var

{string}

Methods

  • forDocument(): Record<string, unknown>
  • This method must return an object that can be used as the value for the mongodb find operations to represent one document. Typically, this method returns an object where keys are the primary key(s) of the entity and values are those of the document represented by the current instance.

    Returns Record<string, unknown>

    The individual document data that is used in a query.

Generated using TypeDoc