{"id":36976475,"url":"https://github.com/tonix-tuft/reactphp-mysql-decorator","last_synced_at":"2026-01-13T22:43:47.108Z","repository":{"id":34908944,"uuid":"189065946","full_name":"tonix-tuft/reactphp-mysql-decorator","owner":"tonix-tuft","description":"A decorator of the ReactPHP MySQL connection interface which augments its behaviour, e.g. providing binding of associative parameters.","archived":false,"fork":false,"pushed_at":"2022-12-07T00:02:32.000Z","size":414,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-17T23:59:15.526Z","etag":null,"topics":["mysql","php","reactphp"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/tonix-tuft.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":"2019-05-28T16:36:19.000Z","updated_at":"2023-04-28T18:51:59.000Z","dependencies_parsed_at":"2023-01-15T10:12:22.543Z","dependency_job_id":null,"html_url":"https://github.com/tonix-tuft/reactphp-mysql-decorator","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tonix-tuft/reactphp-mysql-decorator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonix-tuft%2Freactphp-mysql-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonix-tuft%2Freactphp-mysql-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonix-tuft%2Freactphp-mysql-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonix-tuft%2Freactphp-mysql-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonix-tuft","download_url":"https://codeload.github.com/tonix-tuft/reactphp-mysql-decorator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonix-tuft%2Freactphp-mysql-decorator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":["mysql","php","reactphp"],"created_at":"2026-01-13T22:43:46.431Z","updated_at":"2026-01-13T22:43:47.102Z","avatar_url":"https://github.com/tonix-tuft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReactPHP MySQL Decorator\n\nA decorator of the [ReactPHP MySQL](https://github.com/friends-of-reactphp/mysql) connection interface which augments its behaviour, e.g. providing binding of associative parameters.\n\n## Installation\n\nUsing [Composer](https://getcomposer.org/):\n\n```\ncomposer require tonix-tuft/reactphp-mysql-decorator\n```\n\n## Usage\n\nCurrently, the only available decorator is `BindAssocParamsConnectionDecorator`, which provides the binding of associative parameters like in standard PHP `PDO` objects.\n\n### BindAssocParamsConnectionDecorator\n\nThis decorator allows the binding of associative parameters in queries (named parameters). To use it just wrap a `React\\MySQL\\ConnectionInterface`:\n\n```php\n\u003c?php\n\n// ...\nuse React\\EventLoop\\Factory as LoopFactory;\nuse React\\MySQL\\Factory;\nuse ReactPHP\\MySQL\\Decorator\\BindAssocParamsConnectionDecorator;\n\n// ...\n$loop = LoopFactory::create();\n$factory = new Factory($loop);\n\n$uri = 'username:password@localhost/dbname';\n$connection = $factory-\u003ecreateLazyConnection($uri); // returns a React\\MySQL\\ConnectionInterface\n\n$connectionWithBindAssocParams = new BindAssocParamsConnectionDecorator($connection);\n\n// Now you can bind associative parameters when you execute your queries.\n$value = 123;\n$connectionWithBindAssocParams-\u003equery('SELECT * FROM table WHERE field = :value', [\n   ':value' =\u003e $value\n])-\u003ethen(\n   // ...\n);\n\n```\n\n## Acknowledgements\n\n[friends-of-reactphp/mysql](https://github.com/friends-of-reactphp/mysql) - Async MySQL database client for ReactPHP.\n\n## License\n\nMIT © [Anton Bagdatyev (Tonix)](https://github.com/tonix-tuft)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonix-tuft%2Freactphp-mysql-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonix-tuft%2Freactphp-mysql-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonix-tuft%2Freactphp-mysql-decorator/lists"}