63 questions
0
votes
1
answer
111
views
Unable to copy or move file from databases folder with RNFS in react native
I have my database created at /data/data/<app_packagename>/databases/dbfile by react-native-sqlite-storage
i can see this file with Android Studio device explorer and the db works fine
i need ...
0
votes
0
answers
59
views
How to find the path of created db by react-native-sqlite-storage in the phone
i can't find the file of database created by react-native-sqlite-storage in my app
i need to copie this file and need it's path
i tried to show files with react-native-fs
RNFS.readDir(RNFS....
0
votes
1
answer
96
views
Key `dblocation` with the value `"nosync"` on an object that is meant to be immutable has been frozen
In an SQLite database I store data locally on iOS and Android devices. I have created a common service file for connection and operation. On database open I get:
You attempted to set the key "...
0
votes
1
answer
65
views
Retrieving the updated row after executing tx.executeSql
I am using react-native-sqlite-storage to maintain books data in my React Native app. I am using updateData() to update book's data:
async function updateData({ book_id, author, price }) {
return ...
0
votes
1
answer
126
views
Is there a way I can use location calculated distance method on present location and data retrieved from SQLite database?
I am working on MAUI to calculate distance between two locations. I have stored the first set of locations in a SQLite database. Using location calculate distance method, I got the error:
Error ...
0
votes
2
answers
737
views
"tx.executeSql" Not Working Properly In Expo-sqlite-storage
I am adding a feature to my app that allows users to include recurring expenses. I am storing this information in a table, which is created using the following code:
// Creating or opening a table to ...
0
votes
2
answers
259
views
React Native SQLite not returning query with LIKE ? and query a column based on array of text?
Doing this query:
select * from menuitems
return new Promise((resolve, reject) => {
db.transaction((tx) => {
tx.executeSql(
"select * from menuitems",
[`%${query}$%`],
...
0
votes
1
answer
3k
views
openDatabase error: Cannot convert null value to object
I'm using react-native-sqlite-storage, wanted to use JSON Functions And Operators and after reading the issues I found that I need to use the Android native SQLite #480. Then I changed the react-...
1
vote
0
answers
358
views
React-native-SQLite-storage : Not working with android version 10+
"react": "17.0.2",
"react-native": "0.66.4",
"react-native-sqlite-storage": "^6.0.1",
Have added below code in react-native.config.js file
...
5
votes
3
answers
11k
views
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 ...
-1
votes
1
answer
627
views
React Native sqlite issues selecting where column is NULL
I have React Native project where I am using react-native-sqlite-store (npm i react-native-sqlite-storage). The issue is that I get no results when I try the follow query show below. I need to be able ...
1
vote
2
answers
1k
views
SQLite React Native db.executeSql() no response in Android Sim
I have a strange problem. I installed react-native-sqlite-storage like described on their docs (with autolinking and with the bundled SQLite, not androids SQLite, since it doesn't support JSON ...
-3
votes
1
answer
497
views
how to avoid duplicate insertion sqlite
Hi i added array of data as rows in local database which is got from backend, now i got new data with existing data from backend, i'm trying to add this data to local database but duplicates are ...
1
vote
0
answers
595
views
React Native : null is not an object (evaluating 'NativeModules["SQLite"][method]')
I am trying to use the react-native-sqlite-storage library but I can't seem find any solution to this error. I have looked around for hours yet no solution seem to help me. If anyone could guild me ...
1
vote
1
answer
595
views
Making typeorm use react-native-sqlite-2 on React Native to use JSON1
I'm currently using typeorm with react-native. In order to work on this environment, typeorm use react-native-sqlite-storage internally. But this library use the standard SQLite database on Android ...
1
vote
0
answers
178
views
Upgrading from java-based android app to react native and SQLite storage
I believe there is only one location databases can be stored on Android but also wondering if the file extension for SQLiteOpenHelper is .db3, .db, or user defined and if not defined there is no ...
0
votes
1
answer
183
views
Can you run a custom script that affects SQLite storage in react-native
I am creating an app that will save data on the local phone memory with react-native-sqlite-storage.
I want to make a script that will create a database (if it does not exist), create the necessary ...
4
votes
1
answer
3k
views
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 ...
0
votes
2
answers
145
views
State variable defined by useState is not working in react native
Can someone please findout what is wrong in this code? Getting nothing from the flatlist. The state variable items is also showing null.
import React, { useEffect, useState } from 'react';
import {...
1
vote
2
answers
2k
views
Use redux-persist instead of local DB for big data? React Native
I am using React Native and want to store notes locally and I was searching out what will be the best way to store data locally. So, first I thought of sql but it's little bit complex then I went ...
1
vote
1
answer
3k
views
Sqlite executeSql is not returning ResultSet
I am attempting to perform a simple query with Sqlite in React-Native using the react-native-sqlite-storage plugin. Based on the documentation I should get two paramters into the success callback 1) ...
0
votes
1
answer
1k
views
Module not found: Can't resolve 'react-native' even though sqlite.core.js is in the ./node_modules/react-native-sqlite-storage/lib/
I am trying to get started by linking sqlite with react native on a simple app.. but somehow keep getting below error:
I tried reinstall, relink, delete modules and yarn start...
Please help!
Module ...
2
votes
0
answers
681
views
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 ...
2
votes
1
answer
2k
views
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 ...
1
vote
1
answer
564
views
Application's user data is 20 MB without storing anything react-native
I've developed an application in react-native and published the .aab file to Play Store. Download size is almost 11 MB. After installation it takes 57 MB. Screenshot is attached of details of storage ...
1
vote
1
answer
150
views
Getting no response while using react-native-sqlite-storage ,
I am trying to execute update query but in response getting nothing.
const editData = async (no) => {
try {
db.transaction((tx) => {
tx.executeSql(
'UPDATE ...
0
votes
2
answers
651
views
Counter with Async Storage in React Native
I am new to React Native.
I want to make a counter using Async storage in React Native Expo.
Async storage works with string value but I need to use integer value and can't find an example to create ...
1
vote
3
answers
3k
views
Cannot insert data into SQLite database in react native
I stucked with SQLite database in React Native and I don't know what is a problem actually.
I am opening database, create table and try to insert some random data but when I am trying to display ...
2
votes
0
answers
193
views
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?
0
votes
1
answer
287
views
Unable to execute any query in SQLite with react-native-sqlite-storage ...i am trying it for android tv app
Blockquote
I also created database with table and store it into android/app/src/main/assets/sqlite.db
and also set createFromLocation to 1 or 2
useEffect(() => {
try {
...
1
vote
0
answers
134
views
TypeError: plugin.warn is not a function at SQLitePluginTransaction.addStatement
Getting below error while inserting data into the a table in React native Sqlite DB
Possible Unhandled Promise Rejection (id: 0):
TypeError: plugin.warn is not a function
TypeError: plugin.warn is not ...
1
vote
0
answers
614
views
Select data from two tables sqlite and return it to JSON
i have two tables :
1 - Users
IdUser
FirstName
LastName
1
name1
last1
2
name2
last2
2 - Books
IdBook
NameBook
IdUser
1
book1
1
2
book2
1
3
book3
2
I am using React-Native and react-native-sqlite-...
0
votes
0
answers
382
views
Use SQLite in Expo React Native
I was trying to create a mobile app with Expo React Native, but it have to be an offline app, so I need to use a local database.
In my app there are three files for the 3 screens: one is the home page,...
0
votes
1
answer
191
views
React-Native TypeORM: Cyclic dependency “t” Android Release build
how do you resolve this problem?
React-Native TypeORM: Cyclic dependency “t” Android Release build
0
votes
1
answer
78
views
react-native-sqllite value not displayed
this.getDetails();
getDetails = () => {
let userDetails = [];
db.transaction((tx) => {
tx.executeSql('select * from users where role=?',['students'],(tx,results) => {
...
0
votes
1
answer
700
views
Suggestion for fetch the data in database and set progress bar
I have already stored the student id and number of books read in the database. now, I have implemented the method to get the details of books count read by the students. but the function ...
2
votes
1
answer
2k
views
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 ...
1
vote
1
answer
340
views
Not able to get populated sqlite db from the android emulator
Using react-native-sqlite-storage for the first time, I was able to create an sqlite db file in the Android emulator, created a table in it and inserted a row successfully. After that on a button ...
1
vote
0
answers
373
views
How to check if TABLE exists before ALTER query?
Before adding (ALTER) new column to table I want to check if that table exists. Because app is crashing since table is not present and we tried to add column to it.
I tried "Alter table if exist ...
-1
votes
1
answer
2k
views
I am using 'react-native-dropdown-picker'; I want to show values from sqlite db to dropdown in react native, How do i do that?
constructor() {
super();
this.state = {
highcourtname: [],
}
}
getFromDatabase = () => {
var that = this;
db.transaction((tx) => {
tx.executeSql('SELECT ...
3
votes
5
answers
6k
views
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-...
0
votes
1
answer
2k
views
Confusion on async and promise. React Native
I am new to React-Native and JS and I am really weak on the understanding on how async/promise/await works. What I am trying to implement is an async function (using react-native-sqlite-storage), &...
2
votes
1
answer
5k
views
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 ...
1
vote
3
answers
2k
views
How to share a variable between async functions?
I'm new to React-Native and I was confused on how to have a variable that can be accessed by all the functions within a file without being in a class.
My issues is that I assigned storage in taskFour()...
1
vote
2
answers
3k
views
how to connect a pre-populated sqlite db in react-native-sqlite-storage?
I'm trying to connect an sqlite db using react-native-sqlite-storage, I followed the steps in github, it works fine on android but not on IOS,
It looks like that it can not find the db file even I put ...
0
votes
0
answers
198
views
Sqlite ROW_NUMBER not working in react-native-sqlite-storage
Here is my query.
SELECT ROW_NUMBER() OVER(ORDER BY RANDOM()) AS rowNo, id, name, address FROM Users
It works in Sqlite Db Browser.
Is there any other way to put rowNo on randomize rows?
My Users ...
2
votes
0
answers
586
views
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',
...
8
votes
1
answer
2k
views
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 ...
1
vote
2
answers
4k
views
How to get SQLite database file path for get Database using react-native
im using react-native-sqlite-storage For database
https://github.com/andpor/react-native-sqlite-storage
Now i have pre-populated-sqlite-database in .../www/ folder for both android & ios.
Now ...
5
votes
1
answer
3k
views
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 ...