R/rethrow-gen.R

Defines functions rethrow_restore rethrow_rapi_load_rfuns rethrow_rapi_ptr_to_str rethrow_rapi_adbc_init_func rethrow_rapi_rel_to_parquet rethrow_rapi_execute rethrow_rapi_record_batch rethrow_rapi_execute_arrow rethrow_rapi_bind rethrow_rapi_prepare rethrow_rapi_prepare_substrait_json rethrow_rapi_prepare_substrait rethrow_rapi_get_substrait_json rethrow_rapi_get_substrait rethrow_rapi_release rethrow_rapi_rel_from_altrep_df rethrow_rapi_rel_to_altrep rethrow_rapi_get_last_rel rethrow_rapi_rel_from_table_function rethrow_rapi_rel_from_table rethrow_rapi_rel_from_sql rethrow_rapi_rel_set_symdiff rethrow_rapi_rel_set_diff rethrow_rapi_rel_set_intersect rethrow_rapi_rel_names rethrow_rapi_rel_sql rethrow_rapi_rel_set_alias rethrow_rapi_get_null_SEXP_ptr rethrow_rapi_rel_alias rethrow_rapi_rel_explain rethrow_rapi_rel_to_sql rethrow_rapi_rel_tostring rethrow_rapi_rel_to_df rethrow_rapi_rel_distinct rethrow_rapi_rel_limit rethrow_rapi_rel_union_all rethrow_rapi_rel_join rethrow_rapi_expr_window rethrow_rapi_rel_order rethrow_rapi_rel_aggregate rethrow_rapi_rel_project rethrow_rapi_rel_filter rethrow_rapi_rel_from_df rethrow_rapi_expr_tostring rethrow_rapi_expr_set_alias rethrow_rapi_expr_function rethrow_rapi_expr_comparison rethrow_rapi_expr_constant rethrow_rapi_expr_reference rethrow_rapi_list_arrow rethrow_rapi_unregister_arrow rethrow_rapi_register_arrow rethrow_rapi_unregister_df rethrow_rapi_register_df rethrow_rapi_shutdown rethrow_rapi_is_locked rethrow_rapi_unlock rethrow_rapi_lock rethrow_rapi_startup rethrow_rapi_disconnect rethrow_rapi_connect

# Generated by helper-rethrow.R, do not edit by hand

