{"id":26730303,"url":"https://github.com/oriiyx/bde","last_synced_at":"2026-04-13T20:02:26.101Z","repository":{"id":284418565,"uuid":"954878367","full_name":"oriiyx/bde","owner":"oriiyx","description":"Boring Database Engine","archived":false,"fork":false,"pushed_at":"2025-04-04T20:08:28.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T21:23:51.115Z","etag":null,"topics":["cli","cli-app","database-connector","php","php-database-connection"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/oriiyx.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":"2025-03-25T18:54:24.000Z","updated_at":"2025-04-04T20:08:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2dc38a1-90af-4ee0-9705-1b63cc35c4de","html_url":"https://github.com/oriiyx/bde","commit_stats":null,"previous_names":["oriiyx/bde"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oriiyx/bde","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriiyx%2Fbde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriiyx%2Fbde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriiyx%2Fbde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriiyx%2Fbde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oriiyx","download_url":"https://codeload.github.com/oriiyx/bde/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriiyx%2Fbde/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"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":["cli","cli-app","database-connector","php","php-database-connection"],"created_at":"2025-03-27T23:19:15.812Z","updated_at":"2026-04-13T20:02:26.096Z","avatar_url":"https://github.com/oriiyx.png","language":"Rust","readme":"# BDE (Boring Database Engine) - On Hold\n\n## Project Status: Development **Paused**\n\n# Boring Database Engine (BDE)\n\n\u003e A type-safe SQL toolkit for PHP built with Rust\n\n## About\n\nBoring Database Engine (BDE) is a code generator that transforms your SQL queries into type-safe PHP functions. Inspired\nby the Go-based SQLC project, BDE brings the same productivity and safety benefits to the PHP ecosystem.\n\nThe \"boring\" philosophy is intentional - database interactions should be predictable, reliable, and free from unexpected\nbehavior. BDE focuses on generating straightforward, maintainable code without unnecessary complexity.\n\n## Features\n\n- **Type-safe SQL**: Generate PHP functions with proper type signatures from your SQL queries\n- **Compile-time validation**: Catch SQL errors before runtime\n- **Performance**: Rust-powered parsing and code generation\n- **Minimal dependencies**: Clean, straightforward PHP output with no runtime dependencies\n- **MySQL support**: First-class support for MySQL (additional databases planned)\n\n## Getting Started\n\n```bash\n# Initialize a new project\nbde init\n\n# Generate code from your SQL files\nbde generate\n```\n\n## Example\n\nDefine your SQL schema:\n\n```sql\nCREATE TABLE users\n(\n    id         SERIAL PRIMARY KEY,\n    username   VARCHAR(255) NOT NULL UNIQUE,\n    email      VARCHAR(255) NOT NULL UNIQUE,\n    created_at TIMESTAMP    NOT NULL DEFAULT NOW()\n);\n```\n\nWrite your queries:\n\n```sql\n-- name: GetUserByID :one\nSELECT *\nFROM users\nWHERE id = $1;\n\n-- name: ListUsers :many\nSELECT *\nFROM users\nORDER BY created_at DESC;\n\n-- name: CreateUser :one\nINSERT INTO users (username, email)\nVALUES ($1, $2) RETURNING *;\n```\n\nBDE will generate type-safe PHP code:\n\n```php\n\u003c?php\n\nclass User\n{\n    public int $id;\n\n    public string $name;\n\n    public string $email;\n\n    public string $created_at;\n}\n\nclass Queries\n{\n    private \\PDO $pdo;\n\n    public function __construct(\\PDO $pdo)\n    {\n        $this-\u003epdo = $pdo;\n    }\n\n    public function getUserById(int $id): ?User\n    {\n        $stmt = $this-\u003epdo-\u003eprepare(\"SELECT * FROM users WHERE id = ?\");\n        $stmt-\u003eexecute([$id]);\n        $row = $stmt-\u003efetch(\\PDO::FETCH_ASSOC);\n\n        if (!$row) {\n            return null;\n        }\n\n        $user = new User();\n        $user-\u003eid = (int)$row['id'];\n        $user-\u003ename = $row['name'];\n        $user-\u003eemail = $row['email'];\n        $user-\u003ecreated_at = $row['created_at'];\n\n        return $user;\n    }\n\n    public function listUsers(): array\n    {\n        // Implementation generated by BDE\n    }\n\n    public function createUser(string $username, string $email): User\n    {\n        // Implementation generated by BDE\n    }\n}\n```\n\n## Status\n\nBDE is currently in development.\n\n## Contributing\n\nContributions are currently not welcomed.\n\n## License\n\nMIT\n\n## Author\n\nPeter Paravinja","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriiyx%2Fbde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foriiyx%2Fbde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriiyx%2Fbde/lists"}