{"id":13513440,"url":"https://github.com/trilogy-libraries/trilogy","last_synced_at":"2026-01-15T22:19:06.121Z","repository":{"id":37494752,"uuid":"438713022","full_name":"trilogy-libraries/trilogy","owner":"trilogy-libraries","description":"Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.","archived":false,"fork":false,"pushed_at":"2026-01-07T00:51:09.000Z","size":590,"stargazers_count":756,"open_issues_count":35,"forks_count":82,"subscribers_count":139,"default_branch":"main","last_synced_at":"2026-01-13T04:10:10.951Z","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/trilogy-libraries.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2021-12-15T17:18:05.000Z","updated_at":"2026-01-07T11:21:35.000Z","dependencies_parsed_at":"2024-04-08T14:48:59.745Z","dependency_job_id":"feff6e2c-7870-4476-ab60-d51ba5abf287","html_url":"https://github.com/trilogy-libraries/trilogy","commit_stats":null,"previous_names":["github/trilogy"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/trilogy-libraries/trilogy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trilogy-libraries%2Ftrilogy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trilogy-libraries%2Ftrilogy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trilogy-libraries%2Ftrilogy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trilogy-libraries%2Ftrilogy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trilogy-libraries","download_url":"https://codeload.github.com/trilogy-libraries/trilogy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trilogy-libraries%2Ftrilogy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-08-01T05:00:25.246Z","updated_at":"2026-01-15T22:19:06.102Z","avatar_url":"https://github.com/trilogy-libraries.png","language":"C","readme":"# Trilogy\n\nTrilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.\n\nIt's currently in production use on github.com.\n\n## Features\n\n* Supports the most frequently used parts of the text protocol\n    * Handshake\n    * Password authentication\n    * Query, ping, and quit commands\n\n* Support prepared statements (binary protocol)\n\n* Low-level protocol API completely decoupled from IO\n\n* Non-blocking client API wrapping the protocol API\n\n* Blocking client API wrapping the non-blocking API\n\n* No dependencies outside of POSIX, the C standard library \u0026 OpenSSL\n\n* Minimal dynamic allocation\n\n* MIT licensed\n\n## Limitations\n\n* Only supports the parts of the text protocol that are in common use.\n\n* No support for `LOAD DATA INFILE` on local files\n\n* `trilogy_escape` assumes an ASCII-compatible connection encoding\n\n## Building\n\n`make` - that's it. This will build a static `libtrilogy.a`\n\nTrilogy should build out of the box on most UNIX systems which have OpenSSL installed.\n\n## API Documentation\n\nDocumentation for Trilogy's various APIs can be found in these header files:\n\n* `blocking.h`\n\n    The blocking client API. These are simply a set of convenient wrapper functions around the non-blocking client API in `client.h`\n\n* `client.h`\n\n    The non-blocking client API. Every command is split into a `_send` and `_recv` function allowing callers to wait for IO readiness externally to Trilogy\n\n* `builder.h`\n\n    MySQL-compatible packet builder API\n\n* `charset.h`\n\n    Character set and encoding tables\n\n* `error.h`\n\n    Error table. Every Trilogy function returning an `int` uses the error codes defined here\n\n* `packet_parser.h`\n\n    Streaming packet frame parser\n\n* `protocol.h`\n\n    Low-level protocol API. Provides IO-decoupled functions to parse and build packets\n\n* `reader.h`\n\n    Bounds-checked packet reader API\n\n## Bindings\n\nWe maintain a [Ruby binding](contrib/ruby) in this repository. This is currently stable and production-ready.\n\n## License\n\nTrilogy is released under the [MIT license](LICENSE).\n","funding_links":[],"categories":["Database","C","Database Drivers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrilogy-libraries%2Ftrilogy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrilogy-libraries%2Ftrilogy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrilogy-libraries%2Ftrilogy/lists"}