{"id":50421058,"url":"https://github.com/tirion-tools/libliveconnect","last_synced_at":"2026-05-31T08:03:04.618Z","repository":{"id":359995009,"uuid":"1248287122","full_name":"tirion-tools/libliveconnect","owner":"tirion-tools","description":"Thin C++17 SQL Server ODBC wrapper. Connection, scalar query, result-set capture, mid-flight cancel.","archived":false,"fork":false,"pushed_at":"2026-05-24T13:12:30.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-24T15:12:04.170Z","etag":null,"topics":["sql-server"],"latest_commit_sha":null,"homepage":"","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/tirion-tools.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T12:50:50.000Z","updated_at":"2026-05-24T13:12:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tirion-tools/libliveconnect","commit_stats":null,"previous_names":["tirion-tools/libliveconnect"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tirion-tools/libliveconnect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirion-tools%2Flibliveconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirion-tools%2Flibliveconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirion-tools%2Flibliveconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirion-tools%2Flibliveconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tirion-tools","download_url":"https://codeload.github.com/tirion-tools/libliveconnect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirion-tools%2Flibliveconnect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33723550,"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-05-31T02:00:06.040Z","response_time":95,"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":["sql-server"],"created_at":"2026-05-31T08:03:03.804Z","updated_at":"2026-05-31T08:03:04.613Z","avatar_url":"https://github.com/tirion-tools.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libliveconnect\n\nThin C++17 SQL Server ODBC wrapper. Connection, scalar query, result-set capture, mid-flight cancel.\n\nMaintained by [Tirion](https://tirion.tools). Used by [Calliper](https://github.com/tirion-tools/calliper). MIT.\n\n## Status\n\n1.0. Stable API.\n\n## Surface\n\nEverything in `include/liveconnect/liveconnect.hpp`:\n\n| Type | Purpose |\n|---|---|\n| `liveconnect::LiveConnectError` | Exception with joined SQLSTATE + diagnostic chain |\n| `liveconnect::LiveAuth` | `SqlLogin` or `Integrated` |\n| `liveconnect::LiveConnectParams` | server / db / auth / encrypt / trust-cert / login-timeout |\n| `liveconnect::LiveConnection` | RAII handle. `connect`, `disconnect`, `is_connected`, `cancel` |\n| `LiveConnection::exec(sql)` | No-result statement (DDL, SET) |\n| `LiveConnection::exec_scalar_text(sql)` | First text cell of first row |\n| `LiveConnection::exec_text_rows(sql)` | All text cells, every result set, flat |\n| `LiveConnection::exec_with_resultsets(sql)` | Typed `ResultSet` per emitted set |\n| `LiveConnection::server_version()` / `server_major()` | Cached `@@VERSION` and `ProductMajorVersion` |\n| `liveconnect::odbc_quote(value)` | Brace-quote a connection-string keyword value |\n\n`cancel()` is thread-safe per ODBC's documented `SQLCancel` contract. Use it to interrupt a long-running query from a UI.\n\n## Usage\n\n```cpp\n#include \u003cliveconnect/liveconnect.hpp\u003e\n\nliveconnect::LiveConnectParams p;\np.server   = \"prodsql2-22\";\np.database = \"MyDb\";\np.user     = \"service-user\";\np.password = secret;\np.trust_server_certificate = true;\n\nliveconnect::LiveConnection c;\nc.connect(p);\nauto ver = c.exec_scalar_text(\"SELECT @@VERSION\");\nprintf(\"connected to %s\\n\", ver.c_str());\n\nauto rs = c.exec_with_resultsets(\"SELECT id, name FROM dbo.Foo\");\nfor (const auto\u0026 set : rs) {\n    for (int r = 0; r \u003c set.row_count; ++r) {\n        for (int col = 0; col \u003c set.column_count; ++col) {\n            printf(\"  %s=%s\",\n                   set.column_names[col].c_str(),\n                   set.rows[r * set.column_count + col].c_str());\n        }\n        printf(\"\\n\");\n    }\n}\n```\n\n## Building\n\n```bash\nsudo apt-get install -y build-essential cmake unixodbc-dev\ncmake -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build\nctest --test-dir build\n```\n\nCMake integration:\n\n```cmake\nadd_subdirectory(path/to/libliveconnect)\ntarget_link_libraries(my_app PRIVATE liveconnect::liveconnect)\n```\n\n## License\n\nMIT. Issues at [github.com/tirion-tools/libliveconnect](https://github.com/tirion-tools/libliveconnect).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirion-tools%2Flibliveconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftirion-tools%2Flibliveconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirion-tools%2Flibliveconnect/lists"}