Skip to content

Commit 3f0d02c

Browse files
authored
Merge pull request suketa#834 from suketa/appender_doc_boolean
add append_bool document.
2 parents c48ac6e + 7ad1de7 commit 3f0d02c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ext/duckdb/appender.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,23 @@ static VALUE appender_end_row(VALUE self) {
136136
return self;
137137
}
138138

139+
/* call-seq:
140+
* appender.append_bool(val) -> self
141+
*
142+
* Appends a boolean value to the current row in the appender.
143+
*
144+
* require 'duckdb'
145+
* db = DuckDB::Database.open
146+
* con = db.connect
147+
* con.query('CREATE TABLE users (id INTEGER, active BOOLEAN)')
148+
* appender = con.appender('users')
149+
* appender
150+
* .begin_row
151+
* .append_int32(1)
152+
* .append_bool(true)
153+
* .end_row
154+
* .flush
155+
*/
139156
static VALUE appender_append_bool(VALUE self, VALUE val) {
140157
rubyDuckDBAppender *ctx;
141158
TypedData_Get_Struct(self, rubyDuckDBAppender, &appender_data_type, ctx);

0 commit comments

Comments
 (0)