class DuckDB::FunctionInfo
The DuckDB::FunctionInfo provides context during table function execution.
It is passed to the execute callback along with the output DataChunk.
Example:
table_function.execute do |func_info, output| # Report errors during execution func_info.set_error('Something went wrong') end
rubocop:disable Lint/EmptyClass
Public Instance Methods
Source
static VALUE rbduckdb_function_info_set_error(VALUE self, VALUE error) {
rubyDuckDBFunctionInfo *ctx;
const char *error_msg;
TypedData_Get_Struct(self, rubyDuckDBFunctionInfo, &function_info_data_type, ctx);
error_msg = StringValueCStr(error);
duckdb_function_set_error(ctx->info, error_msg);
return self;
}
Sets an error message for the function execution. This will cause the query to fail with the specified error.
function_info.set_error('Invalid parameter value')