@@ -10,19 +10,19 @@ static VALUE cDuckDBResult;
1010static void deallocate (void * ctx );
1111static VALUE allocate (VALUE klass );
1212static size_t memsize (const void * p );
13- static VALUE duckdb_result_column_count (VALUE oDuckDBResult );
14- static VALUE duckdb_result_rows_changed (VALUE oDuckDBResult );
15- static VALUE duckdb_result_columns (VALUE oDuckDBResult );
13+ static VALUE result_column_count (VALUE oDuckDBResult );
14+ static VALUE result_rows_changed (VALUE oDuckDBResult );
15+ static VALUE result_columns (VALUE oDuckDBResult );
1616static VALUE destroy_data_chunk (VALUE arg );
1717
18- static VALUE duckdb_result__chunk_stream (VALUE oDuckDBResult );
18+ static VALUE result__chunk_stream (VALUE oDuckDBResult );
1919static VALUE yield_rows (VALUE arg );
20- static VALUE duckdb_result__column_type (VALUE oDuckDBResult , VALUE col_idx );
21- static VALUE duckdb_result__return_type (VALUE oDuckDBResult );
22- static VALUE duckdb_result__statement_type (VALUE oDuckDBResult );
23- static VALUE duckdb_result__enum_internal_type (VALUE oDuckDBResult , VALUE col_idx );
24- static VALUE duckdb_result__enum_dictionary_size (VALUE oDuckDBResult , VALUE col_idx );
25- static VALUE duckdb_result__enum_dictionary_value (VALUE oDuckDBResult , VALUE col_idx , VALUE idx );
20+ static VALUE result__column_type (VALUE oDuckDBResult , VALUE col_idx );
21+ static VALUE result__return_type (VALUE oDuckDBResult );
22+ static VALUE result__statement_type (VALUE oDuckDBResult );
23+ static VALUE result__enum_internal_type (VALUE oDuckDBResult , VALUE col_idx );
24+ static VALUE result__enum_dictionary_size (VALUE oDuckDBResult , VALUE col_idx );
25+ static VALUE result__enum_dictionary_value (VALUE oDuckDBResult , VALUE col_idx , VALUE idx );
2626
2727static VALUE vector_date (void * vector_data , idx_t row_idx );
2828static VALUE vector_timestamp (void * vector_data , idx_t row_idx );
@@ -72,7 +72,7 @@ static size_t memsize(const void *p) {
7272 return sizeof (rubyDuckDBResult );
7373}
7474
75- rubyDuckDBResult * get_struct_result (VALUE obj ) {
75+ rubyDuckDBResult * rbduckdb_get_struct_result (VALUE obj ) {
7676 rubyDuckDBResult * ctx ;
7777 TypedData_Get_Struct (obj , rubyDuckDBResult , & result_data_type , ctx );
7878 return ctx ;
@@ -100,7 +100,7 @@ rubyDuckDBResult *get_struct_result(VALUE obj) {
100100 * end
101101 *
102102 */
103- static VALUE duckdb_result_rows_changed (VALUE oDuckDBResult ) {
103+ static VALUE result_rows_changed (VALUE oDuckDBResult ) {
104104 rubyDuckDBResult * ctx ;
105105 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
106106 return LL2NUM (duckdb_rows_changed (& (ctx -> result )));
@@ -124,7 +124,7 @@ static VALUE duckdb_result_rows_changed(VALUE oDuckDBResult) {
124124 * end
125125 *
126126 */
127- static VALUE duckdb_result_column_count (VALUE oDuckDBResult ) {
127+ static VALUE result_column_count (VALUE oDuckDBResult ) {
128128 rubyDuckDBResult * ctx ;
129129 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
130130 return LL2NUM (duckdb_column_count (& (ctx -> result )));
@@ -137,7 +137,7 @@ static VALUE duckdb_result_column_count(VALUE oDuckDBResult) {
137137 * Returns the column class Lists.
138138 *
139139 */
140- static VALUE duckdb_result_columns (VALUE oDuckDBResult ) {
140+ static VALUE result_columns (VALUE oDuckDBResult ) {
141141 rubyDuckDBResult * ctx ;
142142 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
143143
@@ -159,7 +159,7 @@ static VALUE destroy_data_chunk(VALUE arg) {
159159}
160160
161161/* :nodoc: */
162- static VALUE duckdb_result__chunk_stream (VALUE oDuckDBResult ) {
162+ static VALUE result__chunk_stream (VALUE oDuckDBResult ) {
163163 rubyDuckDBResult * ctx ;
164164 struct chunk_arg arg ;
165165
@@ -199,28 +199,28 @@ static VALUE yield_rows(VALUE arg) {
199199}
200200
201201/* :nodoc: */
202- static VALUE duckdb_result__column_type (VALUE oDuckDBResult , VALUE col_idx ) {
202+ static VALUE result__column_type (VALUE oDuckDBResult , VALUE col_idx ) {
203203 rubyDuckDBResult * ctx ;
204204 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
205205 return LL2NUM (duckdb_column_type (& (ctx -> result ), NUM2LL (col_idx )));
206206}
207207
208208/* :nodoc: */
209- static VALUE duckdb_result__return_type (VALUE oDuckDBResult ) {
209+ static VALUE result__return_type (VALUE oDuckDBResult ) {
210210 rubyDuckDBResult * ctx ;
211211 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
212212 return INT2FIX (duckdb_result_return_type (ctx -> result ));
213213}
214214
215215/* :nodoc: */
216- static VALUE duckdb_result__statement_type (VALUE oDuckDBResult ) {
216+ static VALUE result__statement_type (VALUE oDuckDBResult ) {
217217 rubyDuckDBResult * ctx ;
218218 TypedData_Get_Struct (oDuckDBResult , rubyDuckDBResult , & result_data_type , ctx );
219219 return INT2FIX (duckdb_result_statement_type (ctx -> result ));
220220}
221221
222222/* :nodoc: */
223- static VALUE duckdb_result__enum_internal_type (VALUE oDuckDBResult , VALUE col_idx ) {
223+ static VALUE result__enum_internal_type (VALUE oDuckDBResult , VALUE col_idx ) {
224224 rubyDuckDBResult * ctx ;
225225 VALUE type = Qnil ;
226226 duckdb_logical_type logical_type ;
@@ -235,7 +235,7 @@ static VALUE duckdb_result__enum_internal_type(VALUE oDuckDBResult, VALUE col_id
235235}
236236
237237/* :nodoc: */
238- static VALUE duckdb_result__enum_dictionary_size (VALUE oDuckDBResult , VALUE col_idx ) {
238+ static VALUE result__enum_dictionary_size (VALUE oDuckDBResult , VALUE col_idx ) {
239239 rubyDuckDBResult * ctx ;
240240 VALUE size = Qnil ;
241241 duckdb_logical_type logical_type ;
@@ -250,7 +250,7 @@ static VALUE duckdb_result__enum_dictionary_size(VALUE oDuckDBResult, VALUE col_
250250}
251251
252252/* :nodoc: */
253- static VALUE duckdb_result__enum_dictionary_value (VALUE oDuckDBResult , VALUE col_idx , VALUE idx ) {
253+ static VALUE result__enum_dictionary_value (VALUE oDuckDBResult , VALUE col_idx , VALUE idx ) {
254254 rubyDuckDBResult * ctx ;
255255 VALUE value = Qnil ;
256256 duckdb_logical_type logical_type ;
@@ -706,23 +706,23 @@ static VALUE vector_value(duckdb_vector vector, idx_t row_idx) {
706706 return obj ;
707707}
708708
709- void rbduckdb_init_duckdb_result (void ) {
709+ void rbduckdb_init_result (void ) {
710710#if 0
711711 VALUE mDuckDB = rb_define_module ("DuckDB" );
712712#endif
713713 cDuckDBResult = rb_define_class_under (mDuckDB , "Result" , rb_cObject );
714714
715715 rb_define_alloc_func (cDuckDBResult , allocate );
716716
717- rb_define_method (cDuckDBResult , "column_count" , duckdb_result_column_count , 0 );
718- rb_define_method (cDuckDBResult , "rows_changed" , duckdb_result_rows_changed , 0 );
719- rb_define_method (cDuckDBResult , "columns" , duckdb_result_columns , 0 );
720- rb_define_private_method (cDuckDBResult , "_chunk_stream" , duckdb_result__chunk_stream , 0 );
721- rb_define_private_method (cDuckDBResult , "_column_type" , duckdb_result__column_type , 1 );
722- rb_define_private_method (cDuckDBResult , "_return_type" , duckdb_result__return_type , 0 );
723- rb_define_private_method (cDuckDBResult , "_statement_type" , duckdb_result__statement_type , 0 );
724-
725- rb_define_private_method (cDuckDBResult , "_enum_internal_type" , duckdb_result__enum_internal_type , 1 );
726- rb_define_private_method (cDuckDBResult , "_enum_dictionary_size" , duckdb_result__enum_dictionary_size , 1 );
727- rb_define_private_method (cDuckDBResult , "_enum_dictionary_value" , duckdb_result__enum_dictionary_value , 2 );
717+ rb_define_method (cDuckDBResult , "column_count" , result_column_count , 0 );
718+ rb_define_method (cDuckDBResult , "rows_changed" , result_rows_changed , 0 );
719+ rb_define_method (cDuckDBResult , "columns" , result_columns , 0 );
720+ rb_define_private_method (cDuckDBResult , "_chunk_stream" , result__chunk_stream , 0 );
721+ rb_define_private_method (cDuckDBResult , "_column_type" , result__column_type , 1 );
722+ rb_define_private_method (cDuckDBResult , "_return_type" , result__return_type , 0 );
723+ rb_define_private_method (cDuckDBResult , "_statement_type" , result__statement_type , 0 );
724+
725+ rb_define_private_method (cDuckDBResult , "_enum_internal_type" , result__enum_internal_type , 1 );
726+ rb_define_private_method (cDuckDBResult , "_enum_dictionary_size" , result__enum_dictionary_size , 1 );
727+ rb_define_private_method (cDuckDBResult , "_enum_dictionary_value" , result__enum_dictionary_value , 2 );
728728}
0 commit comments