Installation

Configuration

Gotchas

Debugging

Reactive Queries

Libsql Support

Custom Tokenizers

API


osp_circle.png

By Oscar Franco

Twitter YouTube • [Email](mailto:[email protected]?subject=I%20need%20a%20Freelancer)

OP SQLite embeds the latest version of SQLite and provides a low-level API to execute SQL queries on React Native.

It’s fast

It binds directly to JSI C++ functions. This means running large queries will be as close to the metal as possible. There are several APIs with different trade-offs but always with the aim at extracting the most possible performance.

OSP 000389.jpg

Tests run with the performance flag and release scheme. You can run this yourself by compiling the example project.

Sponsors

turso3.png

Configurable

It compiles the latest version of SQLite from sources, this gives you access to the latest features and security fixes. It also prevents incompatibilities between OS-embedded versions. It will add 1.8mbs to your final app bundle.

Encryption

If you need to encrypt your database you can compile against SQLCipher, a fork of SQLite that encrypts your database with somewhat minimal overhead. Check out the encryption docs:

Why use a low-level driver

OP SQLite is rather a driver to execute queries directly. This in contrast with a full-blown ORM does not give you some of the niceties such as class abstractions. There are however advantages to this approach:

As your application grows the benefits of interacting directly with the database will outweigh abstractions.

3.46.1

Current SQLite Version

> 0.73 RN required

The app is compatible with Bridgeless, however this requires a newer version of RN.