{"id":20511506,"url":"https://github.com/thiiagoms/tbuilder","last_synced_at":"2025-08-04T06:39:39.750Z","repository":{"id":68608076,"uuid":"596621298","full_name":"thiiagoms/tbuilder","owner":"thiiagoms","description":":elephant: :construction_worker: TBuilder is a database query builder library for PHP. It provides a fluent and intuitive interface for constructing SQL queries, making database interactions easier and more efficient. ","archived":false,"fork":false,"pushed_at":"2023-05-21T18:19:14.000Z","size":36,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T22:44:32.264Z","etag":null,"topics":["database-management","php","php-query-builder","querybuilder"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiiagoms.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}},"created_at":"2023-02-02T15:30:19.000Z","updated_at":"2023-05-23T03:13:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ca3e042-0495-4046-8b42-15a73852c5e0","html_url":"https://github.com/thiiagoms/tbuilder","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"6963e625159e9f6f0be620538fe946f6fb1ecc41"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thiiagoms/tbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiiagoms%2Ftbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiiagoms%2Ftbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiiagoms%2Ftbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiiagoms%2Ftbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiiagoms","download_url":"https://codeload.github.com/thiiagoms/tbuilder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiiagoms%2Ftbuilder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268658604,"owners_count":24285719,"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-08-04T02:00:09.867Z","response_time":79,"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":["database-management","php","php-query-builder","querybuilder"],"created_at":"2024-11-15T20:36:11.829Z","updated_at":"2025-08-04T06:39:39.728Z","avatar_url":"https://github.com/thiiagoms.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/thiiagoms/tbuilder\"\u003e\n    \u003cimg src=\"assets/t.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n     \u003ch3 align=\"center\"\u003eTBuilder - Database querybuilder :student:\u003c/h3\u003e\n\u003c/p\u003e\n\nSimple database querybuilder\n\n- [Dependencies](#Dependencies)\n- [Install](#Install)\n- [Use](#Use)\n\n### Dependencies\n- +PHP8.2\n- Composer\n\n### Install :package:\n\n01 - Install package with composer\n```composer log\n$ composer require thiiagoms/tbuilder\n```\n\n### Use\n01 - Call `TBuilder\\QueryBuilder` and pass your database credentials\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nif (php_sapi_name() !== 'cli') {\n    echo '\u003ch1\u003eOnly in CLI mode\u003c/h1\u003e';\n    exit;\n}\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse TBuilder\\Database\\QueryBuilder;\n\n$queryBuilder = new QueryBuilder('localhost', 3306, 'tbuilder', 'root', '');\n\n// Select\n$result = $queryBuilder-\u003eselect('user', 'id, name, email');\nforeach ($result as $person) {\n    echo \"\\nId: {$person['id']}\\nName: {$person['name']}\\nE-mail: {$person['email']}\\n\";\n}\n\n// Insert\n$payload = ['name' =\u003e 'Person example', 'email' =\u003e 'person.per@example.com'];\n$id = $queryBuilder-\u003einsert('user', $payload);\n\necho \"\\nLast insert id {$id} \\n\";\n\n// Update\n$result = $queryBuilder-\u003eupdate('user', 'id = 1', ['name' =\u003e \"TBuilder Test\"]);\nprint_r($result); // true or false\n\n// Delete\n$result = $queryBuilder-\u003edelete('user', 'id = 1');\nprint_r($result); // true or false\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiiagoms%2Ftbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiiagoms%2Ftbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiiagoms%2Ftbuilder/lists"}