Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more datatypes functions #8

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 62 additions & 48 deletions R/000-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,21 @@ class(`PlRDataFrame`) <- "PlRDataFrame__bundle"
}
}

`PlRDataType_is_temporal` <- function(self) {
`PlRDataType_is_array` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_temporal__impl, `self`)
.Call(savvy_PlRDataType_is_array__impl, `self`)
}
}

`PlRDataType_is_enum` <- function(self) {
`PlRDataType_is_binary` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_enum__impl, `self`)
.Call(savvy_PlRDataType_is_binary__impl, `self`)
}
}

`PlRDataType_is_bool` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_bool__impl, `self`)
}
}

Expand All @@ -416,15 +422,15 @@ class(`PlRDataFrame`) <- "PlRDataFrame__bundle"
}
}

`PlRDataType_is_string` <- function(self) {
`PlRDataType_is_date` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_string__impl, `self`)
.Call(savvy_PlRDataType_is_date__impl, `self`)
}
}

`PlRDataType_is_logical` <- function(self) {
`PlRDataType_is_enum` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_logical__impl, `self`)
.Call(savvy_PlRDataType_is_enum__impl, `self`)
}
}

Expand All @@ -434,69 +440,75 @@ class(`PlRDataFrame`) <- "PlRDataFrame__bundle"
}
}

`PlRDataType_is_numeric` <- function(self) {
`PlRDataType_is_integer` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_numeric__impl, `self`)
.Call(savvy_PlRDataType_is_integer__impl, `self`)
}
}

`PlRDataType_is_integer` <- function(self) {
`PlRDataType_is_known` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_integer__impl, `self`)
.Call(savvy_PlRDataType_is_known__impl, `self`)
}
}

`PlRDataType_is_signed_integer` <- function(self) {
`PlRDataType_is_list` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_signed_integer__impl, `self`)
.Call(savvy_PlRDataType_is_list__impl, `self`)
}
}

`PlRDataType_is_unsigned_integer` <- function(self) {
`PlRDataType_is_logical` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_unsigned_integer__impl, `self`)
.Call(savvy_PlRDataType_is_logical__impl, `self`)
}
}

`PlRDataType_is_null` <- function(self) {
`PlRDataType_is_nested` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_null__impl, `self`)
.Call(savvy_PlRDataType_is_nested__impl, `self`)
}
}

`PlRDataType_is_binary` <- function(self) {
`PlRDataType_is_nested_null` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_binary__impl, `self`)
.Call(savvy_PlRDataType_is_nested_null__impl, `self`)
}
}

`PlRDataType_is_primitive` <- function(self) {
`PlRDataType_is_null` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_primitive__impl, `self`)
.Call(savvy_PlRDataType_is_null__impl, `self`)
}
}

`PlRDataType_is_bool` <- function(self) {
`PlRDataType_is_numeric` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_bool__impl, `self`)
.Call(savvy_PlRDataType_is_numeric__impl, `self`)
}
}

`PlRDataType_is_array` <- function(self) {
`PlRDataType_is_ord` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_array__impl, `self`)
.Call(savvy_PlRDataType_is_ord__impl, `self`)
}
}

`PlRDataType_is_list` <- function(self) {
`PlRDataType_is_primitive` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_list__impl, `self`)
.Call(savvy_PlRDataType_is_primitive__impl, `self`)
}
}

`PlRDataType_is_nested` <- function(self) {
`PlRDataType_is_signed_integer` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_nested__impl, `self`)
.Call(savvy_PlRDataType_is_signed_integer__impl, `self`)
}
}

`PlRDataType_is_string` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_string__impl, `self`)
}
}

Expand All @@ -506,15 +518,15 @@ class(`PlRDataFrame`) <- "PlRDataFrame__bundle"
}
}

`PlRDataType_is_ord` <- function(self) {
`PlRDataType_is_temporal` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_ord__impl, `self`)
.Call(savvy_PlRDataType_is_temporal__impl, `self`)
}
}

