# Generated by cpp11: do not edit by hand

rapi_connect <- function(dual, convert_opts) {
  .Call(`_duckdb_rapi_connect`, dual, convert_opts)
}

rapi_disconnect <- function(conn) {
  invisible(.Call(`_duckdb_rapi_disconnect`, conn))
}

rapi_connection_valid <- function(conn) {
  .Call(`_duckdb_rapi_connection_valid`, conn)
}

rapi_startup <- function(dbdir, readonly, configsexp, environment_scan) {
  .Call(`_duckdb_rapi_startup`, dbdir, readonly, configsexp, environment_scan)
}

rapi_lock <- function(dual) {
  .Call(`_duckdb_rapi_lock`, dual)
}

rapi_unlock <- function(dual) {
  invisible(.Call(`_duckdb_rapi_unlock`, dual))
}

rapi_is_locked <- function(dual) {
  .Call(`_duckdb_rapi_is_locked`, dual)
}

rapi_shutdown <- function(dbsexp) {
  invisible(.Call(`_duckdb_rapi_shutdown`, dbsexp))
}

rapi_register_df <- function(conn, name, value, convert_opts, overwrite) {
  invisible(.Call(`_duckdb_rapi_register_df`, conn, name, value, convert_opts, overwrite))
}

rapi_unregister_df <- function(conn, name) {
  invisible(.Call(`_duckdb_rapi_unregister_df`, conn, name))
}

rapi_register_arrow <- function(conn, name, export_funs, valuesexp) {
  invisible(.Call(`_duckdb_rapi_register_arrow`, conn, name, export_funs, valuesexp))
}

rapi_unregister_arrow <- function(conn, name) {
  invisible(.Call(`_duckdb_rapi_unregister_arrow`, conn, name))
}

rapi_list_arrow <- function(conn) {
  .Call(`_duckdb_rapi_list_arrow`, conn)
}

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

rapi_expr_constant <- function(val, alias, convert_opts) {
  .Call(`_duckdb_rapi_expr_constant`, val, alias, convert_opts)
}

rapi_expr_operator <- function(op, exprs, alias) {
  .Call(`_duckdb_rapi_expr_operator`, op, exprs, alias)
}

rapi_expr_comparison <- function(cmp_op, exprs, alias) {
  .Call(`_duckdb_rapi_expr_comparison`, cmp_op, exprs, alias)
}

rapi_expr_function <- function(name, args, order_bys, filter_bys, alias) {
  .Call(`_duckdb_rapi_expr_function`, name, args, order_bys, filter_bys, alias)
}

rapi_expr_set_alias <- function(expr, alias) {
  invisible(.Call(`_duckdb_rapi_expr_set_alias`, expr, alias))
}

rapi_expr_tostring <- function(expr) {
  .Call(`_duckdb_rapi_expr_tostring`, expr)
}

rapi_get_null_SEXP_ptr <- function() {
  .Call(`_duckdb_rapi_get_null_SEXP_ptr`)
}

rapi_rel_from_df <- function(con, df, convert_opts) {
  .Call(`_duckdb_rapi_rel_from_df`, con, df, convert_opts)
}

rapi_rel_to_df <- function(rel) {
  .Call(`_duckdb_rapi_rel_to_df`, rel)
}

rapi_rel_sql <- function(rel, sql) {
  .Call(`_duckdb_rapi_rel_sql`, rel, sql)
}

rapi_rel_names <- function(rel) {
  .Call(`_duckdb_rapi_rel_names`, rel)
}

rapi_rel_alias <- function(rel) {
  .Call(`_duckdb_rapi_rel_alias`, rel)
}

rapi_rel_set_alias <- function(rel, alias) {
  .Call(`_duckdb_rapi_rel_set_alias`, rel, alias)
}

rapi_rel_filter <- function(rel, exprs) {
  .Call(`_duckdb_rapi_rel_filter`, rel, exprs)
}

rapi_rel_project <- function(rel, exprs) {
  .Call(`_duckdb_rapi_rel_project`, rel, exprs)
}

rapi_rel_aggregate <- function(rel, groups, aggregates) {
  .Call(`_duckdb_rapi_rel_aggregate`, rel, groups, aggregates)
}

rapi_rel_order <- function(rel, orders, ascending, nulls_first) {
  .Call(`_duckdb_rapi_rel_order`, rel, orders, ascending, nulls_first)
}

rapi_expr_window <- function(window_function, partitions, order_bys, window_boundary_start, window_boundary_end, start_expr, end_expr, offset_expr, default_expr, alias, ascending, nulls_first) {
  .Call(`_duckdb_rapi_expr_window`, window_function, partitions, order_bys, window_boundary_start, window_boundary_end, start_expr, end_expr, offset_expr, default_expr, alias, ascending, nulls_first)
}

rapi_rel_join <- function(left, right, conds, join, join_ref_type) {
  .Call(`_duckdb_rapi_rel_join`, left, right, conds, join, join_ref_type)
}

