Giter VIP home page Giter VIP logo

Comments (11)

pbbadenhorst avatar pbbadenhorst commented on June 9, 2024

Are you getting this using batch operations

from react-native-quick-sqlite.

vhakulinen avatar vhakulinen commented on June 9, 2024

I haven't tried it but looking at the source code, its not using the pzTail param either.

from react-native-quick-sqlite.

ospfranco avatar ospfranco commented on June 9, 2024

Interesting, but you are better off using the executeBatch API, that one will not only execute all your operations but also wrap them in a transaction.

from react-native-quick-sqlite.

vhakulinen avatar vhakulinen commented on June 9, 2024

Lol, no. Splitting a code injected SQL migration on runtime with some special comments is error prone (which we're doing at the moment) and PITA especially when they are meant to be run in one go either way.

Using transactions should be left to the API consumer to do.

from react-native-quick-sqlite.

ospfranco avatar ospfranco commented on June 9, 2024

ah, how could I've known? You are always free to create a PR

from react-native-quick-sqlite.

vhakulinen avatar vhakulinen commented on June 9, 2024

My apologies if the tone of my message was inappropriate.

Usually (or at least based on my experience) database libraries/drivers execute all the provided statements, or documents or errors out in cases when they don't. Its really unexpected behavior to silently execute input only partially.

from react-native-quick-sqlite.

ospfranco avatar ospfranco commented on June 9, 2024

well... I partially implemented this, the problem is that I'm not sure it is really compatible with the current API? How would you pass different params for each row of the string? I would also have to modify the metadata object and the result object to return an array instead of a single object, which would increase the complexity a bit.

In any case, here is a partial implementation, it consumes all the statements but the returned data is not correct at all.

https://github.com/OP-Engineering/op-sqlite/tree/consume-entire-statement

from react-native-quick-sqlite.

vhakulinen avatar vhakulinen commented on June 9, 2024

The API needs to be split between

  1. execute only
  2. execute and return data

If that doesn't fit in the architecture, throw error instead of failing silently.

from react-native-quick-sqlite.

ospfranco avatar ospfranco commented on June 9, 2024

alright, as you wish. It's implemented in op-sqlite.

from react-native-quick-sqlite.

vhakulinen avatar vhakulinen commented on June 9, 2024

Why not just improve this library?

from react-native-quick-sqlite.

ospfranco avatar ospfranco commented on June 9, 2024

This one now belongs to Margelo. I started hacking around on the new one out of curiosity and decided to publish it as a new one as it helps me get customers. Nothing against them, just trying to get something back for my time and effort.

from react-native-quick-sqlite.

Related Issues (19)

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.