{"repo":"margelo/react-native-nitro-sqlite","free":true,"listed":false,"github":"https://github.com/margelo/react-native-nitro-sqlite","clone":"git clone https://github.com/margelo/react-native-nitro-sqlite.git","description":"💽 Fast SQLite library for React Native built using Nitro Modules","language":"C","stars":559,"topics":["lib","native","react","react-native","sql","sqlite","storage","android","cplusplus","cpp"],"license":"MIT","category":"mobile-apps","readme_excerpt":"[!IMPORTANT] react-native-quick-sqlite has been deprecated in favor of this new Nitro module implementation. From major version 9.0.0 on, the package is react-native-nitro-sqlite . Bug fixes for react-native-quick-sqlite@8.x.x will continue for a limited time. npm i react-native-nitro-sqlite react-native-nitro-modules npx pod-install [!NOTE] Requires Nitro modules and React Native 0.75 or later. Nitro SQLite embeds SQLite and exposes a JSI API. Each operation is available in sync and async form; async runs off the JS thread to avoid blocking the UI. --- Installation --- API overview Open a database with open() . The returned connection is used for all operations; the database name is bound to that connection. Method Sync Async Description -------- ------ ------- ------------- Execute db.execute(query, params?) db.executeAsync(query, params?) Run a single SQL statement. Batch db.executeBatch(commands) db.executeBatchAsync(commands) Run multiple statements in one transaction. Load file db.loadFile(path) db.loadFileAsync(path) Execute SQL from a file. Transaction — db.transaction(async (tx) = { ... }) Run multiple statements in a transaction (async only). Lifecycle db.close() , db.delete() — Close or delete the database. Attach db.attach(dbName, alias, location?) , db.detach(alias) — Attach/detach another database. --- Sync vs async - Sync ( execute , executeBatch , loadFile ): Run on the JS thread. Use for small, fast work; heavy work can block the UI. - Async ( executeAsync , ","default_branch":null,"files":null,"tree":[],"storefront":"/r/margelo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/margelo/react-native-nitro-sqlite/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}