From e8f7d99653745fa12d7bdd78d1e6ce30438126dc Mon Sep 17 00:00:00 2001 From: skilion Date: Thu, 17 Sep 2015 10:50:20 +0200 Subject: [PATCH] check sqlite version --- src/sqlite.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sqlite.d b/src/sqlite.d index b4a8e7d3..7df5c82d 100644 --- a/src/sqlite.d +++ b/src/sqlite.d @@ -5,6 +5,13 @@ import std.string: fromStringz, toStringz; extern (C) immutable(char)* sqlite3_errstr(int); // missing from the std library +static this() +{ + if (sqlite3_libversion_number() < 3006019) { + throw new SqliteException("sqlite 3.6.19 or newer is required"); + } +} + private string ifromStringz(const(char)* cstr) { return fromStringz(cstr).dup;