Skip to content

Commit

Permalink
Compile support for SQLITE_DBPAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Nov 19, 2024
1 parent c0f6df8 commit 3416f1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/sqlite3/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def configure_packaged_libraries
"-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
"-fvisibility=hidden", # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
"-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1",
"-DSQLITE_USE_URI=1"
"-DSQLITE_USE_URI=1",
"-DSQLITE_ENABLE_DBPAGE_VTAB=1"
]
env["CFLAGS"] = [user_cflags, env["CFLAGS"], more_cflags].flatten.join(" ")
recipe.configure_options += env.select { |k, v| ENV_ALLOWLIST.include?(k) }
Expand Down
6 changes: 6 additions & 0 deletions test/test_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -721,5 +721,11 @@ def test_transaction_returns_block_result
result = @db.transaction { :foo }
assert_equal :foo, result
end

def test_sqlite_dbpage_vtab
skip("sqlite_dbpage not supported") unless SQLite3::SQLITE_PACKAGED_LIBRARIES

assert_nothing_raised { @db.execute("select count(*) from sqlite_dbpage") }
end
end
end

0 comments on commit 3416f1a

Please sign in to comment.