{"id":13848826,"url":"https://github.com/novoda/sqlite-analyzer","last_synced_at":"2025-07-12T13:32:48.827Z","repository":{"id":13318231,"uuid":"16004885","full_name":"novoda/sqlite-analyzer","owner":"novoda","description":"Code generation for Java/Android database access.","archived":true,"fork":false,"pushed_at":"2022-02-11T01:11:49.000Z","size":4801,"stargazers_count":65,"open_issues_count":0,"forks_count":8,"subscribers_count":54,"default_branch":"master","last_synced_at":"2024-07-01T10:57:10.524Z","etag":null,"topics":["novoda","open-source","sqlite-analyzer","sqlite-database"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novoda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-17T16:27:22.000Z","updated_at":"2024-06-28T19:05:15.000Z","dependencies_parsed_at":"2022-08-25T15:40:43.346Z","dependency_job_id":null,"html_url":"https://github.com/novoda/sqlite-analyzer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoda%2Fsqlite-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoda%2Fsqlite-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoda%2Fsqlite-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoda%2Fsqlite-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novoda","download_url":"https://codeload.github.com/novoda/sqlite-analyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213949824,"owners_count":15661677,"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":["novoda","open-source","sqlite-analyzer","sqlite-database"],"created_at":"2024-08-04T19:00:58.767Z","updated_at":"2024-08-04T19:03:27.740Z","avatar_url":"https://github.com/novoda.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# 🛑 THIS REPOSITORY IS OFFICIALLY NO LONGER UNDER MAINTENANCE since 10/02/2022 🛑\n\n# sqlite-analyzer [![CI status](https://ci.novoda.com/buildStatus/icon?job=sqlite-analyzer)](https://ci.novoda.com/job/sqlite-analyzer/lastBuild/console) [![Download from Bintray](https://api.bintray.com/packages/novoda/maven/sqlite-analyzer/images/download.svg)](https://bintray.com/novoda/maven/sqlite-analyzer/_latestVersion) [![Apache 2.0 Licence](https://img.shields.io/github/license/novoda/sqlite-analyzer.svg)](https://github.com/novoda/sqlite-analyzer/blob/master/LICENSE.txt)\n\nCode generation for Java/Android database access.\n\n## Description\n\nGenerates java/android database access code by analysing sqlite migration files or sqlite databases,\nkeeping full control of what code is generated.\n\nsqlite-analyzer creates an in-memory sqlite database, either from a given database file or by reading sql migrations,\nand analyzes its tables to construct a DatabaseModel. This model is then used to generate database access code.\n\nThis project uses [sqlite-jdbc](https://bitbucket.org/xerial/sqlite-jdbc) to create and analyze the database.\n[Groovy](http://groovy.codehaus.org/) is used to generate code, [Gradle](http://www.gradle.org/) to hook\nthe functionality into the [android build system](http://tools.android.com/tech-docs/new-build-system).\n\n## Adding to your project\n\nTo integrate sqlite-analyzer into your project, add the following at the beginning of the `build.gradle` of your project:\n\n```groovy\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.novoda:sqlite-analyzer:0.3.2'\n    }\n}\n```\n\nTo use the library with [sqlite-provider](https://github.com/novoda/sqlite-provider), add these lines to the `build.gradle` of your project:\n\n```groovy\napply plugin: 'com.novoda.sqlite-analyzer'\n\nsqliteAccess {\n    migrationsDir 'src/main/assets/migrations'\n    packageName 'com.novoda.sqliteprovider.demo.simple'\n}\n```\n\nSee the sample projects for setup with [android-sqlite-asset-helper](https://github.com/jgilfelt/android-sqlite-asset-helper).\n\n\n## Simple usage\n\nTry `./gradlew clean assembleDebug` and observe the generated code under `build/generated/source/sqlite/debug/`.\n\nBy default, it contains one single class `DB` that defines constants for the names of the tables and columns and\nintroduces static accessor methods as well as model classes for all tables data.\n\nThe project comes with 2 demo applications that create and use database access code,\none uses [sqlite-provider](https://github.com/novoda/sqlite-provider),\nthe other uses [android-sqlite-asset-helper](https://github.com/jgilfelt/android-sqlite-asset-helper).\n\n**Use column names**\n``` java\nqueryBuilder.appendWhere(DB.Columns.Shop.Name + \" like 'A%'\")\n```\n\nSimplified use with static import \n``` java\nprojection = new String[] {Employees.Firstname, Employees.Lastname};\n```\n\n**Use model classes**\n``` java\npublic void onLoadFinished(Loader\u003cCursor\u003e cursorLoader, Cursor cursor) {\n    DB.Shop shop = DB.Shop.fromCursor(cursor);\n}\n```\n\n**Use helpers for ContentValues**\n``` java\nContentValues values = new ContentValues(1);\nDB.Shop.setName(\"New Shop\", values);\n```\n\n## Links\n\nHere are a list of useful links:\n\n * We always welcome people to contribute new features or bug fixes, [here is how](https://github.com/novoda/novoda/blob/master/CONTRIBUTING.md)\n * If you have a problem check the [Issues Page](https://github.com/novoda/sqlite-analyzer/issues) first to see if we are working on it\n * For further usage or to delve more deeply checkout the [Project Wiki](https://github.com/novoda/sqlite-analyzer/wiki)\n * Looking for community help, browse the already asked [Stack Overflow Questions](http://stackoverflow.com/questions/tagged/support-sqlite-analyzer) or use the tag: `support-sqlite-analyzer` when posting a new question\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovoda%2Fsqlite-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovoda%2Fsqlite-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovoda%2Fsqlite-analyzer/lists"}