Learn R Programming

notionR (version 0.0.9)

filters: Filter Operators

Description

Helps you build a database filter call with human-readable intuition. You must finish (if using pipes) with notion_filter().

Adds a checkbox filter condition.

Usage

notion_filter(., sort = NULL)

notion_or(...)

add_checkbox_filter(property, equals = TRUE)

add_select_filter(property, equals)

add_relation_id_filter(property, equals)

Value

list

list

Arguments

.

List of filter conditions

sort

List of sort conditions. NULL by default.

...

A combination of filters

property

name or id of property (column) in database

equals

TRUE (default) or FALSE condition to meet in checkbox. Equals (contains) for select filter.

Author

Eduardo Flores

Details

Still WIP, only a few operators are currently available.

Examples

Run this code
if (FALSE) {
# to create an OR filter on two checkbox columns with id's "tus" and "YiIx"...
my_query <- notion_or(add_checkbox_filter("tus", TRUE),
                      add_checkbox_filter("YiIx", FALSE)) %>% notion_filter()
 }
# add a condition where checkbox should be checked
add_checkbox_filter("id_column")
# add a condition where checkbox should NOT be checked
add_checkbox_filter("id_column", FALSE)

Run the code above in your browser using DataLab