Skip to contents

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)

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.

Value

list

list

Details

Still WIP, only a few operators are currently available.

Author

Eduardo Flores

Examples

if (FALSE) { # \dontrun{
# 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")
#> $property
#> [1] "id_column"
#> 
#> $checkbox
#> $checkbox$equals
#> [1] TRUE
#> 
#> 
# add a condition where checkbox should NOT be checked
add_checkbox_filter("id_column", FALSE)
#> $property
#> [1] "id_column"
#> 
#> $checkbox
#> $checkbox$equals
#> [1] FALSE
#> 
#>