Questions tagged [expo-sqlite]
26 questions
0
votes
0 answers
android app with react native expo doesn't work in offline mode
I've developed an android app with react native expo, this app depends on a static data where the database can be considered as a read only database where I've a (.db) file which contain all the data and I need to read the data from the file and…

Ali.JS1
- 1
0
votes
0 answers
expo-sqlite working in Expo Go but not in .apk build
I am using expo-sqlite in my Expo App like this in App.js
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("tasks.db");
export default function App() {
useEffect(() => {
db.transaction((txt) => {
txt.executeSql(
…

MichaelB
- 1
- 3
0
votes
0 answers
Getting an sqlite error when running tests with Jest on react-native app
I am having trouble getting tests up and running with Jest for my react-native app (expo).
This is the simple test I am trying:
import React from 'react';
import renderer from 'react-test-renderer';
import App from '../App';
describe(' ', ()…

Neil
- 706
- 8
- 23
0
votes
0 answers
expo-sqlite using existing local database
I am using expo and react native to build a truth or dare app. I want to store hundreds of truth or dare questions to feed to the user. I figured SQLite would be most efficient for this (and allow offline usage). I created the db using the DB…

cmote
- 79
- 1
- 8
0
votes
0 answers
My app wasn't able to rerender on installation startup 'singleton' that I have created ONLY when I generate the apk file through eam build
My app wasn't able to rerender on installation startup 'singleton' that I have created ONLY when I generate the apk file through eam build.
It is working when I use expo-go I have click on one of the other button (this case, my own create exercise…

Ryan
- 356
- 1
- 6
- 26
0
votes
1 answer
Can local .db files be opened with Expo-Sqlite?
I'm building a react native application on mobile (IOS and Android) with Expo and already have a .db file created from SQLite in which to make transactions with.
I've seen examples of projects which call a remote database from an API call as well as…

ReignBeaux
- 43
- 2
- 14
0
votes
1 answer
React Native app's expo-sqlite callback not executed until app refresh
I have a simple app that makes a connection to a sqlite database, reads results from that database, and displays them. Here is the app:
import React, { useEffect, useState } from 'react';
import { View, Text } from 'react-native'
import * as…

pwasoutside
- 343
- 1
- 10
0
votes
0 answers
How to use 'await/async' in react native?
I am getting isValidate value from sqlite and routing user to MainTabs or ValidateUser components. But I can not do it because it is not working async/await (Or I couldn't.).
initialRouteName will be assigned the name of the component to which users…

oktem
- 1
- 2
0
votes
1 answer
I encounter Error [Error: attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)] using expo-sqlite
export async function insertAttempt() {
const db = await openDatabase()
try {
return await new Promise((resolve, reject) => {
db.transaction(
(tx) => {
tx.executeSql("INSERT INTO…

Paul McLoughlin
- 2,279
- 2
- 18
- 24
0
votes
1 answer
Delete query deletes entries from two tables with expo-sqlite
I have two really simple tables, without any constraint between them:
CREATE TABLE groups (groupId INTEGER PRIMARY KEY AUTOINCREMENT, groupName TEXT)
CREATE TABLE savedRuns (runId INTEGER PRIMARY KEY AUTOINCREMENT, runName TEXT, groupId INT NULL,…

remyremy
- 3,548
- 3
- 39
- 56
-1
votes
1 answer
expo: Cannot find find FileSystem properties and Asset while trying to import an existing database
I am new to react native.
I was trying to use expo-sqlite and following their guide under "Importing an existing database".
I have did 'expo install expo-file-system expo-asset`
I have create a metro.config.js with the code from the guide
but when I…

Ryan
- 356
- 1
- 6
- 26