{"id":32723420,"url":"https://github.com/formal-php/access-layer","last_synced_at":"2025-11-02T23:02:13.256Z","repository":{"id":56982478,"uuid":"343122603","full_name":"formal-php/access-layer","owner":"formal-php","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-09T15:10:25.000Z","size":1867,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-09-22T03:55:22.087Z","etag":null,"topics":["connection","database"],"latest_commit_sha":null,"homepage":"http://formal-php.github.io/access-layer/","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/formal-php.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-02-28T14:17:30.000Z","updated_at":"2025-04-11T13:18:00.000Z","dependencies_parsed_at":"2024-02-10T12:28:58.989Z","dependency_job_id":"0bcf3bac-16ff-4bcc-9846-c1dcce78ac20","html_url":"https://github.com/formal-php/access-layer","commit_stats":{"total_commits":74,"total_committers":1,"mean_commits":74.0,"dds":0.0,"last_synced_commit":"2a4f75c353ba948fbee61a9c4fedf29c91093c03"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/formal-php/access-layer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Faccess-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Faccess-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Faccess-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Faccess-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formal-php","download_url":"https://codeload.github.com/formal-php/access-layer/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Faccess-layer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282371968,"owners_count":26658350,"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","status":"online","status_checked_at":"2025-11-02T02:00:06.609Z","response_time":64,"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":["connection","database"],"created_at":"2025-11-02T23:02:07.454Z","updated_at":"2025-11-02T23:02:10.540Z","avatar_url":"https://github.com/formal-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# access-layer\n\n[![Build Status](https://github.com/formal-php/access-layer/workflows/CI/badge.svg?branch=master)](https://github.com/formal-php/access-layer/actions?query=workflow%3ACI)\n[![codecov](https://codecov.io/gh/formal-php/access-layer/branch/develop/graph/badge.svg)](https://codecov.io/gh/formal-php/access-layer)\n[![Type Coverage](https://shepherd.dev/github/formal-php/access-layer/coverage.svg)](https://shepherd.dev/github/formal-php/access-layer)\n\nThis a simple abstraction layer on top of builtin `\\PDO` class to offer a minimalist api.\n\nThe goal is separate expression of queries and their execution by using immutable structures and eliminating states wherever possible.\n\n\u003e [!IMPORTANT]\n\u003e you must use [`vimeo/psalm`](https://packagist.org/packages/vimeo/psalm) to make sure you use this library correctly.\n\n## Installation\n\n```sh\ncomposer require formal/access-layer\n```\n\n## Example\n\n```php\nuse Formal\\AccessLayer\\{\n    Connection\\Lazy,\n    Connection\\PDO,\n    Query\\SQL,\n    Row,\n};\nuse Innmind\\Url\\Url;\nuse Innmind\\Immutable\\Sequence;\n\n$connection = Lazy::of(static fn() =\u003e PDO::of(Url::of('mysql://user:pwd@127.0.0.1:3306/database_name')));\n\n$rows = $connection(SQL::of('SELECT * FROM `some_table`'));\n$rows; // instanceof Sequence\u003cRow\u003e\n```\n\n## Documentation\n\nComplete documentation can be found at \u003chttp://formal-php.github.io/access-layer/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformal-php%2Faccess-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fformal-php%2Faccess-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformal-php%2Faccess-layer/lists"}