-
-
Notifications
You must be signed in to change notification settings - Fork 33
Rename DuckDB::TableFunction bind data accessors to Ruby style #1439
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ VALUE cDuckDBTableFunctionFunctionInfo; | |
| static void deallocate(void *ctx); | ||
| static VALUE allocate(VALUE klass); | ||
| static size_t memsize(const void *p); | ||
| static VALUE table_function_function_info_get_bind_data(VALUE self); | ||
| static VALUE table_function_function_info_bind_data(VALUE self); | ||
| static VALUE table_function_function_info_set_error(VALUE self, VALUE error); | ||
|
|
||
| static const rb_data_type_t function_info_data_type = { | ||
|
|
@@ -36,14 +36,14 @@ rubyDuckDBFunctionInfo *rbduckdb_get_struct_function_info(VALUE obj) { | |
|
|
||
| /* | ||
| * call-seq: | ||
| * function_info.get_bind_data -> object or nil | ||
| * function_info.bind_data -> object or nil | ||
| * | ||
| * Returns the object stored during the bind phase with | ||
| * DuckDB::TableFunction::BindInfo#set_bind_data, or nil if none was set. | ||
| * DuckDB::TableFunction::BindInfo#bind_data=, or nil if none was set. | ||
| * | ||
| * data = function_info.get_bind_data | ||
| * data = function_info.bind_data | ||
| */ | ||
| static VALUE table_function_function_info_get_bind_data(VALUE self) { | ||
| static VALUE table_function_function_info_bind_data(VALUE self) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win Prefix both renamed C helpers with The Ruby API rename is consistent. The renamed C symbols still use
As per coding guidelines, all C symbols in 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| rubyDuckDBFunctionInfo *ctx; | ||
| void *bind_data; | ||
|
|
||
|
|
@@ -82,6 +82,6 @@ void rbduckdb_init_table_function_function_info(void) { | |
| cDuckDBTableFunctionFunctionInfo = rb_define_class_under(cDuckDBTableFunction, "FunctionInfo", rb_cObject); | ||
| rb_define_alloc_func(cDuckDBTableFunctionFunctionInfo, allocate); | ||
|
|
||
| rb_define_method(cDuckDBTableFunctionFunctionInfo, "get_bind_data", table_function_function_info_get_bind_data, 0); | ||
| rb_define_method(cDuckDBTableFunctionFunctionInfo, "bind_data", table_function_function_info_bind_data, 0); | ||
| rb_define_method(cDuckDBTableFunctionFunctionInfo, "set_error", table_function_function_info_set_error, 1); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change these entries into Braking changes section?