ext/duckdb/connection.c in duckdb-0.10.1.0 vs ext/duckdb/connection.c in duckdb-0.10.1.1
- old
+ new
@@ -4,16 +4,12 @@
static void deallocate(void *ctx);
static VALUE allocate(VALUE klass);
static size_t memsize(const void *p);
static VALUE duckdb_connection_disconnect(VALUE self);
-
-#ifdef HAVE_DUCKDB_H_GE_V090
static VALUE duckdb_connection_interrupt(VALUE self);
static VALUE duckdb_connection_query_progress(VALUE self);
-#endif
-
static VALUE duckdb_connection_connect(VALUE self, VALUE oDuckDBDatabase);
static VALUE duckdb_connection_query_sql(VALUE self, VALUE str);
static const rb_data_type_t connection_data_type = {
"DuckDB/Connection",
@@ -67,11 +63,10 @@
duckdb_disconnect(&(ctx->con));
return self;
}
-#ifdef HAVE_DUCKDB_H_GE_V090
/*
* call-seq:
* connection.interrupt -> nil
*
* Interrupts the currently running query.
@@ -124,11 +119,10 @@
return rb_funcall(mDuckDBConverter, rb_intern("_to_query_progress"), 3, DBL2NUM(progress.percentage), ULL2NUM(progress.rows_processed), ULL2NUM(progress.total_rows_to_process));
#else
return DBL2NUM(progress);
#endif
}
-#endif
static VALUE duckdb_connection_connect(VALUE self, VALUE oDuckDBDatabase) {
rubyDuckDBConnection *ctx;
rubyDuckDB *ctxdb;
@@ -167,12 +161,10 @@
void rbduckdb_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);
-#ifdef HAVE_DUCKDB_H_GE_V090
rb_define_method(cDuckDBConnection, "interrupt", duckdb_connection_interrupt, 0);
rb_define_method(cDuckDBConnection, "query_progress", duckdb_connection_query_progress, 0);
-#endif
rb_define_private_method(cDuckDBConnection, "_connect", duckdb_connection_connect, 1);
rb_define_private_method(cDuckDBConnection, "query_sql", duckdb_connection_query_sql, 1);
}