<aside> 👉 Links (Property base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> 💡
[P] means methods for Page Property, [DB/DS] means methods for Database or DataSource Property.
</aside>
These methods return a Query; .filter in the examples reads its generated Hash. Creating a condition does not send an API request or update the property value.
For ordinary phone_number filters, omit condition: and another_type:. The shared methods accept these keywords for nested Formula / Rollup conditions; they are not needed for the examples below. The filter methods do not validate or normalize the supplied string.
Creates a Query object whose phone_number condition matches a value that contains the given string. The value argument is a String and is passed to the filter unchanged.
ds.properties["TelTitle"].filter_contains("03").filter
# => {"property" => "TelTitle", "phone_number" => {"contains" => "03"}}
Creates a Query object whose phone_number condition matches a value that does not contain the given string. The value argument is a String and is passed to the filter unchanged.
ds.properties["TelTitle"].filter_does_not_contain("090").filter
# => {"property" => "TelTitle", "phone_number" => {"does_not_contain" => "090"}}
Creates a Query object whose phone_number condition matches a value that does not equal the given string. The value argument is a String and is passed to the filter unchanged.
ds.properties["TelTitle"].filter_does_not_equal("03-1234-5678").filter
# => {"property" => "TelTitle", "phone_number" => {"does_not_equal" => "03-1234-5678"}}
Creates a Query object whose phone_number condition matches a value that ends with the given string. The value argument is a String and is passed to the filter unchanged.
ds.properties["TelTitle"].filter_ends_with("5678").filter
# => {"property" => "TelTitle", "phone_number" => {"ends_with" => "5678"}}
Creates a Query object whose phone_number condition matches a value that equals the given string. The value argument is a String and is passed to the filter unchanged.