Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 823 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 823 Bytes

SQLite3 ActiveRecord REGEXP

This adds REGEXP support to SQLite3 in ActiveRecord.

This project uses Semantic Versioning.

Installation

Add this line to your application's Gemfile:

gem 'sqlite3_ar_regexp', '~> 2.2'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sqlite3_ar_regexp

Usage

# find all accounts where the first name starts with "a"
Account.where('first_name REGEXP "^a"')

Credits

The original code for this was done by Joe Yates.