WatermelonDB | 🍉 Reactive & asynchronous database | Frontend Framework library

 by   Nozbe JavaScript Version: v0.27.0-3 License: MIT

kandi X-RAY | WatermelonDB Summary

kandi X-RAY | WatermelonDB Summary

WatermelonDB is a JavaScript library typically used in User Interface, Frontend Framework, React Native, React applications. WatermelonDB has no bugs, it has a Permissive License and it has medium support. However WatermelonDB has 1 vulnerabilities. You can install using 'npm i @nozbe/watermelondb' or download it from GitHub, npm.

Build powerful React and React Native apps that scale from hundreds to tens of thousands of records and remain fast ️.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              WatermelonDB has a medium active ecosystem.
              It has 9156 star(s) with 537 fork(s). There are 103 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 141 open issues and 701 have been closed. On average issues are closed in 50 days. There are 22 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of WatermelonDB is v0.27.0-3

            kandi-Quality Quality

              WatermelonDB has 0 bugs and 0 code smells.

            kandi-Security Security

              WatermelonDB has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).
              WatermelonDB code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              WatermelonDB is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              WatermelonDB releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed WatermelonDB and discovered the below as its top functions. This is intended to give you an instant insight into WatermelonDB implemented functionality, and help decide if they suit your requirements.
            • Makes an html word
            • global event handler
            • set the theme
            • Run code block
            • Create a raw record from a raw table .
            • Wrap write function
            • Search for new URL
            • Function to update a play button
            • Set raw values for a raw column
            • Do the search term
            Get all kandi verified functions for this library.

            WatermelonDB Key Features

            No Key Features are available at this moment for WatermelonDB.

            WatermelonDB Examples and Code Snippets

            No Code Snippets are available at this moment for WatermelonDB.

            Community Discussions

            QUESTION

            React Native WatermelonDB Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
            Asked 2022-Jan-26 at 17:29

            So I installed WatermelonDB for React Native and wanted to use it. I did everything exactly like in the installation guide but it seems like it didn't work.
            This is the error I get:

            This are my dependecies:

            ...

            ANSWER

            Answered 2022-Jan-26 at 17:29

            The docs are actually wrong. For everybody having the same problem:

            index.js

            Source https://stackoverflow.com/questions/70813646

            QUESTION

            `.pipe()` not executing `debounceTime`
            Asked 2022-Jan-04 at 21:34

            I'm trying to debounce() an Observable with pipe() and chaining .subscribe() but for some reason the function in the subscribe is still being called over a dozen times in one go.

            What I'm trying to do is pipe the withChangesForTables and debounce the sync call because I want it to be called only when a whole batch of changes have been made. So I created a provider for the sync and wrapped it around my RootNavigator

            withChangesForTables on WatermelonDB source code

            ...

            ANSWER

            Answered 2022-Jan-04 at 21:34

            I had to move withChangesForTables into a useEffect and retrun it in order to unsubcribe which seems to have resolved the issue. The code now looks something like this:

            Source https://stackoverflow.com/questions/70382257

            QUESTION

            React Native Invariant Violation: "backdropFilter" is not a valid style property
            Asked 2021-Nov-02 at 07:31

            I encounter this error message when I start my react native app: Invariant Violation: "backdropFilter" is not a valid style property. I checked that I don't have any backdropFilter used in my source code. But I still got this error.

            full error message:

            ...

            ANSWER

            Answered 2021-Nov-02 at 07:31

            It is because backdropFilter is not one of the style props supported by react-native. You can remove it in you style sheet and the program should be able to work.

            Source https://stackoverflow.com/questions/69720579

            QUESTION

            Expo SQLite doesn't work for tables with Foreign Key
            Asked 2021-Jan-31 at 21:29

            I have a React Native project managed by expo and I am trying to work on an offline database so ended up going with the expo-sqlite package since everything else that is better (watermelondb, pouchdb, realm etc.) doesn't work with expo managed workflow. So very basic table creation is working fine, but whenever I am trying to add a foreign key it just says that the parent table can't be resolved. So in the following chunk of code, the error is Unable to resolve table 'Profile'.

            Below is a good picture to illustrate what I am seeing on IntelliJ. So far I haven't found any way of selecting a Datasource since if you are developing with expo the very basic way (not specifically for android or iOS) then there's no way to choose the Datasource.

            I know that you would also have to turn on PRAGMA Foreign Keys and I have done so as well first with tx.executeSql and finally what you see below (that's how it currently is).

            I have also gone to Project Structure and tried out SQLite, GeneralSQL, and MySQL for SQL Dialects under Langauge and Framework.

            I am launching the expo app on an iOS device if that makes any difference at all.

            ...

            ANSWER

            Answered 2021-Jan-31 at 21:29

            The problem wasn't anything to do with this specific table but another one similar to this one later down the file. Also disregard the red on table_name and column_id, since that is something not solvable with how IntelliJ IDEA is setup (at least with what I have come to figure out!)

            So initially I had the code like the following. Notice how the foreign key is declared on line 4

            After a whole lot of commenting and uncommenting chunks of code, I found out that this was the one that was causing the problem. So I found out in this github issue that you can write transaction in the following way:

            Source https://stackoverflow.com/questions/65983477

            QUESTION

            Multiple Async Await with for loop
            Asked 2020-Nov-08 at 17:08

            I want to run multiple functions with async/await including a for loop as well. The loop also needed to be run one another is done. Currently I'm using this function and seems like it is not working correctly.

            For the for loop query I need the id created in first query to perform it.

            ...

            ANSWER

            Answered 2020-Nov-08 at 17:08

            Yes you are right!. It will not work properly with multiple database create record requests together.

            Whenever you make more than one change (create, delete or update records) in an action, you should batch them.

            See: https://nozbe.github.io/WatermelonDB/Actions.html

            You can do like that:

            Source https://stackoverflow.com/questions/64734517

            QUESTION

            WatermelonDB - Error when performing batch insertion
            Asked 2020-Mar-12 at 12:11

            I have a single table created on WatermelonDB, in my React Native Android app. When I use batch to insert new records to the table, from a component, I get the error TypeError: Cannot read property 'id' of undefined thrown inside batch.

            This is where batch is called with a list of Promise objects:

            ...

            ANSWER

            Answered 2020-Mar-12 at 12:11

            Issue was with the async keyword.

            Source https://stackoverflow.com/questions/60541202

            QUESTION

            How to pass custom props when using React Navigation version 5?
            Asked 2020-Feb-13 at 19:32

            I have upgraded to React Navigation v5 in my app. I am using watermelondb in my app. While using ReactNavigationv4, I used to pass the database props as follows

            ...

            ANSWER

            Answered 2020-Feb-13 at 19:32

            You should use React context API to pass your database to all screens: https://reactjs.org/docs/context.html

            Source https://stackoverflow.com/questions/60205483

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            In WatermelonDB (NPM package "@nozbe/watermelondb") before versions 0.15.1 and 0.16.2, a maliciously crafted record ID can exploit a SQL Injection vulnerability in iOS adapter implementation and cause the app to delete all or selected records from the database, generally causing the app to become unusable. This may happen in apps that don't validate IDs (valid IDs are `/^[a-zA-Z0-9_-.]+$/`) and use Watermelon Sync or low-level `database.adapter.destroyDeletedRecords` method. The integrity risk is low due to the fact that maliciously deleted records won't synchronize, so logout-login will restore all data, although some local changes may be lost if the malicious deletion causes the sync process to fail to proceed to push stage. No way to breach confidentiality with this vulnerability is known. Full exploitation of SQL Injection is mitigated, because it's not possible to nest an insert/update query inside a delete query in SQLite, and it's not possible to pass a semicolon-separated second query. There's also no known practicable way to breach confidentiality by selectively deleting records, because those records will not be synchronized. It's theoretically possible that selective record deletion could cause an app to behave insecurely if lack of a record is used to make security decisions by the app. This is patched in versions 0.15.1, 0.16.2, and 0.16.1-fix

            Install WatermelonDB

            You can install using 'npm i @nozbe/watermelondb' or download it from GitHub, npm.

            Support

            If there's a missing feature, a bug, or other improvement you'd like, we encourage you to contribute! Feel free to open an issue to get some guidance and see Contributing guide for details about project setup, testing, etc.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Nozbe/WatermelonDB.git

          • CLI

            gh repo clone Nozbe/WatermelonDB

          • sshUrl

            git@github.com:Nozbe/WatermelonDB.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link