Firebase Testing Data - firebase

We've been using Firebase for the past 7-8 months now.
It has been a really awesome tool, and thanks for the effort.
Here I have a question regarding whether there is a way to modify the data without actually writing to DB.
Cause most often when we debug something we always write to our live db, then we have to delete them manually. You can image how painful it is.
So is there like a test db where we can write stuff without worrying about modifying the db?
I can just export the whole db every time I want to write something, then import it back once I'm done. But it is a rather tedious procedure. And what if I am doing something to auth which there is no way to export users data at the moment.

The Firebase blog has a nice article about End-to-end Testing with firebase-server. This may be the solution for you.

Related

Trying to find a good way to convert HTML to PDF

how are you. For a while I've been working for a Gynecologist building her a data base. For the project I am using Firebase and JavaScript. The database is for her to keep track of their patients and she keeps reports on each one of them. I am almost done with the job, the UI is almost finished, the core functionalities of the database (save data, delete, retreive, and update) are up and running but I am stuck in one little thing. She asked me for a way to turn those reports she keeps in the database into a format like PDF so she can print them and give them in case needed to her patients. The thing is that Ive tried with html2pdf, a git repository that works kind of clunky, and tried looking for others but I still cant find one that works correctly. So I wanted to ask you guys if you know of some alternatives. I started thinking about using EXCEl or Word document. But either way it seems quite complicated. Thank you for your time.
Best to all.

Pagination of data in Flutter with Firebase

I'm writing an app with a database of users. I want to show these to people on the app, and as such, in order to limit the download of data, I'm using the standard Firebase pagination concept:
.startAtDocument(lastDocumentSeen)
The problem is, I have no idea what actually happens when the 'read head' gets to the end of the database? Does Firebase/Flutter loop back and start to look at the top of the database again? If not, how does it signal to me that I've reached the end?
I've done quite extensive googling about this, and searched StackOverflow too, but can't seem to find any clear answers - does anyone know?
Assuming you have a query like this:
collectionRef.orderBy("something").startAfter(cursor).limit(10)
If there are not enough documents to return 10 results, Firestore will simply return however many documents are left. It does not perform any tricks beyond that.
You can use fetch_more package for pagination, it’s easy to use. You can see an example in the Example tab.
https://pub.dev/packages/fetch_more

Firebase Real-Time Database size doubled

About 3 days Ago our Real-time Database Storage doubled really fast, we don't have much data since we just store user-s data and we do not have much users, but this made me think if someone found a way to write data on a way they should not or whatever.
Our database structure is:
/users/
-/UID_1/profile
-/UID_2/profile
I strongly believe that any of these guys wrote a bunch of something, but I am not able to know size on each "record" or how to call
Here, I should write on what did I try, but I didn't try anything yet, I am not sure on what to do, It's production db, and I am a bit afraid to touch it.
PS.
I have the backup file, it's about 25mb large when unzipped.
Looking forward to receive any suggestions,
Cheers

Alternate to fallbackToDestructiveMigration()?

I don't want to provide a migration script while changing table schema in realm java. Also, app should not crash and all the previous data should be erased or truncated something similar to fallbackToDestructiveMigration() as room dose?
Realm provides RealmConfiguration.Builder().deleteIfMigrationNeeded()..., where deleteIfMigrationNeeded() does exactly what you are looking for.

How do I modify the structure of a live Firebase DB?

I have a Firebase realtime database that was architected very poorly by the original developer, and I need to drastically change its structure and move the existing data around. Is it possible to migrate the existing data without literally copy and pasting items? You know, the sort of thing that's trivially easy with an ordinary database....

Resources