diff --git a/ext/duckdb/extconf.rb b/ext/duckdb/extconf.rb index abaa69dd..2ac92398 100644 --- a/ext/duckdb/extconf.rb +++ b/ext/duckdb/extconf.rb @@ -28,4 +28,7 @@ def check_duckdb_library(func, version) # check duckdb >= 0.8.0 have_func('duckdb_string_is_inlined', 'duckdb.h') +# check duckdb >= 0.9.0 +have_func('duckdb_bind_parameter_index', 'duckdb.h') + create_makefile('duckdb/duckdb_native') diff --git a/ext/duckdb/ruby-duckdb.h b/ext/duckdb/ruby-duckdb.h index bdaa06c9..0f03c433 100644 --- a/ext/duckdb/ruby-duckdb.h +++ b/ext/duckdb/ruby-duckdb.h @@ -12,6 +12,10 @@ #define HAVE_DUCKDB_H_GE_V080 1 #endif +#ifdef HAVE_DUCKDB_BIND_PARAMETER_INDEX +#define HAVE_DUCKDB_H_GE_V090 1 +#endif + #include "./error.h" #include "./database.h" #include "./connection.h"