{"id":21372662,"url":"https://github.com/torres-developer/pdowrapperapi","last_synced_at":"2025-03-16T08:44:58.023Z","repository":{"id":61520006,"uuid":"552147511","full_name":"torres-developer/PDOWrapperAPI","owner":"torres-developer","description":"An Wrapper API for the PHP PDO","archived":false,"fork":false,"pushed_at":"2023-01-16T21:32:34.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T21:14:45.382Z","etag":null,"topics":["composer","composer-library","composer-package","pdo","pdo-mysql","pdo-php","pdo-wrapper","php","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torres-developer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-15T23:37:40.000Z","updated_at":"2022-10-16T01:19:56.000Z","dependencies_parsed_at":"2023-02-02T22:40:14.168Z","dependency_job_id":null,"html_url":"https://github.com/torres-developer/PDOWrapperAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torres-developer%2FPDOWrapperAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torres-developer%2FPDOWrapperAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torres-developer%2FPDOWrapperAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torres-developer%2FPDOWrapperAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torres-developer","download_url":"https://codeload.github.com/torres-developer/PDOWrapperAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846975,"owners_count":20357297,"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","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":["composer","composer-library","composer-package","pdo","pdo-mysql","pdo-php","pdo-wrapper","php","php8"],"created_at":"2024-11-22T08:21:49.455Z","updated_at":"2025-03-16T08:44:57.966Z","avatar_url":"https://github.com/torres-developer.png","language":"PHP","readme":"# PDOWrapperAPI\r\nAn Wrapper API for the PHP PDO.\r\n\r\n# Basic Usage:\r\n\r\n```php\r\n\u003c?php\r\n\r\nrequire __DIR__ .\"/../vendor/autoload.php\";\r\n\r\n$dbh = new \\TorresDeveloper\\PdoWrapperAPI\\mysqlConnection(\r\n    new Core\\PDODataSourceName([\r\n        \"host\" =\u003e \"192.168.1.40\",\r\n        \"database\" =\u003e \"exampleDatabase\",\r\n    ], Core\\Credentials::getCredentials(\r\n        \"user\",\r\n        \"passwd\"\r\n    ))\r\n);\r\n\r\n/*\r\n * Use the CRUD interface for easy operations:\r\n * - select;\r\n * - insert;\r\n * - update;\r\n * - delete.\r\n */\r\n\r\n// get all from all users\r\n$dbh-\u003eselect(\"user\")-\u003efetchAll(PDO::FETCH_OBJ);\r\n// get all users `id`\r\n$dbh-\u003eselect(\"id\", \"user\")-\u003efetchAll(PDO::FETCH_OBJ);\r\n// get all users `name` and `age`\r\n$dbh-\u003eselect([\"name\", \"age\"], \"user\")-\u003efetchAll(PDO::FETCH_OBJ);\r\n\r\n// insert new users\r\n$users = [\r\n    [\"id\" =\u003e 123, \"name\" =\u003e \"asdfs\"],\r\n    [\"age\" =\u003e 2],\r\n    [\"id\" =\u003e null, \"text\" =\u003e \"y7tgebh\"]\r\n];\r\n$dbh-\u003einsert(\"user\", ...$users);\r\n\r\n/*\r\n * You can use a query builder for more complex operations:\r\n */\r\n$dbh-\u003egetBuider()-\u003eselect()\r\n    -\u003efrom(\"user\")\r\n    -\u003elimit(5)\r\n    -\u003erun()\r\n    -\u003efetchAll(\\PDO::FETCH_OBJ)\r\n```\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorres-developer%2Fpdowrapperapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorres-developer%2Fpdowrapperapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorres-developer%2Fpdowrapperapi/lists"}