Home Manual Reference Source Test
public class | source

SortOrder

Represents a particular sort direction on a particular column. You should not instantiate SortOrders manually. Instead, call Attribute.ascending or Attribute.descending to obtain a sort order instance:

db.findBy(Message)
.where({threadId: threadId, draft: false})
.order(Message.attributes.date.descending()).then((messages) {

});

Section: Database

Constructor Summary

Public Constructor
public

constructor(attr: *, direction: string)

Member Summary

Public Members
public

attr: *

public

Method Summary

Public Methods
public

attribute(): *

public

orderBySQL(klass: *): string

Public Constructors

public constructor(attr: *, direction: string) source

Params:

NameTypeAttributeDescription
attr *
direction string
  • optional
  • default: DESC

Public Members

public attr: * source

public direction: * source

Public Methods

public attribute(): * source

Return:

*

public orderBySQL(klass: *): string source

Params:

NameTypeAttributeDescription
klass *

Return:

string