Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile support for SQLITE_DBPAGE #578

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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