From 7f27fc870711bc48ef1ab7b6c881099c41ae99cf Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Thu, 5 Jan 2023 14:22:41 +0300 Subject: [PATCH] Add read write flag for database --- src/rbsqlite3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rbsqlite3.cpp b/src/rbsqlite3.cpp index 3f5d82c..9df2208 100644 --- a/src/rbsqlite3.cpp +++ b/src/rbsqlite3.cpp @@ -13,7 +13,7 @@ rbsqlite3_new(VALUE klass, VALUE pathValue) const char* path; path = StringValuePtr(pathValue); - SQLite::Database* db = new SQLite::Database(path); + SQLite::Database* db = new SQLite::Database(path, SQLITE_OPEN_READWRITE); VALUE obj = Data_Wrap_Struct(klass, NULL, NULL, db); rb_iv_set(obj, "@path", rb_str_new2(path));