mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-07 09:53:25 +00:00
1.7 KiB
1.7 KiB
🧩 Database (kotlin multi platform compatible)
Flocon gives you direct access to your app’s local databases (SQLite, Room, etc.), with a clean interface for exploring and querying data.
Features include:
- Listing all available databases
- Display all database tables & schemas
- Running custom SQL queries in tabs
- Auto update queries
- Save queries as favorite
- Generate Insert & Delete queries
This makes it easy to debug persistent storage issues, verify migrations, or test app behavior with specific data sets — all without leaving your IDE.
On android there's nothing to add, but on a multi platform project, you need to provide the database's path to flocon
// on a desktop project
val dbFile = File(System.getProperty("java.io.tmpdir"), "flocon_food_database.db")
floconRegisterDatabase(
displayName = "food",
absolutePath = dbFile.absolutePath,
)
return Room.databaseBuilder<FoodDatabase>(
name = dbFile.absolutePath,
)
.setDriver(BundledSQLiteDriver())
.setQueryCoroutineContext(Dispatchers.IO)
.build()
// on an ios project
val dbFile = "${documentDirectory()}/dog_database.db"
floconRegisterDatabase(
absolutePath = dbFile,
displayName = "Dog Database"
)
return Room.databaseBuilder<DogDatabase>(
name = dbFile,
)
.setDriver(NativeSQLiteDriver())
.build()