{"id":20256274,"url":"https://github.com/hazardland/db.android","last_synced_at":"2026-06-08T15:32:37.942Z","repository":{"id":24148316,"uuid":"27537888","full_name":"hazardland/db.android","owner":"hazardland","description":"android sqlite orm","archived":false,"fork":false,"pushed_at":"2016-01-18T15:20:13.000Z","size":917,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T18:43:47.633Z","etag":null,"topics":["android-orm","sqlite-orm"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hazardland.png","metadata":{"files":{"readme":"readme.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-04T11:41:17.000Z","updated_at":"2019-07-31T00:46:16.000Z","dependencies_parsed_at":"2022-08-18T23:22:38.605Z","dependency_job_id":null,"html_url":"https://github.com/hazardland/db.android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hazardland/db.android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazardland%2Fdb.android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazardland%2Fdb.android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazardland%2Fdb.android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazardland%2Fdb.android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazardland","download_url":"https://codeload.github.com/hazardland/db.android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazardland%2Fdb.android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-orm","sqlite-orm"],"created_at":"2024-11-14T10:46:02.996Z","updated_at":"2026-06-08T15:32:37.916Z","avatar_url":"https://github.com/hazardland.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"db.android\n================\n\nAndroid SQLite codefirst style ORM with Multi Threading Support\n\nAbout\n-----------\nFramework gives you ability to define class and save load query its objects without precreating any repository or any sqlite table.\n\n\nRequirements\n------------\n\n1. just include library\n\nUsage\n-----\nWe define class\n\n\tpublic class User extends Entity\n\t{\n\t\tpublic String login;\n\t\tpublic String password;\n\t\tpublic User ()\n\t\t{\n\t\t\n\t\t}\n\t}\n\n\tpublic class Apple extends Entity\n\t{\n\t\tpublic String color;\n\t\tpublic User user;\n\t\tpublic Apple ()\n\t\t{\n\t\t\n\t\t}\n\t}\n\nWe define database:\n\n\tpublic Database database;\n\nWe init database:\n\n\tdatabase = new Database(getBaseContext(), \"hazardland.apples\", 1);\n\nWe register tables:\n\n\tdatabase.add (User.class, new Table\u003cUser\u003e(database, User.class));\n\tdatabase.add (Apple.class, new Table\u003cApple\u003e(database, Apple.class));\n\nWe define users:\n\n\tUser user1 = new User ();\n\tuser1.login = 'Steve_Jobs';\n\t\n\tUser user2 = new User ();\n\tuser2.login = 'Bill_Gates';\n\nWe define apples:\n\n\tApple green_apple = new Apple ();\n\tgreen_apple.color = \"green\";\n\tgreen_apple.user = user1;\n\nWe save apples:\n\n\tdatabase.tables(Apple.class).save (green_apple);\n\nWe save users:\n\n\tdatabase.tables(User.class).save (user1);\n\tdatabase.tables(User.class).save (user2);\n\nThan night falls and users fall a sleep...\n\nNext morning:\n\nWe load users:\n\n\tArrayList \u003cUser\u003e users;\n\tusers.addAll(database.table(User.class).load());\n\nWe get user by id:\n  \n\tUser bill = database.table(User.class).load(1);\n\nWe load users's apples:\n\n\tArrayList \u003cApple\u003e bills_apples = database.table(Apple.class).of(bill);\n\nWe load users's in order, with limit or with custom sql query: using .load (new Query(database.table(Apple.class)))\n\n\nAnd much more....\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazardland%2Fdb.android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazardland%2Fdb.android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazardland%2Fdb.android/lists"}