SQLITE DELETE FROM row WHERE id IN (?) removes only firs item

I’m trying to delete multiple rows based on array of ids. The query is: However, it removes only first row with ID of the array and ignores the rest(2 and 3 are not removed); if I try to remove rows based on non-primary key like this everything works. What am I missing here? P.S. There are work arounds for this like DELETE FROM row WHERE id=1 OR id=2 OR id=3; however, I would like to understand why it doesn’t work using IN and not looking for alternative solutions. Answer You need to transform your array into comma seperated strings. Similar

Sqlite .all() function returns an undefined promise. How can I use the result further?

I am just starting to work with JS and SQLite. And could not find any help for my specific question. I want to keep a return to use it as a foreign key in a second table. This is my function: What do I have to do so that promise does not stay undefined outside of the function? Rest of the code: My other function just creat some strings and I run a few times db.run(…) to add some tables. Answer To put it more plainly, your getIdByName function never returns anything. You need to return the value you get

How can i persist data in react native application?

I want to create a React Native app that persists local data and then syncs to the server. Please help me to find a way for this. Answer React Native provides methods to persist data. Some are provided out of the box while others are libraries you have to install and use. Below are popular methods of persisting data in React Native AsyncStorage React Native SQLite 2 Realm React Native Local MongoDB refer https://pusher.com/tutorials/persisting-data-react-native