Skip to content

Commit

Permalink
Merge pull request #578 from sparklemotion/flavorjones-enable-dbpage-…
Browse files Browse the repository at this point in the history
…vtab

Compile support for SQLITE_DBPAGE
  • Loading branch information
flavorjones authored Nov 19, 2024
2 parents c0f6df8 + 3416f1a commit c20e959
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 c20e959

Please sign in to comment.