{"id":23569068,"url":"https://github.com/troublete/go-luadb","last_synced_at":"2026-04-18T11:02:12.234Z","repository":{"id":144056845,"uuid":"438731171","full_name":"troublete/go-luadb","owner":"troublete","description":"A Lua extension for database (Postgres) access.","archived":false,"fork":false,"pushed_at":"2022-01-05T17:28:33.000Z","size":11,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-16T08:09:21.161Z","etag":null,"topics":["database","db","extension","go","golang","lua","lua-extension","posgres","posgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/troublete.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-15T18:21:43.000Z","updated_at":"2023-01-09T12:31:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a8b3c40-5f45-497a-ab54-864334e878fd","html_url":"https://github.com/troublete/go-luadb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/troublete/go-luadb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troublete%2Fgo-luadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troublete%2Fgo-luadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troublete%2Fgo-luadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troublete%2Fgo-luadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troublete","download_url":"https://codeload.github.com/troublete/go-luadb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troublete%2Fgo-luadb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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","db","extension","go","golang","lua","lua-extension","posgres","posgresql"],"created_at":"2024-12-26T19:12:01.378Z","updated_at":"2026-04-18T11:02:12.215Z","avatar_url":"https://github.com/troublete.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# luadb\n\u003e a Lua extension for database access\n\n## Introduction\n\nThis extension provides database access. It currently supports:\n\n* PostgreSQL\n\n## Usage\n\n```lua\nlocal db = require('luadb')\ndb.connect_postgres('postgresql://...') -- connect via connection string\n\nok = db.ping() -- returns ok if ping successful; or throws an error\nrows = db.query('select * from ...') -- runs query and returns rows as table of tables; or throws an error\nlastId, rowsAffected = db.exec('insert into ...') -- executes query, and returns state vars as integers; or throws an error\n```\n\n## Build\n\nAssumes a Lua version is installed as static lib (`liblua.a`) (which is\nstandard at least for Lua 5.4) in `/usr/local/lib/`.\n\nTo build run:\n\n```bash\nmake build\n```\n\n## DBMS\n\n### PostgreSQL\n\n* Supports mapping for most generic types \n\t* `SMALLINT`, `INT`, `BIGINT` are returned as integer (which correlates to C double double)\n\t* `REAL`, `DOUBLE` are returned as number (which correlates to C double)\n\t* `CHAR`, `VARCHAR`, `TEXT` are returned as string\n\t* `DATE`, `TIME`, `TIMETZ`, `TIMESTAMP`,  `TIMESTAMPTZ` are returned a ISO8601 representing string\n\t* `BOOL` is returned as boolean\n\t* `BYTEA` is returned as \"byte table\"\n* Supports mapping of `JSON` and `JSONB` fields to Lua tables\n* Supports mapping of `NUMERIC` and `DECIMAL` to numbers\n* All not mapable data is returned as \"byte table\"\n\n## Contribute\n\nIt would be nice to grow this library to include also support for other\nrelational DBMS's. \n\nContributions are welcome. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroublete%2Fgo-luadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroublete%2Fgo-luadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroublete%2Fgo-luadb/lists"}