Skip to content

Instantly share code, notes, and snippets.

@GendelfLugansk
GendelfLugansk / README.md
Last active February 24, 2024 19:45
Wrapper for expo-sqlite with async/await, migrations and transactions
View README.md

Expo-sqlite - the right way

Why

With expo-sqlite it's not possible to execute few depending statements inside single transaction - db.transaction does not work with async/promise and tx.executeSql just enqueues sql statement but does not execute it.

Documentation

Database class has two methods - execute (to execute single statement without transaction) and transaction(cb) to execute few statements inside a transaction