Giter Site home page Giter Site logo

aaronksaunders / ionic7-react-sqlite Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 4.0 1.2 MB

JavaScript 1.23% Java 4.56% TypeScript 50.71% HTML 3.42% CSS 25.88% Swift 10.65% Ruby 3.55%
capacitor-plugin ionic ionic-framework ionic-react react reactjs sqlite

ionic7-react-sqlite's Introduction

ionic7-react-sqlite's People

Contributors

aaronksaunders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ionic7-react-sqlite's Issues

Setting initialized at the right time

Does it make sense to replace your

initializeDB().then(() => {
     initializeTables();
     setInitialized(true);
   });
 }, []);

with

initializeDB().then(async () => {
    await initializeTables();
    setInitialized(true);
  });
}, []);

to ensure, that initialized isn't set to early?

android: database is undefined initially

Problem

Hi! I'm encountering an issue while trying to integrate the useSQLiteDB into my Ionic project. The problem appears when running the app on an Android emulator. The database object seems to be undefined initially and only becomes accessible after performing specific operations, such as adding an item.

Example

example

Is serialize possible

Is it possible to use db?.serialize with performSQLAction?

I guess, that I've got a performance problem with when executeing many rows with something like this. Not on my pc but on my android. That's why I'm would like to know if I can use serialize.

for (let id = 1; id <= 20; id++) {
          const respSelect = await db?.query(
            `SELECT COUNT(*) as count FROM techniques WHERE id = ?`,
            [id]
          );
          
          ...
          const respInsert = await db?.execute(`
              INSERT INTO techniques (id) VALUES (${id});`);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.