{"id":13578049,"url":"https://github.com/maxdoom-com/lsqlite","last_synced_at":"2025-04-05T15:32:15.866Z","repository":{"id":85552935,"uuid":"73636444","full_name":"maxdoom-com/lsqlite","owner":"maxdoom-com","description":"lua sqlite module","archived":false,"fork":false,"pushed_at":"2020-05-31T12:06:44.000Z","size":14,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T15:48:56.536Z","etag":null,"topics":["lua","lua-module","sqlite3","sqlite3-database"],"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/maxdoom-com.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-13T19:04:08.000Z","updated_at":"2024-04-26T16:25:26.000Z","dependencies_parsed_at":"2023-03-03T15:15:27.433Z","dependency_job_id":null,"html_url":"https://github.com/maxdoom-com/lsqlite","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/maxdoom-com%2Flsqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdoom-com%2Flsqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdoom-com%2Flsqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdoom-com%2Flsqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdoom-com","download_url":"https://codeload.github.com/maxdoom-com/lsqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247359281,"owners_count":20926398,"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":["lua","lua-module","sqlite3","sqlite3-database"],"created_at":"2024-08-01T15:01:26.626Z","updated_at":"2025-04-05T15:32:10.848Z","avatar_url":"https://github.com/maxdoom-com.png","language":"C","readme":"LSQlite\n=======\n\nLsqlite is a simple sqlite module i wrote back in 2010. It is still fully\nfunctional with lua 5.3 as of end 2017.\n\nUpdate: It's 2020 and I had to change two lines.\n\n\nSYNOPSIS\n--------\n\n```lua\nlsqlite = require(\"lsqlite\")\n\nlocal db = lsqlite.open(database)\ndb:exec(statements)\ndb:close(db)\n```\n\n\nSUMMARY\n-------\n\nThe lsqlite module is a minimalistic sqlite3 - lua module. \nYou can open a database, perform any sqlite statements on it and close it.\nIf you don't close the database, the garbage collector will do this for you.\n\n\nDESCRIPTION\n-----------\n\n- lsqlite.open(database) returns an lsqlite object or nil\n- db:exec(statements) executes one or more sqlite statments in one string and returns the output and an error description, if any\n- db:close() closes an open database\n\n\nBUILDING\n--------\n\n- building the library requires `gcc` with version \u003c `9`.\n- for gcc-9/-10 see [TROUBLE SHOOTING](#trouble-shooting)\n\nEXAMPLE\n-------\n\n```lua\nlsqlite = require(\"lsqlite\")\n\nlocal db = lsqlite.open(\"database.sqlite\")\nlocal results, error = db:exec(\"select * from my_table;\")\nfor i=1,#results do\n    for k,v in pairs(results[i]) do\n        print(k,v)\n    end\nend\ndb:close(db)\n```\n\n\nSPECIAL FILES\n-------------\n\nTo open an in memory database try\n\n```lua\nlsqlite = require(\"lsqlite\")\n\nlocal db = lsqlite.open(\":memory:\")\n```\n\n\nTROUBLE SHOOTING\n----------------\n\nCurrently there is an issue linking to the shared sqlite3.so on Debian\nwith gcc-9/-10. You may use the Makefile-Amalgamed to overcome this problem.\n\nFor this to work you must place sqlite3.c and sqlite3.h from an\narchive downloaded from https://www.sqlite.org/download.html in this\ndirectory.\n\nCompilation:\n\n```sh\nmake -f Makefile-Amalgamed\n```\n\n\nCOPYRIGHT\n---------\n\nCopyright © 2010-2020 by Nico Hoffmann. License is MIT. For the complete\ntext see the supplied documentation.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdoom-com%2Flsqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdoom-com%2Flsqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdoom-com%2Flsqlite/lists"}