Skip to content
Open
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add SQLite support to the ActiveRecord and Sequel drivers, including current River JSONB storage, atomic bulk inserts, unique jobs, and notification-outbox writes. [PR #67](https://github.com/riverqueue/riverqueue-ruby/pull/67).

### Changed

- Stop pulling in `pg` as a hard dependency of either driver. Applications now select their database adapter by including `pg` for PostgreSQL or `sqlite3` for SQLite. [PR #67](https://github.com/riverqueue/riverqueue-ruby/pull/67).

## [0.10.1] - 2026-04-09

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ end

group :test do
gem "debug"
gem "pg"
gem "rspec-core"
gem "rspec-expectations"
gem "riverqueue-sequel", path: "driver/riverqueue-sequel"
gem "simplecov", require: false
gem "sqlite3"
end
5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ PATH
remote: driver/riverqueue-sequel
specs:
riverqueue-sequel (0.10.1)
pg (> 0, < 1000)
sequel (> 0, < 1000)

GEM
Expand Down Expand Up @@ -125,6 +124,8 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
sqlite3 (2.9.6-arm64-darwin)
sqlite3 (2.9.6-x86_64-linux-gnu)
standard (1.54.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
Expand Down Expand Up @@ -172,11 +173,13 @@ PLATFORMS

DEPENDENCIES
debug
pg
riverqueue!
riverqueue-sequel!
rspec-core
rspec-expectations
simplecov
sqlite3
standard
steep

Expand Down
2 changes: 2 additions & 0 deletions driver/riverqueue-activerecord/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ end

group :test do
gem "debug"
gem "pg"
gem "rspec-core"
gem "rspec-expectations"
gem "simplecov", require: false
gem "sqlite3"
end
5 changes: 4 additions & 1 deletion driver/riverqueue-activerecord/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
riverqueue-activerecord (0.10.1)
activerecord (> 0, < 1000)
activesupport (> 0, < 1000)
pg (> 0, < 1000)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -115,6 +114,8 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
sqlite3 (2.9.3-arm64-darwin)
sqlite3 (2.9.3-x86_64-linux-gnu)
standard (1.54.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
Expand Down Expand Up @@ -146,11 +147,13 @@ PLATFORMS

DEPENDENCIES
debug
pg
riverqueue!
riverqueue-activerecord!
rspec-core
rspec-expectations
simplecov
sqlite3
standard

BUNDLED WITH
Expand Down
9 changes: 2 additions & 7 deletions driver/riverqueue-activerecord/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# River Ruby bindings ActiveRecord driver
# riverqueue-activerecord

A future home for River's Ruby bindings. For now, the [Gem is registered](https://rubygems.org/gems/riverqueue), but nothing else is done.

``` sh
$ gem build riverqueue-activerecord.gemspec
$ gem push riverqueue-activerecord-0.0.1.gem
```
See the [ActiveRecord driver documentation](./docs/README.md).
44 changes: 35 additions & 9 deletions driver/riverqueue-activerecord/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@
# riverqueue-sequel [![Build Status](https://github.com/riverqueue/riverqueue-ruby-sequel/workflows/CI/badge.svg)](https://github.com/riverqueue/riverqueue-ruby-sequel/actions)
# riverqueue-activerecord

[ActiveRecord](https://github.com/jeremyevans/sequel) driver for [River](https://github.com/riverqueue/river)'s [`riverqueue` gem for Ruby](https://rubygems.org/gems/riverqueue).
[ActiveRecord](https://guides.rubyonrails.org/active_record_basics.html) driver for [River](https://github.com/riverqueue/river)'s [`riverqueue` gem for Ruby](https://rubygems.org/gems/riverqueue). PostgreSQL and SQLite are supported.

`Gemfile` should contain the core gem and a driver like this one:
Add the core gem and this driver to `Gemfile`:

``` yaml
```ruby
gem "riverqueue"
gem "riverqueue-sequel"
gem "riverqueue-activerecord"
```

Database adapters are optional dependencies. Add only the adapter used by your
application.

For PostgreSQL, add `pg` to `Gemfile`:

```ruby
gem "pg"
```

Then initialize a client with ActiveRecord's established connection:

```ruby
ActiveRecord::Base.establish_connection("postgres://localhost/my_app")
client = River::Client.new(River::Driver::ActiveRecord.new)
```

For SQLite, add `sqlite3` to `Gemfile`:

```ruby
gem "sqlite3"
```

Initialize a client with:
Then initialize a client with an SQLite connection:

```ruby
DB = ActiveRecord.connect("postgres://...")
client = River::Client.new(River::Driver::ActiveRecord.new(DB))
ActiveRecord::Base.establish_connection(
adapter: "sqlite3",
database: "storage/river.sqlite3",
timeout: 5_000
)
client = River::Client.new(River::Driver::ActiveRecord.new)
```

See also [`rubyqueue`](https://github.com/riverqueue/riverqueue-ruby).
Use current River migrations to create and update a production SQLite database. `River::Driver::ActiveRecord.create_sqlite_schema` creates only the tables needed by this insert-only client and is intended primarily for tests.

## Development

Expand Down
Loading
Loading