Skip to content

Commit

Permalink
add register for new reference function
Browse files Browse the repository at this point in the history
  • Loading branch information
Tmonster committed Sep 26, 2023
1 parent 0360655 commit b38d5e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions R/cpp11.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ rapi_unregister_arrow <- function(conn, name) {
invisible(.Call(`_duckdb_rapi_unregister_arrow`, conn, name))
}

rapi_expr_reference <- function(name, table) {
.Call(`_duckdb_rapi_expr_reference`, name, table)
rapi_expr_reference <- function(rnames) {
.Call(`_duckdb_rapi_expr_reference`, rnames)
}

rapi_expr_constant <- function(val) {
Expand Down
8 changes: 4 additions & 4 deletions src/cpp11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ extern "C" SEXP _duckdb_rapi_unregister_arrow(SEXP conn, SEXP name) {
END_CPP11
}
// relational.cpp
SEXP rapi_expr_reference(std::string name, std::string table);
extern "C" SEXP _duckdb_rapi_expr_reference(SEXP name, SEXP table) {
SEXP rapi_expr_reference(r_vector<r_string> rnames);
extern "C" SEXP _duckdb_rapi_expr_reference(SEXP rnames) {
BEGIN_CPP11
return cpp11::as_sexp(rapi_expr_reference(cpp11::as_cpp<cpp11::decay_t<std::string>>(name), cpp11::as_cpp<cpp11::decay_t<std::string>>(table)));
return cpp11::as_sexp(rapi_expr_reference(cpp11::as_cpp<cpp11::decay_t<r_vector<r_string>>>(rnames)));
END_CPP11
}
// relational.cpp
Expand Down Expand Up @@ -381,7 +381,7 @@ static const R_CallMethodDef CallEntries[] = {
{"_duckdb_rapi_execute_arrow", (DL_FUNC) &_duckdb_rapi_execute_arrow, 2},
{"_duckdb_rapi_expr_constant", (DL_FUNC) &_duckdb_rapi_expr_constant, 1},
{"_duckdb_rapi_expr_function", (DL_FUNC) &_duckdb_rapi_expr_function, 4},
{"_duckdb_rapi_expr_reference", (DL_FUNC) &_duckdb_rapi_expr_reference, 2},
{"_duckdb_rapi_expr_reference", (DL_FUNC) &_duckdb_rapi_expr_reference, 1},
{"_duckdb_rapi_expr_set_alias", (DL_FUNC) &_duckdb_rapi_expr_set_alias, 2},
{"_duckdb_rapi_expr_tostring", (DL_FUNC) &_duckdb_rapi_expr_tostring, 1},
{"_duckdb_rapi_expr_window", (DL_FUNC) &_duckdb_rapi_expr_window, 9},
Expand Down

0 comments on commit b38d5e5

Please sign in to comment.