From 50cbd41726863a056af1ab11f5a9b68257063292 Mon Sep 17 00:00:00 2001 From: suketa Date: Fri, 29 Sep 2023 21:57:38 +0900 Subject: [PATCH] check duckdb version 0.9.0 in extconf.rb (#532) --- ext/duckdb/extconf.rb | 3 +++ ext/duckdb/ruby-duckdb.h | 4 ++++ 2 files changed, 7 insertions(+) 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"