{"id":3575,"url":"https://github.com/infinum/android_dbinspector","last_synced_at":"2026-02-09T21:17:45.049Z","repository":{"id":14405451,"uuid":"17116181","full_name":"infinum/android_dbinspector","owner":"infinum","description":"Android library for viewing, editing and sharing in app databases.","archived":false,"fork":false,"pushed_at":"2025-01-10T14:19:25.000Z","size":19121,"stargazers_count":955,"open_issues_count":4,"forks_count":93,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-04-13T15:05:54.525Z","etag":null,"topics":["android","android-development","android-library","couchbase","couchdb","database","database-management","db","open-source","sqlite","sqlite-editor","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-23T20:21:48.000Z","updated_at":"2025-01-06T06:38:18.000Z","dependencies_parsed_at":"2024-06-20T04:28:16.802Z","dependency_job_id":"12e7ce25-0ea9-4c32-ae92-b6521be053dd","html_url":"https://github.com/infinum/android_dbinspector","commit_stats":{"total_commits":628,"total_committers":20,"mean_commits":31.4,"dds":0.3487261146496815,"last_synced_commit":"10b9ac5013ca01e602976a615e754dff7001f11d"},"previous_names":["reisub/dbview"],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Fandroid_dbinspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Fandroid_dbinspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Fandroid_dbinspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Fandroid_dbinspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinum","download_url":"https://codeload.github.com/infinum/android_dbinspector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732485,"owners_count":21152852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-development","android-library","couchbase","couchdb","database","database-management","db","open-source","sqlite","sqlite-editor","sqlite3"],"created_at":"2024-01-05T20:16:45.363Z","updated_at":"2026-02-09T21:17:44.939Z","avatar_url":"https://github.com/infinum.png","language":"Kotlin","readme":"![Download](https://img.shields.io/maven-central/v/com.infinum.dbinspector/dbinspector) ![Validate Gradle Wrapper](https://github.com/infinum/android_dbinspector/workflows/Validate%20Gradle%20Wrapper/badge.svg) ![Code analysis](https://github.com/infinum/android_dbinspector/workflows/Code%20analysis/badge.svg) [![CodeFactor](https://www.codefactor.io/repository/github/infinum/android_dbinspector/badge)](https://www.codefactor.io/repository/github/infinum/android_dbinspector) [![codecov](https://codecov.io/gh/infinum/android_dbinspector/branch/master/graph/badge.svg?token=LlJaXeahQC)](https://codecov.io/gh/infinum/android_dbinspector)\n\n### \u003cimg align=\"left\" src=\"logo.svg\" width=\"48\"\u003e\n# DbInspector\n\n![UI](ui.png)\n\n_DbInspector_ provides a simple way to view the contents of the in-app database for debugging purposes.\nThere is no need to pull the database from a connected device.\nThis library also supports inspecting of the SQLite databases created by CouchBase Lite out of the box.\nWith this library you can:\n* preview all application sandbox databases\n* import single or multiple databases at once\n* search, delete, rename, copy, share a database\n* preview tables, views and triggers\n* preview table or view pragma\n* delete table contents\n* drop view or trigger\n* search table, view or trigger\n* sort table, view or trigger per column\n* execute any valid SQL command in editor per database connection\n\n## Getting started\nTo include _DbInspector_ in your project, you have to add buildscript dependencies in your project level `build.gradle` or `build.gradle.kts`:\n\n**Groovy**\n```groovy\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n**KotlinDSL**\n```kotlin\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\nThen add the following dependencies in your app `build.gradle` or `build.gradle.kts` :\n\n**Groovy**\n```groovy\ndebugImplementation \"com.infinum.dbinspector:dbinspector:5.4.9\"\nreleaseImplementation \"com.infinum.dbinspector:dbinspector-no-op:5.4.9\"\n```\n**KotlinDSL**\n```kotlin\ndebugImplementation(\"com.infinum.dbinspector:dbinspector:5.4.9\")\nreleaseImplementation(\"com.infinum.dbinspector:dbinspector-no-op:5.4.9\")\n```\n\n### Usage\n_DbInspector_ can be invoked **explicitly** or **implicitly**.\n* explicitly - call _DbInspector.show()_ anywhere and anytime that you see fit, like _onClick_ methods, lambdas or similar.\n* implicitly - when you add the _dbinspector_ package an Activity alias is automatically merged into your application manifest that in return creates a launcher icon for _DbInspector_,\nbut when you add the _dbinspector-no-op_ the same Activity alias node is automatically removed from your application manifest.\nImplicit way can be tweaked to achieve desired behaviour as demonstrated in an example below.\n\n**Explicit**\n```kotlin\nDbInspector.show()\n```\n**Implicit**\nIf you use _dbinspector_ package but *do not want* an additional automatic launcher icon merged in and generated.\n```xml\n\u003c!--suppress AndroidDomInspection --\u003e\n\u003cactivity-alias\n    android:name=\"com.infinum.dbinspector.DbInspectorActivity\"\n    tools:node=\"remove\" /\u003e\n```\nIf you use _DbInspector_ for a specific flavor and need to override merged in launcher label, you can provide a String resource in your project exactly like this:\n```xml\n\u003cstring name=\"dbinspector_launcher_name\"\u003eSample Debug\u003c/string\u003e\n```\nPlease do mind and copy over the suppression comment line too, if you need it.\nFurther modification can be done according to rules of [manifest merging](https://developer.android.com/studio/build/manifest-merge) and attributes of [activity-alias](https://developer.android.com/guide/topics/manifest/activity-alias-element) XML node.\n\n## Editor\n\n![Editor](editor.png)\n\n_DbInspector_ has a build in editor scoped per database connection currently used.  \nIt offers autocomplete of SQLite3 keywords and functions, current table and column names.  \nBuilt in editor also provides a history of executed statements, not matter if they were successful or not.  \nHistory of statements is persisted between sessions and can be cleared on demand at any point.  \nPanes between editors' input and result are scalable and can be adjusted by dragging the splitter between them.  \nLandscape mode is supported too for better result preview of large datasets.  \n\n## Logging\n_DbInspector_ provides a independent and built in logger mechanism. Per default logger is initiated as an `EmptyLogger` omitting any output whatsoever.  \nIn case logs output is required, `AndroidLogger` should be used as shown below:\n```kotlin\nDbInspector.show(logger = AndroidLogger())\n```\nAdditionally, `AndroidLogger` uses `Level` to filter out between info, debug, error or no messages at all.\n\n## Requirements\nMinimum required API level to use _DbInspector_ is **21** known as [Android 5.0, Lollipop](https://www.android.com/versions/lollipop-5-0/).\nAs of 4.0.0 version, AndroidX is required. If you cannot unfortunately migrate your project, keep the previous version until you get the opportunity to migrate to AndroidX.\n_DbInspector_ is written entirely in Kotlin, but also works with Java only projects and all combinations of both.\n\n## License\n\n```\nCopyright 2020 Infinum\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n## Credits\nMaintained and sponsored by [Infinum](http://www.infinum.com).\n\n\u003cp align=\"center\"\u003e\n  \u003ca href='https://infinum.com'\u003e\n    \u003cpicture\u003e\n        \u003csource srcset=\"https://assets.infinum.com/brand/logo/static/white.svg\" media=\"(prefers-color-scheme: dark)\"\u003e\n        \u003cimg src=\"https://assets.infinum.com/brand/logo/static/default.svg\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":["Utility","Libraries","Libs","库"],"sub_categories":["Database","\u003cA NAME=\"Utility\"\u003e\u003c/A\u003eUtility","[](https://github.com/JStumpp/awesome-android/blob/master/readme.md#database)数据库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinum%2Fandroid_dbinspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinum%2Fandroid_dbinspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinum%2Fandroid_dbinspector/lists"}