rapi_rel_union_all <- function(rel_a, rel_b) {
  .Call(`_duckdb_rapi_rel_union_all`, rel_a, rel_b)
}

rapi_rel_limit <- function(rel, n) {
  .Call(`_duckdb_rapi_rel_limit`, rel, n)
}

rapi_rel_distinct <- function(rel) {
  .Call(`_duckdb_rapi_rel_distinct`, rel)
}

rapi_rel_set_intersect <- function(rel_a, rel_b) {
  .Call(`_duckdb_rapi_rel_set_intersect`, rel_a, rel_b)
}

rapi_rel_set_diff <- function(rel_a, rel_b) {
  .Call(`_duckdb_rapi_rel_set_diff`, rel_a, rel_b)
}

rapi_rel_set_symdiff <- function(rel_a, rel_b) {
  .Call(`_duckdb_rapi_rel_set_symdiff`, rel_a, rel_b)
}

rapi_rel_from_sql <- function(con, sql, env) {
  .Call(`_duckdb_rapi_rel_from_sql`, con, sql, env)
}

rapi_rel_from_table <- function(con, schema_name, table_name) {
  .Call(`_duckdb_rapi_rel_from_table`, con, schema_name, table_name)
}

rapi_rel_from_table_function <- function(con, function_name, positional_parameters_sexps, named_parameters_sexps) {
  .Call(`_duckdb_rapi_rel_from_table_function`, con, function_name, positional_parameters_sexps, named_parameters_sexps)
}

rapi_rel_tostring <- function(rel, format) {
  .Call(`_duckdb_rapi_rel_tostring`, rel, format)
}

rapi_rel_to_sql <- function(rel) {
  .Call(`_duckdb_rapi_rel_to_sql`, rel)
}

rapi_rel_explain <- function(rel, type, format) {
  .Call(`_duckdb_rapi_rel_explain`, rel, type, format)
}

rapi_rel_to_parquet <- function(rel, file_name, options_sexps) {
  invisible(.Call(`_duckdb_rapi_rel_to_parquet`, rel, file_name, options_sexps))
}

rapi_rel_to_csv <- function(rel, file_name, options_sexps) {
  invisible(.Call(`_duckdb_rapi_rel_to_csv`, rel, file_name, options_sexps))
}

rapi_rel_to_table <- function(rel, schema_name, table_name, temporary) {
  invisible(.Call(`_duckdb_rapi_rel_to_table`, rel, schema_name, table_name, temporary))
}

rapi_rel_to_view <- function(rel, schema_name, view_name, temporary) {
  invisible(.Call(`_duckdb_rapi_rel_to_view`, rel, schema_name, view_name, temporary))
}

rapi_rel_insert <- function(rel, schema_name, table_name) {
  invisible(.Call(`_duckdb_rapi_rel_insert`, rel, schema_name, table_name))
}

rapi_rel_to_altrep <- function(rel, n_rows, n_cells) {
  .Call(`_duckdb_rapi_rel_to_altrep`, rel, n_rows, n_cells)
}

rapi_rel_from_altrep_df <- function(df, strict, allow_materialized, wrap) {
  .Call(`_duckdb_rapi_rel_from_altrep_df`, df, strict, allow_materialized, wrap)
}

rapi_release <- function(stmt) {
  invisible(.Call(`_duckdb_rapi_release`, stmt))
}

rapi_prepare <- function(conn, query, env) {
  .Call(`_duckdb_rapi_prepare`, conn, query, env)
}

rapi_bind <- function(stmt, params, convert_opts) {
  .Call(`_duckdb_rapi_bind`, stmt, params, convert_opts)
}

rapi_execute_arrow <- function(qry_res, chunk_size) {
  .Call(`_duckdb_rapi_execute_arrow`, qry_res, chunk_size)
}

rapi_fetch_arrow_stream_into <- function(qry_res, stream_xptr, chunk_size) {
  invisible(.Call(`_duckdb_rapi_fetch_arrow_stream_into`, qry_res, stream_xptr, chunk_size))
}

rapi_fetch_arrow_array <- function(qry_res, array_xptr, schema_xptr, chunk_size) {
  .Call(`_duckdb_rapi_fetch_arrow_array`, qry_res, array_xptr, schema_xptr, chunk_size)
}

rapi_record_batch <- function(qry_res, chunk_size) {
  .Call(`_duckdb_rapi_record_batch`, qry_res, chunk_size)
}

rapi_execute <- function(stmt, convert_opts) {
  .Call(`_duckdb_rapi_execute`, stmt, convert_opts)
}

rapi_adbc_init_func <- function() {
  .Call(`_duckdb_rapi_adbc_init_func`)
}

rapi_ptr_to_str <- function(extptr) {
  .Call(`_duckdb_rapi_ptr_to_str`, extptr)
}

rapi_load_rfuns <- function(dual) {
  invisible(.Call(`_duckdb_rapi_load_rfuns`, dual))
}
