{"id":26791983,"url":"https://github.com/dealloc/sqlite-wrapper","last_synced_at":"2025-03-29T15:19:04.612Z","repository":{"id":22879321,"uuid":"26227334","full_name":"dealloc/SQLite-wrapper","owner":"dealloc","description":"a small and simple C++ wrapper around SQLite","archived":false,"fork":false,"pushed_at":"2015-05-21T07:39:36.000Z","size":220,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T04:43:21.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/dealloc.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":"2014-11-05T16:02:36.000Z","updated_at":"2017-06-02T01:41:30.000Z","dependencies_parsed_at":"2022-08-21T15:50:08.393Z","dependency_job_id":null,"html_url":"https://github.com/dealloc/SQLite-wrapper","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/dealloc%2FSQLite-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dealloc%2FSQLite-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dealloc%2FSQLite-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dealloc%2FSQLite-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dealloc","download_url":"https://codeload.github.com/dealloc/SQLite-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200285,"owners_count":20739568,"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":"2025-03-29T15:19:03.493Z","updated_at":"2025-03-29T15:19:04.600Z","avatar_url":"https://github.com/dealloc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"SQLite-wrapper: SQLite made simple  \n===\n\n### what is it\nSQLite-wrapper provides a fluent and intuitive OOP wrapper around the low level C library of SQLite. it's syntax was loosely based on the popular PHP framework [laravel](http://laravel.com)'s Eloquent.\n\n### how to use it\nthe API is *transaction based*, this means that everything you do will be stored as a transaction until you *commit* the changes to the underlying database.\n\na small example of how to create a database:\n\n    Database *memorydb = new Database(); // create database in memory (deleted upon exit)\n    Database *diskdb = new Database(\"test.db\"); // create a database file \"test.db\"\n\nand here are some samples of how to perform basic **CRUD** tasks with the database:\n\n```c++\n// create a table\ndb-\u003ecreate(\"users\", [](CreateTransaction* schema)\n{\n\tschema-\u003einteger(\"id\")-\u003eincrements()-\u003eprimary();\n\tschema-\u003evarchar(\"username\")-\u003erequired();\n\tschema-\u003evarchar(\"password\")-\u003erequired();\n})-\u003egaurd(); // the 'gaurd' call is optional but makes sure IF NOT EXISTS is added\n\n// insert a data ito the database\ndb-\u003einsert(\"users\", [](InsertTransaction* table)\n{\n\ttable-\u003einsert(\"username\", \"user1\");\n\ttable-\u003einsert(\"password\", \"password1\");\n});\n\n// update the database\ndb-\u003eupdate(\"users\", [](UpdateTransaction* table)\n{\n\ttable-\u003eset(\"username\", \"username_1\");\n\ttable-\u003eset(\"password\", \"password_1\");\n\ttable-\u003ewhere(\"id\", \"1\")-\u003eandWhere(\"username\", \"user1\");\n});\n\n// and of course lookup data\ndb-\u003equery([](SelectTransaction* table)\n{\n\ttable-\u003efrom(\"users\");\n\ttable-\u003eselect(\"username\");\n});\n```\n\n**WARNING:** please note that all changes remain in memory untill they are commited like this:\n\n```c++\ndb-\u003ecommit();\n```\n\nthis will execute all pending transactions.\n\n## == ALPHA WARNING ==\nthis project is under active development and some (*key*) features are still unavailable. for example actually getting the data from a select query isn't implemented yet (coming *soon*)\nalso note that the checking for errors etc is currently (for the most part) omitted. these features will be implemented later on\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdealloc%2Fsqlite-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdealloc%2Fsqlite-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdealloc%2Fsqlite-wrapper/lists"}