diff --git a/ext/duckdb/appender.c b/ext/duckdb/appender.c index 4f2ba41..4eac500 100644 --- a/ext/duckdb/appender.c +++ b/ext/duckdb/appender.c @@ -109,6 +109,23 @@ static VALUE appender_begin_row(VALUE self) { return self; } +/* call-seq: + * appender.begin_row -> self + * + * Ends a row in the appender. This must be called before starting new row. + * + * require 'duckdb' + * db = DuckDB::Database.open + * con = db.connect + * con.query('CREATE TABLE users (id INTEGER, name VARCHAR)') + * appender = con.appender('users') + * appender + * .begin_row + * .append_int32(1) + * .append_varchar('Alice') + * .end_row + * .flush + */ static VALUE appender_end_row(VALUE self) { rubyDuckDBAppender *ctx; TypedData_Get_Struct(self, rubyDuckDBAppender, &appender_data_type, ctx);