Questions tagged [react-native-sqlite-storage]
61 questions
8
votes
1 answer
React Native offline App using react-native-sqlite-storage
I am new to react native. I want to build an offline react native app for storing user data (Basic user details, user personal documents, images, etc). I already gone through some documents about react-native-sqlite-storage and I would like to…

Inaccessible
- 1,560
- 3
- 18
- 42
7
votes
0 answers
React-Native TypeORM: Cyclic dependency "t" Android Release build
I am using TypeORM in a React-Native app in which I need SQLite storage. It works really well, except for a bug that I've been struggling with all week.
My scheme contains several objects that are related to one another with one-to-may, many-to-one,…

Joris416
- 4,751
- 5
- 32
- 59
6
votes
1 answer
How to deal with SQLite migrations in React-Native using TypeORM?
I am writing a React-Native app which heavily relies on local storage, and have chosen TypeORMto handle this.
I am now entering a phase where my project is live, and I want to add new functionalities that require an adjustment to my datamodel. To…

Joris416
- 4,751
- 5
- 32
- 59
5
votes
1 answer
Creating multiple tables in SQLite using React Native SQLite Storage Module using Transaction function
What I want to do is create multiple tables for my react-native android app but it keeps returning an unknown error each time the code execute(but it works fine with creating a single table).
This is the code I have
initDB() {
let db;
return…

gbenga ogunbule
- 589
- 1
- 6
- 15
4
votes
1 answer
RN: Class static side 'typeof *' incorrectly extends base class static side 'typeof BaseModel
In react native, I'm extending an ORM class (according to its documentation) but I'm getting following error in VSCode TypeScript checker:
Class static side 'typeof Animal' incorrectly extends base class static side 'typeof BaseModel'.
Types of…

jave.web
- 13,880
- 12
- 91
- 125
3
votes
2 answers
warn Package **react-native-sqlite-storage** contains invalid configuration: "**dependency.platforms.ios.project**" is not allowed
When npx react-native start -- --reset-cache
warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and…

Abbas Ali irfani
- 71
- 1
- 5
3
votes
1 answer
How can I insert multiple rows into a table with react-native-sqlite-storage?
In the react-native-sqlite-storage's tests (see https://github.com/andpor/react-native-sqlite-storage/blob/master/test/index.ios.promise.js#L141-L149) I find:
tx.executeSql('INSERT INTO Employees (name, office, department) VALUES ("Sylvester…

forki23
- 2,784
- 1
- 28
- 42
3
votes
0 answers
How can I use redux for saving data in react-native-sqlite-storage and AsyncStorage?
I am using redux with react-native-sqlite-storage. First I need to fetch data from api call then save it in local database. I can fetch the data using redux. but how to save data in react-native-sqlite-storage using redux? How can I make my action…

Neha
- 175
- 1
- 3
- 18
2
votes
0 answers
React Native Sqlite enablePromise option
In the react-native-sqlite-storage package:
https://github.com/andpor/react-native-sqlite-storage
There is an option to enable promises:
SQLite.enablePromise(true);
Do I have to enable this option in react native projects ? How react native works…

Prakash S
- 632
- 6
- 12
2
votes
1 answer
TypeORM query returns an empty array
I'm trying to retrieve data from an existing database. I recently switched to bare workflow from Expo managed, trying to test react-native-sqlite-storage with TypeORM. However, TypeORM raw query keeps returning an empty array and I have no idea…

mak.skid
- 21
- 3
2
votes
0 answers
How can i store and update images in react-native with react-native-sqlite-storage
I am trying to store an image in my app's local storage folder later if i need to update or change image so i can?

Sumit Sharma
- 160
- 9
2
votes
1 answer
Unable to execute sqlite db query asynchronously in react-native
I have a component where i need to execute couple of query one after another. I used promise but seems like its not working/i am unable to do so. Here is my portion of my component:
export default function AuthWrapper() {
useEffect(() => {
…

Alauddin Ahmed
- 1,128
- 2
- 14
- 34
2
votes
5 answers
Why do I get "Error: Could not open database"?
I'm using the Android emulator so I put users.db in 'android/app/src/main/assets/users.db'. I already ran npx react-native link to make the link. I'm using a React Native version above 6.0 with auto-link.
I'm getting "Error: Could not open…

Denis Ximenes
- 351
- 3
- 12
2
votes
1 answer
How to use sqlite file in expo react native
am using expo 0.62 i have a project to take one else project an android studio java project and convert it into react native project he uses database as database.sqlite i want to know if it is possible for me to get data from that file the packages…

Cristo Ferrao
- 83
- 1
- 11
2
votes
0 answers
open sqlite DB from Jest using react-native-sqlite-storage
I've a simple spec file to run JEST:
describe('config', () => {
it('should be able to open database', () => {
console.log(SQLite);
SQLite.openDatabase(
{
name: 'TestDB',
createFromLocation: '~/www/test.db'
},
…

helloworld
- 2,179
- 3
- 24
- 39