Project

sqlean

0.01
The project is in a healthy, maintained state
Precompiled SQLean extensions for SQLite, packaged for the Ruby ecosystem. Compatible with SQLite3, Extralite, and any other sqlite-based library that exposes sqlite3_load_extension.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

SQLean Ruby

Precompiled SQLean extensions for SQLite, packaged for the Ruby ecosystem. Compatible with SQLite3, Extralite, and any other sqlite-based library that exposes sqlite3_load_extension.

Usage

Please read the upstream documentation at https://antonz.org/sqlean/ or https://github.com/nalgeon/sqlean for details on what is provided by the SQLean extensions.

The available extensions are:

with SQLite3

Extend a SQLite3 database with SQLean extensions:

require "sqlite3"
require "sqlean"

db = SQLite3::Database.new("path/to/db.sqlite")
db.enable_load_extension(true)

db.load_extension(SQLean.to_path) # load every extension in SQLean
db.load_extension(SQLean::Crypto.to_path) # or load individual extensions

with Extralite

Extend an Extralite database with SQLean extensions:

require "extralite"
require "sqlean"

db = Extralite::Database.new("path/to/db.sqlite")

db.load_extension(SQLean.to_path) # load every extension in SQLean
db.load_extension(SQLean::Crypto.to_path) # or load individual extensions

Installation

Install the gem and add to the application's Gemfile by executing:

bundle add sqlean

If bundler is not being used to manage dependencies, install the gem by executing:

gem install sqlean

Note that right now, the only platforms supported are:

  • MacOS / Darwin:
    • x86_64
    • arm64
  • Linux
    • x86_64 gnu
    • x86_64 musl
    • aarch64 gnu
  • Windows
    • mingw (64-bit)

Specifically what's missing is support for:

  • Linux aarch64 musl
  • Windows mingw32 (32-bit)

If you need support for one of these platforms, please open an issue. I would also gladly welcome folks who are willing to help add support.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/flavorjones/sqlean-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the sqlean-ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.