andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.74k stars 521 forks source link

how to debag? how to view the contents of the table in react-native-debugger? #549

Open valery-lavrik opened 1 year ago

valery-lavrik commented 1 year ago

Everything works well. But it is very inconvenient because there is no way to visually examine the table.

Is there a way to connect some kind of debugger to the database to visualize the database?

MacKenzieHnC commented 1 year ago

Something inside the program would be awesome, but I don't think this repo's getting updated again anytime soon, so until then, there's SqliteStudio or any number of other GUI sqlite editors

valery-lavrik commented 1 year ago

@MacKenzieHnC But how can this program open a database in react-native

MacKenzieHnC commented 1 year ago

@valery-lavrik I don't understand the question. If you want to access the db, follow the documentation. Unless you're talking about in react-native-windows, in which case there's a hack you have to do, which I outlined here.

If you wanna look through the db in-program, you'll have to write the code for that yourself.

I promise I am trying to be helpful when I tell you that you have to be more thorough in how you ask programming questions or no one will be able to help you. What device are you compiling for? What have you tried? Where have you looked for answers? What is your level of experience? Is it that you don't know how to use this tool or are you unfamiliar with React Native paradigms?

valery-lavrik commented 1 year ago

@MacKenzieHnC Good afternoon! I'm sorry that I didn't accurately describe my question. I meant react-native (android or ios). How can I visually view the contents of the table? is there such a plugin in Flipper for example? or other ways?

MacKenzieHnC commented 1 year ago

To the best of my knowledge, no, not without just building the display logic yourself or some weird hack (like loading it to a variable and using your debugging tools). But there isn't anything I've found that would let you just scroll through the data directly; this repo just allows you to send SQL queries to a database.

So you have the ability to scan the db, but you have to build the tools to do so yourself if you insist on doing it purely through React.

I really do recommend SQLiteStudio for this function. It is extremely well-suited for this purpose; it just isn't React-based.

valery-lavrik commented 1 year ago

Thanks! I thought so. I will write my own debugging tool

MacKenzieHnC commented 1 year ago

You're welcome. Good luck!