<aside> 👉 Links (Controller base class)

DiscussionThread

NotionCache

PropertyCache

Query

RichTextArray

Notion Ruby Mapping Public API Reference

</aside>

<aside> â„šī¸ ↑ Table of Contents

</aside>

1. Singleton methods

new(page_size: 100)

Query builds filter and sort criteria passed to DataSource#query_data_source. It is a mutable builder: methods such as and, or, ascending, and descending update the receiver and return it.

query = Query.new page_size: 100
ds.query_data_source query

↑ Table of Contents

2. Instance methods

and(another_query)

Joins the receiver and another_query with an AND condition. This method updates the receiver.

name = ds.properties["Name"]
score = ds.properties["Score"]
query = name.filter_starts_with("A").and(score.filter_greater_than(10))
ds.query_data_source query

↑ Table of Contents

ascending(property)