Moor: Can I use the "Database Inspector" with moor?

Created on 17 Oct 2020  路  3Comments  路  Source: simolus3/moor

I was playing with the new function of Android Studio 4.1, the Database Inspector and since its documentation says it works _with libraries built on top of SQLite_ I was wonder if it works with Moor.

If it does, then for some reason I can't connect with it, it doesn't appear in the "debbugable processes detected".

Most helpful comment

You can use https://pub.dev/packages/moor_inspector in combination with IntelliJ/Android Studio plugin: https://plugins.jetbrains.com/plugin/15364-moor-inspector

Both are in alpha (and in need of more docs)

All 3 comments

Thanks for the issue. Unfortunately the Inspector doesn't support moor ffi. From its docs:

:star: __Note__: The Database Inspector only works with the SQLite library included in the Android operating system on API level 26 and higher. It doesn't work with other SQLite libraries that you bundle with your app.

Moor ffi uses another SQLite library bundled with the app. We're forced to do this since we can't dlopen("libsqlite3.so") on newer Android SDKs, but it also helps with compatibility.
While the Database Inspector won't work with moor ffi, I assume that using a FlutterQueryExecutor from moor_flutter should work since that uses the SQLite version from the operating system.

You can use https://pub.dev/packages/moor_inspector in combination with IntelliJ/Android Studio plugin: https://plugins.jetbrains.com/plugin/15364-moor-inspector

Both are in alpha (and in need of more docs)

This looks really cool, thanks for sharing @NicolaChimerapps :+1: ! I'll link to it from the documentation website.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

angel1st picture angel1st  路  4Comments

johrpan picture johrpan  路  4Comments

felixjunghans picture felixjunghans  路  4Comments

tony123S picture tony123S  路  4Comments

emshack picture emshack  路  3Comments