0.0
A long-lived project that still receives updates
A drop-in replacement for the sqlite3 gem for JRuby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

sqlite3-ruby-ffi

🎉 A drop-in replacement for the sqlite3 gem for JRuby

  • Passes the full sqlite3 test suite
  • Works with Active Record without a custom adapter

Build Status

Installation

Add this line to your Gemfile:

gem "sqlite3-ffi"

And use it the same way as the sqlite3 gem.

Why FFI for JRuby?

I tried JDBC, JNI, and FFI. Since SQLite is written in C, all three approaches eventually call C, and FFI provides the most compatibility.

Credits

This library uses code from the sqlite3 gem and is available under the same license.

The code in lib and test is an exact copy, plus some additional files:

  • lib/sqlite3/ffi/* (port of ext)
  • lib/sqlite3/ffi.rb
  • lib/sqlite3/sqlite3_native.rb
  • test/ffi_helper.rb

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/sqlite3-ruby-ffi.git
cd sqlite3-ruby-ffi
bundle install
bundle exec rake test