Skip to content

Commit

Permalink
add DuckDB::Appender#append_end document
Browse files Browse the repository at this point in the history
  • Loading branch information
suketa committed Nov 30, 2024
1 parent 6683483 commit 3cd65d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ext/duckdb/appender.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3cd65d9

Please sign in to comment.