{"id":17012821,"url":"https://github.com/hypherionmc/jqlite","last_synced_at":"2026-05-09T06:36:13.036Z","repository":{"id":56779945,"uuid":"337198152","full_name":"hypherionmc/jqlite","owner":"hypherionmc","description":"A Java Library for SQLite","archived":false,"fork":false,"pushed_at":"2022-12-01T18:58:44.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"v2","last_synced_at":"2025-06-11T18:26:50.977Z","etag":null,"topics":["database","java","java-8","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypherionmc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-08T20:17:24.000Z","updated_at":"2022-08-15T20:30:56.000Z","dependencies_parsed_at":"2023-01-22T19:46:11.263Z","dependency_job_id":null,"html_url":"https://github.com/hypherionmc/jqlite","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hypherionmc/jqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypherionmc%2Fjqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypherionmc%2Fjqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypherionmc%2Fjqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypherionmc%2Fjqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypherionmc","download_url":"https://codeload.github.com/hypherionmc/jqlite/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypherionmc%2Fjqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["database","java","java-8","sqlite3"],"created_at":"2024-10-14T06:11:35.242Z","updated_at":"2026-05-09T06:36:13.014Z","avatar_url":"https://github.com/hypherionmc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JQLite - An Easy SQLite Java Wrapper\n\n***\n\n### Note: This library has been successfully used in Discord Bots and Minecraft mods. \n\nFrom V1.x, Version `1.0.4` is the only properly working version. \n\n***\n\n#### What is this library?\nThis library is intended to make working with SQLite databases in java projects easier. It provides some easy to use features which could save you a lot of development time.\n\n\n#### How do I use this library?\nTo use this library, you first need to add it.\n\nAdd the following to the repositories block of your `build.gradle` file:\n\n```gradle\n// For latest releases\nmaven { url 'https://maven.firstdarkdev.xyz/releases' }\n\n// For Snapshots/Betas\nmaven { url 'https://maven.firstdarkdev.xyz/snapshots' }\n```\n\n\u0026nbsp;\n\n![](https://maven.firstdarkdev.xyz/api/badge/latest/releases/me/hypherionmc/JQLite?color=40c14a\u0026name=Latest%20Stable) ![](https://maven.firstdarkdev.xyz/api/badge/latest/snapshots/me/hypherionmc/jqlite/JQLite?color=FF0000\u0026name=Latest%20Snapshot)\n\nThen add the following to dependencies:\n\n```gradle\n// Replace VERSION with one from above\nimplementation 'me.hypherionmc.jqlite:JQLite:VERSION'\n```\nNo need for any other dependencies as they are included in the library.\n\n---\n\n#### Getting Started\n\nTo get started, you first need to create a new `JQLite` instance.\n\n```java\n// Replace testdb with your database name\nprivate final SQLiteDatabase database = new SQLiteDatabase(\"testdb\");\n```\n\nNext, you need to create a \"Table Class\".\n\n```java\npublic class MyTableName extends SQLiteTable {\n\n    // This is the primary, autoincrementing key; \n    // THIS MUST ALWAYS BE AT THE TOP ABOVE EVERYTHING ELSE!!!\n    @SQLColumn(SQLColumn.Type.PRIMARY)\n    private int id;\n\n    @SQLColumn(value = SQLColumn.Type.VARCHAR, maxSize = 255)\n    private String name; // A basic VARCHAR column limited to 255 characters\n\n    @SQLColumn(SQLColumn.Type.BOOLEAN)\n    private boolean isRegistered; // A basic Boolean column\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setRegistered(boolean registered) {\n        isRegistered = registered;\n    }\n\n    public boolean isRegistered() {\n        return isRegistered;\n    }\n\n    public int getId() {\n        return id;\n    }\n\n}\n```\n\nThen you need to register the Table to the Database engine using \n```\n// Single Table\ndatabase.registerTable(myTableName);\n\n// Multiple Tables\ndatabase.registerTable(table1, table2, table3);\n```\n\nEach class extending `SQLiteTable` comes with the following methods:\n\n* insert\n* update\n* fetchAll\n* fetch\n* delete\n* insertUnique\n* insertOrUpdate\n\n#### Examples\n\nBasic insert example\n\n```java\nMyTableName myTable = new MyTableName();\ndatabase.registerTable(myTable); // This only needs to be done once!\nmyTable.setName(\"John Doe\");\nmyTable.setRegistered(true);\n\nmyTable.insert(database);\n```\n\nBasic update example\n\n```java\nMyTableName myTable = new MyTableName();\nmyTable.fetch(\"name = 'John Doe'\");\nmyTable.setRegistered(false);\n\nmyTable.update(database);\n```\n\nBasic delete example\n\n```java\nMyTableName myTable = new MyTableName();\nmyTable.fetch(\"name = 'John Doe'\");\n\nmyTable.delete(database);\n```\n\nBasic fetchAll example\n\n```java\nMyTableName myTable = new MyTableName();\nList\u003cMyTableName\u003e tableList = myTable.fetchAll(database);\n\nfor (MyTableName myTable1 : tableList) {\n    System.out.println(myTable1.getName());\n}\n```\n\nBasic fetchAll with filter example\n\n```java\nMyTableName myTable = new MyTableName();\nList\u003cMyTableName\u003e tableList = myTable.fetchAll(database, \"name = 'John Doe'\");\n\nfor (MyTableName myTable1 : tableList) {\n    System.out.println(myTable1.getName());\n}\n```\n\nBasic insertUnique example\n\n```java\nMyTableName myTable = new MyTableName();\nmyTable.setName(\"John Doe\");\nmyTable.setRegistered(true);\n\n// This will return TRUE if the entry was inserted, \n// or false, if a duplicate already exists\nmyTable.insertUnique(database, \"name = 'John Doe'\");\n```\n\nBasic insertOrUpdate example\n\n```java\nMyTableName myTable = new MyTableName();\nmyTable.setName(\"John Doe\");\nmyTable.setRegistered(true);\n\n// If a duplicate entry is found, it will be updated,\n// otherwise it will be inserted\nmyTable.insertOrUpdate(database, \"name = 'John Doe'\");\n```\n\nIf you need help with this library, please join my [discord](https://discord.gg/PdVnXf9) or open an Issue above\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypherionmc%2Fjqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypherionmc%2Fjqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypherionmc%2Fjqlite/lists"}