ext/duckdb/prepared_statement.c in duckdb-0.9.1.1 vs ext/duckdb/prepared_statement.c in duckdb-0.9.1.2
- old
+ new
@@ -81,11 +81,11 @@
static VALUE duckdb_prepared_statement_execute(VALUE self) {
rubyDuckDBPreparedStatement *ctx;
rubyDuckDBResult *ctxr;
- VALUE result = create_result();
+ VALUE result = rbduckdb_create_result();
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
ctxr = get_struct_result(result);
if (duckdb_execute_prepared(ctx->prepared_statement, &(ctxr->result)) == DuckDBError) {
rb_raise(eDuckDBError, "%s", duckdb_result_error(&(ctxr->result)));
@@ -266,11 +266,11 @@
static VALUE duckdb_prepared_statement__bind_date(VALUE self, VALUE vidx, VALUE year, VALUE month, VALUE day) {
rubyDuckDBPreparedStatement *ctx;
duckdb_date dt;
idx_t idx = check_index(vidx);
- dt = to_duckdb_date_from_value(year, month, day);
+ dt = rbduckdb_to_duckdb_date_from_value(year, month, day);
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
if (duckdb_bind_date(ctx->prepared_statement, idx, dt) == DuckDBError) {
rb_raise(eDuckDBError, "fail to bind %llu parameter", (unsigned long long)idx);
@@ -283,11 +283,11 @@
rubyDuckDBPreparedStatement *ctx;
duckdb_time time;
idx_t idx = check_index(vidx);
- time = to_duckdb_time_from_value(hour, min, sec, micros);
+ time = rbduckdb_to_duckdb_time_from_value(hour, min, sec, micros);
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
if (duckdb_bind_time(ctx->prepared_statement, idx, time) == DuckDBError) {
rb_raise(eDuckDBError, "fail to bind %llu parameter", (unsigned long long)idx);
@@ -299,11 +299,11 @@
static VALUE duckdb_prepared_statement__bind_timestamp(VALUE self, VALUE vidx, VALUE year, VALUE month, VALUE day, VALUE hour, VALUE min, VALUE sec, VALUE micros) {
duckdb_timestamp timestamp;
rubyDuckDBPreparedStatement *ctx;
idx_t idx = check_index(vidx);
- timestamp = to_duckdb_timestamp_from_value(year, month, day, hour, min, sec, micros);
+ timestamp = rbduckdb_to_duckdb_timestamp_from_value(year, month, day, hour, min, sec, micros);
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
if (duckdb_bind_timestamp(ctx->prepared_statement, idx, timestamp) == DuckDBError) {
rb_raise(eDuckDBError, "fail to bind %llu parameter", (unsigned long long)idx);
}
@@ -315,11 +315,11 @@
rubyDuckDBPreparedStatement *ctx;
idx_t idx = check_index(vidx);
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
- to_duckdb_interval_from_value(&interval, months, days, micros);
+ rbduckdb_to_duckdb_interval_from_value(&interval, months, days, micros);
if (duckdb_bind_interval(ctx->prepared_statement, idx, interval) == DuckDBError) {
rb_raise(eDuckDBError, "fail to bind %llu parameter", (unsigned long long)idx);
}
return self;
@@ -345,10 +345,10 @@
rubyDuckDBPreparedStatement *ctx;
TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
return ctx;
}
-void init_duckdb_prepared_statement(void) {
+void rbduckdb_init_duckdb_prepared_statement(void) {
cDuckDBPreparedStatement = rb_define_class_under(mDuckDB, "PreparedStatement", rb_cObject);
rb_define_alloc_func(cDuckDBPreparedStatement, allocate);
rb_define_method(cDuckDBPreparedStatement, "initialize", duckdb_prepared_statement_initialize, 2);