{"id":18656726,"url":"https://github.com/zendesk/sqlitemaster","last_synced_at":"2025-04-11T18:31:11.913Z","repository":{"id":11064995,"uuid":"13407171","full_name":"zendesk/sqlitemaster","owner":"zendesk","description":"Android library for getting existing db schema information from sqlite_master table.","archived":false,"fork":false,"pushed_at":"2023-04-09T17:15:39.000Z","size":136,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-03-25T16:55:28.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/zendesk.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":"2013-10-08T08:02:23.000Z","updated_at":"2023-06-14T22:34:48.000Z","dependencies_parsed_at":"2022-09-01T20:40:45.472Z","dependency_job_id":null,"html_url":"https://github.com/zendesk/sqlitemaster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Fsqlitemaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Fsqlitemaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Fsqlitemaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Fsqlitemaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zendesk","download_url":"https://codeload.github.com/zendesk/sqlitemaster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458427,"owners_count":21107077,"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":[],"created_at":"2024-11-07T07:24:56.336Z","updated_at":"2025-04-11T18:31:11.485Z","avatar_url":"https://github.com/zendesk.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"DEPRECATED\n==========\nThis library was incorporated into [android-schema-utils](https://github.com/futuresimple/android-schema-utils) library.\n\nSQLiteMaster\n============\nAndroid library for getting existing db schema information from sqlite_master table.\n\nBasic usage\n-----------\nYou can use the schema information in your SQLiteOpenHelper's `onCreate` and `onUpgrade` to remove some boilerplate code. Compare:\n\n```java\ndb.execSQL(\"DROP TRIGGER IF EXISTS trigger_a\");\ndb.execSQL(\"DROP TRIGGER IF EXISTS trigger_b\");\ndb.execSQL(\"DROP TRIGGER IF EXISTS trigger_c\");\n// ...\ndb.execSQL(\"DROP TRIGGER IF EXISTS trigger_z\");\n```\n\nWith:\n```java\nSQLiteMaster.dropTriggers(db);\n```\n\nYou can perform similar operations with views, tables and indexes, or you can access the full schema information using `getSQLiteSchemaParts(SQLiteDatabase db, SQLiteSchemaPartType partType)` or `getSQLiteSchemaParts(SQLiteDatabase db)`, which return the list of `SQLiteSchemaPart` objects:\n\n```java\npublic class SQLiteSchemaPart {\n  public final String name;\n  public final String sql;\n  public final String type;\n}\n```\n\nWhat you do with that information is completely up to you.\n\nBuilding\n--------\nThis is standard maven project. To build it just execute:\n```shell\nmvn clean package\n```\nin directory with pom.xml.\n\nIs it safe to use?\n------------------\nOur tests indicate that there are no issues whatsoever on API level 8+ (Android 2.2). We haven't tested earlier versions, so consider yourself warned (and please let us know if you confirm it works on lower API levels!).\n\nTodo\n----\n* Documentation\n* Unit tests\n\nLicense\n-------\n    Copyright (C) 2013 Jerzy Chalupski\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Fsqlitemaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzendesk%2Fsqlitemaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Fsqlitemaster/lists"}