The property_sort() function applies a sort condition within a database query to sort how pages are returned.

property_sort(
  property,
  timestamp = "last_edited_time",
  direction = "descending"
)

Arguments

property

A character string; the name of the property to apply the sort to.

timestamp

A character string; must be one of last_edited_time or created_time.

direction

A character string; must be one of descending or ascending.

Value

A list; a formatted property sort.

Details

The property_sort() function applies to a particular database property, by name or id. It applies a user-supplied condition to this property to sort pages are returned. This sort is only meant for use within the query_database function.

Examples

property_sort(
  property = "Ingredients",
  timestamp = "last_edited_time",
  direction = "descending"
)
#> $property
#> [1] "Ingredients"
#> 
#> $timestamp
#> [1] "last_edited_time"
#> 
#> $direction
#> [1] "descending"
#>