ext/duckdb/connection.c in duckdb-0.3.1.0 vs ext/duckdb/connection.c in duckdb-0.3.2.0
- old
+ new
@@ -76,16 +76,15 @@
if (!(ctx->con)) {
rb_raise(eDuckDBError, "Database connection closed");
}
if (duckdb_query(ctx->con, StringValueCStr(str), &(ctxr->result)) == DuckDBError) {
- rb_raise(eDuckDBError, "%s", ctxr->result.error_message);
+ rb_raise(eDuckDBError, "%s", duckdb_result_error(&(ctxr->result)));
}
return result;
}
-void init_duckdb_connection(void)
-{
+void init_duckdb_connection(void) {
cDuckDBConnection = rb_define_class_under(mDuckDB, "Connection", rb_cObject);
rb_define_alloc_func(cDuckDBConnection, allocate);
rb_define_method(cDuckDBConnection, "disconnect", duckdb_connection_disconnect, 0);
rb_define_private_method(cDuckDBConnection, "_connect", duckdb_connection_connect, 1);