`PlRDataType_is_known` <- function(self) {
`PlRDataType_is_unsigned_integer` <- function(self) {
function() {
.Call(savvy_PlRDataType_is_known__impl, `self`)
.Call(savvy_PlRDataType_is_unsigned_integer__impl, `self`)
}
}

Expand All @@ -525,26 +537,28 @@ class(`PlRDataFrame`) <- "PlRDataFrame__bundle"
e$`_get_datatype_fields` <- `PlRDataType__get_datatype_fields`(ptr)
e$`eq` <- `PlRDataType_eq`(ptr)
e$`ne` <- `PlRDataType_ne`(ptr)
e$`is_temporal` <- `PlRDataType_is_temporal`(ptr)
e$`is_enum` <- `PlRDataType_is_enum`(ptr)
e$`is_array` <- `PlRDataType_is_array`(ptr)
e$`is_binary` <- `PlRDataType_is_binary`(ptr)
e$`is_bool` <- `PlRDataType_is_bool`(ptr)
e$`is_categorical` <- `PlRDataType_is_categorical`(ptr)
e$`is_string` <- `PlRDataType_is_string`(ptr)
e$`is_logical` <- `PlRDataType_is_logical`(ptr)
e$`is_date` <- `PlRDataType_is_date`(ptr)
e$`is_enum` <- `PlRDataType_is_enum`(ptr)
e$`is_float` <- `PlRDataType_is_float`(ptr)
e$`is_numeric` <- `PlRDataType_is_numeric`(ptr)
e$`is_integer` <- `PlRDataType_is_integer`(ptr)
e$`is_signed_integer` <- `PlRDataType_is_signed_integer`(ptr)
e$`is_unsigned_integer` <- `PlRDataType_is_unsigned_integer`(ptr)
e$`is_null` <- `PlRDataType_is_null`(ptr)
e$`is_binary` <- `PlRDataType_is_binary`(ptr)
e$`is_primitive` <- `PlRDataType_is_primitive`(ptr)
e$`is_bool` <- `PlRDataType_is_bool`(ptr)
e$`is_array` <- `PlRDataType_is_array`(ptr)
e$`is_known` <- `PlRDataType_is_known`(ptr)
e$`is_list` <- `PlRDataType_is_list`(ptr)
e$`is_logical` <- `PlRDataType_is_logical`(ptr)
e$`is_nested` <- `PlRDataType_is_nested`(ptr)
e$`is_struct` <- `PlRDataType_is_struct`(ptr)
e$`is_nested_null` <- `PlRDataType_is_nested_null`(ptr)
e$`is_null` <- `PlRDataType_is_null`(ptr)
e$`is_numeric` <- `PlRDataType_is_numeric`(ptr)
e$`is_ord` <- `PlRDataType_is_ord`(ptr)
e$`is_known` <- `PlRDataType_is_known`(ptr)
e$`is_primitive` <- `PlRDataType_is_primitive`(ptr)
e$`is_signed_integer` <- `PlRDataType_is_signed_integer`(ptr)
e$`is_string` <- `PlRDataType_is_string`(ptr)
e$`is_struct` <- `PlRDataType_is_struct`(ptr)
e$`is_temporal` <- `PlRDataType_is_temporal`(ptr)
e$`is_unsigned_integer` <- `PlRDataType_is_unsigned_integer`(ptr)

class(e) <- "PlRDataType"
e
Expand Down
72 changes: 38 additions & 34 deletions R/datatypes-classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,82 +126,86 @@ datatype__ne <- function(other) {
})
}

datatype__is_temporal <- function() {
self$`_dt`$is_temporal()
datatype__is_array <- function() {
self$`_dt`$is_array()
}

datatype__is_enum <- function() {
self$`_dt`$is_enum()
datatype__is_binary <- function() {
self$`_dt`$is_binary()
}

datatype__is_categorical <- function() {
self$`_dt`$is_categorical()
}

datatype__is_string <- function() {
self$`_dt`$is_string()
datatype__is_date <- function() {
self$`_dt`$is_date()
}

datatype__is_logical <- function() {
self$`_dt`$is_bool()
datatype__is_enum <- function() {
self$`_dt`$is_enum()
}

datatype__is_float <- function() {
self$`_dt`$is_float()
}

datatype__is_numeric <- function() {
self$`_dt`$is_numeric()
}

datatype__is_integer <- function() {
self$`_dt`$is_integer()
}

datatype__is_signed_integer <- function() {
self$`_dt`$is_signed_integer()
datatype__is_known <- function() {
self$`_dt`$is_known()
}

datatype__is_unsigned_integer <- function() {
self$`_dt`$is_unsigned_integer()
datatype__is_logical <- function() {
self$`_dt`$is_bool()
}

datatype__is_null <- function() {
self$`_dt`$is_null()
datatype__is_list <- function() {
self$`_dt`$is_list()
}

datatype__is_binary <- function() {
self$`_dt`$is_binary()
datatype__is_nested <- function() {
self$`_dt`$is_nested()
}

datatype__is_primitive <- function() {
self$`_dt`$is_primitive()
datatype__is_nested_null <- function() {
self$`_dt`$is_nested_null()
}

datatype__is_bool <- function() {
self$`_dt`$is_bool()
datatype__is_null <- function() {
self$`_dt`$is_null()
}

datatype__is_array <- function() {
self$`_dt`$is_array()
datatype__is_numeric <- function() {
self$`_dt`$is_numeric()
}

datatype__is_list <- function() {
self$`_dt`$is_list()
datatype__is_ord <- function() {
self$`_dt`$is_ord()
}

datatype__is_nested <- function() {
self$`_dt`$is_nested()
datatype__is_primitive <- function() {
self$`_dt`$is_primitive()
}

datatype__is_signed_integer <- function() {
self$`_dt`$is_signed_integer()
}

datatype__is_string <- function() {
self$`_dt`$is_string()
}

datatype__is_struct <- function() {
self$`_dt`$is_struct()
}

datatype__is_ord <- function() {
self$`_dt`$is_ord()
datatype__is_temporal <- function() {
self$`_dt`$is_temporal()
}

datatype__is_known <- function() {
self$`_dt`$is_known()
datatype__is_unsigned_integer <- function() {
self$`_dt`$is_unsigned_integer()
}
Loading