Noteflakes: Extralite - a new Ruby gem for working with SQLite databases

16-Dec-2021 1336
In the last year I’ve been working a lot with SQLite databases. I started by using the popular sqlite3-ruby Ruby gem, but quickly noticed that for my usage there were a few things missing in the gem’s API. Being a tinkerer, and having had some experience writing C-extensions, I had a look at the SQLite C API and decided to try to write my own Ruby bindings for SQLite. Thus Extralite was born.Extralite is an extra-lightweight (less than 460 lines of C-code) SQLite3 wrapper for Ruby. It provides a single class with a [minimal set of methods] for interacting with an SQLite3 database. Extralite provides the following improvements over the sqlite3-ruby gem:Improved concurrency for multithreaded apps: the Ruby GVL is released while preparing SQL statements and while iterating over results.Super fast - up to 13x faster than sqlite3-ruby.Automatically execute SQL strings containing multiple semicolon-separated queries (handy for creating/modifying schemas).Access data in a variety of ways: rows as hashes, rows as arrays, single row, single column, single value.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle