Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-sqlite

expo241.2kMIT15.2.9TypeScript support: included

Provides access to a database using SQLite (https://www.sqlite.org/). The database is persisted across restarts of your app.

react-native, expo, sqlite, sql, storage, async-storage

readme

Expo logo

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on Bluesky   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

15.2.9 — 2025-04-30

This version does not introduce any user-facing changes.

15.2.8 — 2025-04-30

📚 3rd party library updates

  • Updated libsql libs to libsql-0.9.5. (#36444 by @kudo)

15.2.7 — 2025-04-25

This version does not introduce any user-facing changes.

15.2.6 — 2025-04-21

This version does not introduce any user-facing changes.

15.2.5 — 2025-04-14

This version does not introduce any user-facing changes.

15.2.4 — 2025-04-11

This version does not introduce any user-facing changes.

15.2.3 — 2025-04-11

This version does not introduce any user-facing changes.

15.2.2 — 2025-04-09

This version does not introduce any user-facing changes.

15.2.1 — 2025-04-08

This version does not introduce any user-facing changes.

15.2.0 — 2025-04-04

🎉 New features

🐛 Bug fixes

  • Fixed build error for conflict libc++_shared.so on Android. (#35298 by @kudo)
  • Added reference counting for database closing functions. (#35818 by @kudo)

💡 Others

  • [Android] Started using expo modules gradle plugin. (#34176 by @lukmccall)
  • [apple] Migrate remaining expo-module.config.json to unified platform syntax. (#34445 by @reichhartd)
  • Fixed resolving libsql binary issue on iOS. (#34529 by @kudo)
  • Removed deprecated CR-SQLite integration. (#35097 by @kudo)
  • Remove prebuilt worker on Web. (#35311 by @kudo)
  • [iOS] Fix warnings which will become errors in Swift 6. (#35288 by @behenate)
  • Fixed build warnings. (#35610 by @kudo)
  • Added backup and session API stubs to LibSQL implementations. (#35755 by @kudo)
  • Updated function docs. (#35761 by @kudo)

📚 3rd party library updates

  • Updated SQLite to 3.49.1 and SQLCipher to 4.7.0. (#35741 by @kudo)

⚠️ Notices

  • Changed async tasks to run on a dedicated parallel queue. (#35896 by @kudo)

15.1.4 - 2025-04-02

🐛 Bug fixes

15.1.3 - 2025-03-26

💡 Others

15.1.2 - 2025-02-05

💡 Others

  • Added offline-writes support for libSQL. (#34673 by @kudo)

15.1.0 - 2025-01-27

🎉 New features

15.0.6 - 2025-01-10

This version does not introduce any user-facing changes.

15.0.5 - 2024-12-30

This version does not introduce any user-facing changes.

15.0.4 - 2024-12-26

🐛 Bug fixes

  • Replaced the cached statement manager with sqlite3_next_stmt and prevented uncaught statements from leaking. #34992 by @Bowlerr)
  • Fixed exceptions when converting empty blob data on iOS. (#33564 by @kudo)
  • Fixed expo-sqlite/kv-store async API not being well handled when using AsyncStorage compatible api (#33847 by @rtorrente)
  • Fixed database is locked error from parallel kv-store operations. (#33834 by @kudo)
  • Fixed database is locked error while using kv-store multiGet function. (#33873 by @rtorrente)

💡 Others

  • Removed unused SQLite3Wrapper code for legacy implementation on Android. (#33565 by @kudo)
  • Enforce input validations in kv-store operations. (#33874 by @rtorrente)

15.0.3 — 2024-11-12

🐛 Bug fixes

15.0.2 — 2024-11-07

💡 Others

  • Renamed expo-sqlite/async-storage to expo-sqlite/kv-store. (#32699 by @kudo)

15.0.1 — 2024-10-25

🎉 New features

15.0.0 — 2024-10-22

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

  • Add missing react and react-native peer dependencies for isolated modules. (#30483 by @byCedric)
  • Fixed build errors on iOS if other third-party libraries building with iOS system SQLite. (#30824 by @kudo)
  • Fixed build error when using incremental_installation mode in CocoaPods. (#30918 by @kudo)
  • Fixed prebuild error when app.json doesn't specify any plugin properties for expo-sqlite. (#31672 by @kudo)
  • Fixed SQLiteDatabase -> pathUtils -> SQLiteDatabase require cycle warning from metro. (#31956 by @kudo)

💡 Others

  • Removed redundant usage of EventEmitter instance. (#28946 by @tsapeta)
  • Replaced @testing-library/react-hooks with @testing-library/react-native. (#30742 by @byCedric)
  • Align web implementation exports as native to support DOM components when using @expo/dom-webview. (#31662 by @kudo)
  • Deprecated enableCRSQLite and show a warning if using this option. (#32117 by @kudo)

14.0.6 - 2024-07-31

🐛 Bug fixes

  • Fixed the "disk I/O error" on older Android devices. (#30718 by @kudo)

14.0.5 - 2024-07-23

🐛 Bug fixes

  • Fixed invalid characters for prepared statements on iOS. (#30579 by @kudo)

14.0.4 - 2024-06-27

🐛 Bug fixes

  • [Android] Reduce the number of global references to NativeStatementBinding. (#29937 by @lukmccall)
  • [iOS] Fixed <SQLiteProvider assetSource={{ assetId: require(...) }}> database always being overwrite on iOS 16 and lower. (#29945 by @kudo)

14.0.3 — 2024-04-23

This version does not introduce any user-facing changes.

14.0.2 — 2024-04-22

🎉 New features

14.0.1 — 2024-04-19

🎉 New features

  • Added SQLiteProvider.assetSource to import an existing database from assets. (#28291 by @kudo)

14.0.0 — 2024-04-18

🛠 Breaking changes

  • Moved the previous default export as expo-sqlite/legacy and promoted expo-sqlite/next as the default. expo-sqlite/next import is still as-is for backward compatibility. (#28278 by @kudo)

💡 Others

13.4.0 - 2024-03-20

🐛 Bug fixes

  • Enabled FTS and FTS5 for SQLite. (#27738 by @kudo)
  • Fixed NullPointerException on Android when opening the same database multiple times. (#27748 by @kudo)

13.3.0 - 2024-03-05

🎉 New features

  • [Android] Added expo.sqlite.customBuildFlags gradle property to support custom sqlite3 building flags. (#27385 by @kudo)
  • Added serializeAsync() and deserializeDatabaseAsync() to serialze and deserialize databases. (#27422 by @kudo)

🐛 Bug fixes

  • Fixed expo-sqlite/next cannot be imported from an ESM project. (#27423 by @kudo)

13.2.2 - 2024-01-25

💡 Others

  • Remove onDatabaseChange event from legacy API as it is not supported natively. (#26655 by @alanjhughes)

13.2.1 - 2024-01-10

🐛 Bug fixes

  • Fixed building error on Windows. (#26296 by @kudo)
  • Fixed a write query being executed twice when using SQLiteDatabase.getAllAsync() in expo-sqlite/next API. (#26344 by @kudo)

13.2.0 - 2023-12-21

🎉 New features

  • Added SQLiteStatement.executeForRawResultAsync() in expo-sqlite/next API which returns array based raw values than key-value based row value. (#26073 by @kudo)

13.1.2 - 2023-12-21

🐛 Bug fixes

  • Fixed NativeStatementBinding leakage on Android. (#25996 by @kudo)

13.1.1 - 2023-12-19

This version does not introduce any user-facing changes.

13.1.0 — 2023-12-13

🛠 Breaking changes

  • Refactor expo-sqlite/next API to be more React idiomatic. (#25657 by @kudo)

13.0.0 — 2023-12-12

🎉 New features

  • Added binary data support to the expo-sqlite/next API through the Uint8Array. (#25787 by @kudo)

🐛 Bug fixes

  • Fixed expo-sqlite/next crashes when access to finalized statements. (#25623 by @kudo)
  • Fixed expo-sqlite/next UTF-8 text issue and :memory: database issue. (#25637 by @kudo)

💡 Others

  • [iOS] Replace legacy FileSystem interfaces usage with core FileSystemUtilities. (#25495 by @alanhughes)
  • Bump C++ compiler setting to C++20. (#25548 by @kudo)

12.2.1 — 2023-11-18

🐛 Bug fixes

12.2.0 — 2023-11-14

🐛 Bug fixes

  • Fixed the transactionExclusiveAsync does not support CRSQLite. (#25370 by @kudo)

💡 Others

12.1.0 — 2023-11-10

🎉 New features

  • Improved performance on the expo-sqlite/next API. (#25314 by @kudo)

🐛 Bug fixes

  • Fix crash issues in sqlite/next. (#25295 by @kudo)
  • Fix executeSqlAsync to accept null properly as arguments. (#24761 by @spencerc99)
  • Fixed useSQLiteContext() and finalizeUnusedStatementsBeforeClosing issues in expo-sqlite/next API. (#25328 by @kudo)

12.0.0 — 2023-11-06

🛠 Breaking changes

🎉 New features

  • Added Android implementation for sqlite/next APIs. (#25021 by @kudo)
  • Added the useSQLiteContext hook that can be used across components. (#25129 by @kudo)

🐛 Bug fixes

  • [ios] Fix some issues for sqlite/next. (#25022 by @kudo)

💡 Others

  • [Android] Removed the package included SQLite source and download in build time. (#25186 by @kudo)

11.8.0 — 2023-10-17

🛠 Breaking changes

🎉 New features

  • [Android] Rewrite implementations from low-level SQLite bindings. (#24730 by @kudo)
  • Introduced expo-sqlite/next new APIs. (#24812 by @kudo)

11.7.1 — 2023-09-18

🐛 Bug fixes

💡 Others

11.7.0 — 2023-09-15

🐛 Bug fixes

  • [iOS] Fixed an issue with CRSQLite missing a minimum OS version on iOS, causing rejections on AppStore Connect submission. (#24347 by @derekstavis)

11.3.3 — 2023-09-08

🎉 New features

🐛 Bug fixes

  • Fixed the return type from executeSqlAsync to only successful ResultSet. (#24336 by @kudo)

11.6.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

🐛 Bug fixes

  • [iOS] Fixed build error when mixing with iOS built-in SQLite3. (#23885 by @kudo)
  • [Android] Fixed select queries with CTEs crashing on Android. (#24132 by @derekstavis)

💡 Others

11.5.0 — 2023-08-02

This version does not introduce any user-facing changes.

11.4.0 — 2023-07-28

🎉 New features

🐛 Bug fixes

  • Fixed missing transaction() and readTransaction() function types from SQLiteDatabase. (#23751 by @kudo)

11.3.1 — 2023-06-28

🎉 New features

  • Migrated Android codebase to Expo Modules API. (#23115 by @alanjhughes)
  • Added experimental Promise based execAsync and transactionAsync functions. (#23109 by @kudo)

11.3.0 — 2023-06-21

🐛 Bug fixes

11.2.0 — 2023-05-08

🎉 New features

11.1.1 — 2023-02-09

This version does not introduce any user-facing changes.

11.1.0 — 2023-02-03

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

11.0.0 — 2022-10-25

🛠 Breaking changes

  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

10.3.0 — 2022-07-07

🐛 Bug fixes

10.2.0 — 2022-04-18

🎉 New features

  • Added closeAsync and deleteAsync methods. (#16831 by @kudo)

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

10.1.1 - 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

10.1.0 — 2021-12-03

🎉 New features

💡 Others

10.0.1 — 2021-10-01

This version does not introduce any user-facing changes.

10.0.0 — 2021-09-28

🛠 Breaking changes

🐛 Bug fixes

  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)

💡 Others

  • Converted Android code to Kotlin (#13724 by @ixf)
  • Added missing _array typing to SQLResultSetRowList/ResultSet return object. (#13826 by @bbarthec)

9.2.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Migrated from unimodules-file-system-interface to expo-modules-core.
  • Build Android code using Java 8 to fix Android instrumented test build error. (#12939 by @kudo)

9.1.0 — 2021-03-10

🎉 New features

  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)

🐛 Bug fixes

  • Remove peerDependencies and unimodulePeerDependencies from Expo modules. (#11980 by @brentvatne)

9.0.0 — 2021-01-15

🛠 Breaking changes

8.5.0 — 2020-11-17

This version does not introduce any user-facing changes.

8.4.0 — 2020-08-18

This version does not introduce any user-facing changes.

8.3.0 — 2020-07-29

🐛 Bug fixes

  • Fix incorrect rowsAffected value in result of executeSql method on iOS when deleting/updating cascadely. (@9137 by @mczernek)

8.2.1 — 2020-05-29

🐛 Bug fixes

8.2.0 — 2020-05-27

This version does not introduce any user-facing changes.