rethrow_rapi_connect <- function(dual, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_connect(dual),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_disconnect <- function(conn, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_disconnect(conn),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_startup <- function(dbdir, readonly, configsexp, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_startup(dbdir, readonly, configsexp),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_lock <- function(dual, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_lock(dual),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_unlock <- function(dual, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_unlock(dual),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_is_locked <- function(dual, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_is_locked(dual),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_shutdown <- function(dbsexp, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_shutdown(dbsexp),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_register_df <- function(conn, name, value, integer64, overwrite, experimental, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_register_df(conn, name, value, integer64, overwrite, experimental),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_unregister_df <- function(conn, name, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_unregister_df(conn, name),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_register_arrow <- function(conn, name, export_funs, valuesexp, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_register_arrow(conn, name, export_funs, valuesexp),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_unregister_arrow <- function(conn, name, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_unregister_arrow(conn, name),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_list_arrow <- function(conn, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_list_arrow(conn),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_reference <- function(rnames, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_reference(rnames),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_constant <- function(val, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_constant(val),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_comparison <- function(exprs, cmp_op, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_comparison(exprs, cmp_op),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_function <- function(name, args, order_bys, filter_bys, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_function(name, args, order_bys, filter_bys),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_set_alias <- function(expr, alias, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_set_alias(expr, alias),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_tostring <- function(expr, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_tostring(expr),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_from_df <- function(con, df, experimental, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_from_df(con, df, experimental),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_filter <- function(rel, exprs, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_filter(rel, exprs),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_project <- function(rel, exprs, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_project(rel, exprs),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_aggregate <- function(rel, groups, aggregates, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_aggregate(rel, groups, aggregates),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_order <- function(rel, orders, ascending, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_order(rel, orders, ascending),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_expr_window <- function(window_function, partitions, order_bys, window_boundary_start, window_boundary_end, start_expr, end_expr, offset_expr, default_expr, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_expr_window(window_function, partitions, order_bys, window_boundary_start, window_boundary_end, start_expr, end_expr, offset_expr, default_expr),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_join <- function(left, right, conds, join, join_ref_type, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_join(left, right, conds, join, join_ref_type),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_union_all <- function(rel_a, rel_b, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_union_all(rel_a, rel_b),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_limit <- function(rel, n, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_limit(rel, n),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_distinct <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_distinct(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_to_df <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_to_df(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_tostring <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_tostring(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_to_sql <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_to_sql(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_explain <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_explain(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_alias <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_alias(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_get_null_SEXP_ptr <- function(call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_get_null_SEXP_ptr(),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_set_alias <- function(rel, alias, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_set_alias(rel, alias),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_sql <- function(rel, sql, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_sql(rel, sql),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_names <- function(rel, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_names(rel),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_set_intersect <- function(rel_a, rel_b, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_set_intersect(rel_a, rel_b),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_set_diff <- function(rel_a, rel_b, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_set_diff(rel_a, rel_b),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_set_symdiff <- function(rel_a, rel_b, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_set_symdiff(rel_a, rel_b),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_from_sql <- function(con, sql, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_from_sql(con, sql),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_from_table <- function(con, schema_name, table_name, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_from_table(con, schema_name, table_name),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_from_table_function <- function(con, function_name, positional_parameters_sexps, named_parameters_sexps, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_from_table_function(con, function_name, positional_parameters_sexps, named_parameters_sexps),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_get_last_rel <- function(call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_get_last_rel(),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_to_altrep <- function(rel, allow_materialization = TRUE, call = parent.frame(2)) {
  rlang::try_fetch(
    # duckplyr compat
    rapi_rel_to_altrep(rel, allow_materialization),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_from_altrep_df <- function(df, strict, allow_materialized, enable_materialization, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_from_altrep_df(df, strict, allow_materialized, enable_materialization),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_release <- function(stmt, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_release(stmt),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_get_substrait <- function(conn, query, enable_optimizer, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_get_substrait(conn, query, enable_optimizer),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_get_substrait_json <- function(conn, query, enable_optimizer, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_get_substrait_json(conn, query, enable_optimizer),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_prepare_substrait <- function(conn, query, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_prepare_substrait(conn, query),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_prepare_substrait_json <- function(conn, json, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_prepare_substrait_json(conn, json),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_prepare <- function(conn, query, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_prepare(conn, query),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_bind <- function(stmt, params, arrow, integer64, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_bind(stmt, params, arrow, integer64),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_execute_arrow <- function(qry_res, chunk_size, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_execute_arrow(qry_res, chunk_size),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_record_batch <- function(qry_res, chunk_size, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_record_batch(qry_res, chunk_size),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_execute <- function(stmt, arrow, integer64, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_execute(stmt, arrow, integer64),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_rel_to_parquet <- function(rel, file_name, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_rel_to_parquet(rel, file_name),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_adbc_init_func <- function(call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_adbc_init_func(),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_ptr_to_str <- function(extptr, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_ptr_to_str(extptr),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_rapi_load_rfuns <- function(dual, call = parent.frame(2)) {
  rlang::try_fetch(
    rapi_load_rfuns(dual),
    error = function(e) {
      rethrow_error_from_rapi(e, call)
    }
  )
}

rethrow_restore <- function() {
  rethrow_rapi_connect <<- rapi_connect
  rethrow_rapi_disconnect <<- rapi_disconnect
  rethrow_rapi_startup <<- rapi_startup
  rethrow_rapi_lock <<- rapi_lock
  rethrow_rapi_unlock <<- rapi_unlock
  rethrow_rapi_is_locked <<- rapi_is_locked
  rethrow_rapi_shutdown <<- rapi_shutdown
  rethrow_rapi_register_df <<- rapi_register_df
  rethrow_rapi_unregister_df <<- rapi_unregister_df
  rethrow_rapi_register_arrow <<- rapi_register_arrow
  rethrow_rapi_unregister_arrow <<- rapi_unregister_arrow
  rethrow_rapi_list_arrow <<- rapi_list_arrow
  rethrow_rapi_expr_reference <<- rapi_expr_reference
  rethrow_rapi_expr_constant <<- rapi_expr_constant
  rethrow_rapi_expr_comparison <<- rapi_expr_comparison
  rethrow_rapi_expr_function <<- rapi_expr_function
  rethrow_rapi_expr_set_alias <<- rapi_expr_set_alias
  rethrow_rapi_expr_tostring <<- rapi_expr_tostring
  rethrow_rapi_rel_from_df <<- rapi_rel_from_df
  rethrow_rapi_rel_filter <<- rapi_rel_filter
  rethrow_rapi_rel_project <<- rapi_rel_project
  rethrow_rapi_rel_aggregate <<- rapi_rel_aggregate
  rethrow_rapi_rel_order <<- rapi_rel_order
  rethrow_rapi_expr_window <<- rapi_expr_window
  rethrow_rapi_rel_join <<- rapi_rel_join
  rethrow_rapi_rel_union_all <<- rapi_rel_union_all
  rethrow_rapi_rel_limit <<- rapi_rel_limit
  rethrow_rapi_rel_distinct <<- rapi_rel_distinct
  rethrow_rapi_rel_to_df <<- rapi_rel_to_df
  rethrow_rapi_rel_tostring <<- rapi_rel_tostring
  rethrow_rapi_rel_to_sql <<- rapi_rel_to_sql
  rethrow_rapi_rel_explain <<- rapi_rel_explain
  rethrow_rapi_rel_alias <<- rapi_rel_alias
  rethrow_rapi_get_null_SEXP_ptr <<- rapi_get_null_SEXP_ptr
  rethrow_rapi_rel_set_alias <<- rapi_rel_set_alias
  rethrow_rapi_rel_sql <<- rapi_rel_sql
  rethrow_rapi_rel_names <<- rapi_rel_names
  rethrow_rapi_rel_set_intersect <<- rapi_rel_set_intersect
  rethrow_rapi_rel_set_diff <<- rapi_rel_set_diff
  rethrow_rapi_rel_set_symdiff <<- rapi_rel_set_symdiff
  rethrow_rapi_rel_from_sql <<- rapi_rel_from_sql
  rethrow_rapi_rel_from_table <<- rapi_rel_from_table
  rethrow_rapi_rel_from_table_function <<- rapi_rel_from_table_function
  rethrow_rapi_get_last_rel <<- rapi_get_last_rel
  rethrow_rapi_rel_to_altrep <<- rapi_rel_to_altrep
  rethrow_rapi_rel_from_altrep_df <<- rapi_rel_from_altrep_df
  rethrow_rapi_release <<- rapi_release
  rethrow_rapi_get_substrait <<- rapi_get_substrait
  rethrow_rapi_get_substrait_json <<- rapi_get_substrait_json
  rethrow_rapi_prepare_substrait <<- rapi_prepare_substrait
  rethrow_rapi_prepare_substrait_json <<- rapi_prepare_substrait_json
  rethrow_rapi_prepare <<- rapi_prepare
  rethrow_rapi_bind <<- rapi_bind
  rethrow_rapi_execute_arrow <<- rapi_execute_arrow
  rethrow_rapi_record_batch <<- rapi_record_batch
  rethrow_rapi_execute <<- rapi_execute
  rethrow_rapi_rel_to_parquet <<- rapi_rel_to_parquet
  rethrow_rapi_adbc_init_func <<- rapi_adbc_init_func
  rethrow_rapi_ptr_to_str <<- rapi_ptr_to_str
  rethrow_rapi_load_rfuns <<- rapi_load_rfuns
}

Try the duckdb package in your browser

Any scripts or data that you put into this service are public.

duckdb documentation built on Oct. 30, 2024, 5:06 p.m.