{"id":50022934,"url":"https://github.com/yossef-ashraf/quickorm","last_synced_at":"2026-06-12T04:31:40.009Z","repository":{"id":245506746,"uuid":"818451081","full_name":"yossef-ashraf/QuickORM","owner":"yossef-ashraf","description":"ORM (Object-Relational Mapping) is used to manage and interact with the database in a convenient and efficient way","archived":false,"fork":false,"pushed_at":"2025-04-04T01:41:14.000Z","size":22972,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-20T11:44:47.307Z","etag":null,"topics":["orm","php","sql"],"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/yossef-ashraf.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":"2024-06-21T22:21:08.000Z","updated_at":"2025-04-04T01:39:47.000Z","dependencies_parsed_at":"2024-09-15T16:44:21.575Z","dependency_job_id":null,"html_url":"https://github.com/yossef-ashraf/QuickORM","commit_stats":null,"previous_names":["yossef-ashraf/orm","yossef-ashraf/quickorm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yossef-ashraf/QuickORM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yossef-ashraf%2FQuickORM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yossef-ashraf%2FQuickORM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yossef-ashraf%2FQuickORM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yossef-ashraf%2FQuickORM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yossef-ashraf","download_url":"https://codeload.github.com/yossef-ashraf/QuickORM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yossef-ashraf%2FQuickORM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["orm","php","sql"],"created_at":"2026-05-20T09:06:22.041Z","updated_at":"2026-06-12T04:31:40.001Z","avatar_url":"https://github.com/yossef-ashraf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db/orm\n\nThis repository contains a project that leverages ORM (Object-Relational Mapping) technology to manage and interact with databases in a convenient and efficient manner. The project demonstrates how to use ORM to manipulate databases through code without needing to write SQL queries directly.\n\n## Features\n\n- **Simple API:** Easily manipulate databases using objects and classes.\n- **Full CRUD Support:** Insert, read, update, and delete data effortlessly.\n- **Dynamic Queries:** Build SQL queries dynamically with `QueryBuilder`.\n- **Relationship Management:** Handle relationships between tables, including one-to-one, one-to-many, and many-to-many.\n- **Database Compatibility:** Works with most relational databases supported by PDO.\n\n## Installation\n\nTo install `quickhelper/quickorm` via Composer, run the following command in your project directory:\n\n```bash\ncomposer require quickhelper/quickorm\n```\n\n## Basic Usage\n\n### Setting up a Database Connection\n\nConfigure the database connection settings in your configuration in config/database.php ;\n\n### Creating a Model\n\nCreate a model that represents a table in your database:\n\n```php\nuse QuickORM\\Model;\n\nclass User extends Model\n{\n    protected $table = 'users';\n}\n```\n\n### CRUD Operations\n\n- **Insert a New Record:**\n\n```php\n$user = new User();\n$user-\u003ename = 'John Doe';\n$user-\u003eemail = 'john@example.com';\n$user-\u003esave();\n```\n\n- **Read a Record:**\n\n```php\n$user = User::find(1);\necho $user-\u003ename;\n```\n\n- **Update a Record:**\n\n```php\n$user = User::find(1);\n$user-\u003ename = 'Jane Doe';\n$user-\u003esave();\n```\n\n- **Delete a Record:**\n\n```php\n$user = User::find(1);\n$user-\u003edelete();\n```\n\n### Custom Queries\n\nUse `QueryBuilder` to create custom SQL queries:\n\n```php\nuse QuickORM\\QueryBuilder;\n\n$results = QueryBuilder::table('users')\n    -\u003ewhere('age', '\u003e', 30)\n    -\u003eget();\n```\n\n### Relationship Management\n\nDefine relationships between models:\n\n```php\nclass Post extends Model\n{\n    protected $table = 'posts';\n\n    public function user()\n    {\n        return $this-\u003ebelongsTo(User::class);\n    }\n}\n\nclass User extends Model\n{\n    protected $table = 'users';\n\n    public function posts()\n    {\n        return $this-\u003ehasMany(Post::class);\n    }\n}\n```\n\n## Contents\n\n- **Introduction to ORM**\n- **Practical Examples**\n  - Creating objects and storing them in the database\n  - Retrieving data from the database\n  - Updating existing data\n  - Deleting data\n- **Best Practices**\n\n## Project Advantages\n\n- Provides a convenient way to interact with databases.\n- Facilitates the process of managing software data.\n- Reduces errors caused by manual SQL queries.\n- Improves the efficiency and performance of applications.\n\n## How to Use\n\n1. **Clone the Repository:**\n\n    ```bash\n    git clone https://github.com/yossef-ashraf/QuickORM.git\n    ```\n\n2. **Environment Setup:**\n   Prepare your programming environment and install all required dependencies.\n\n3. **Running Examples:**\n   Execute the examples included in the project to understand how to use the ORM.\n\n## Contribution\n\nWe welcome contributions to enhance this project. If you would like to participate, please:\n\n- Open an [Issue](https://github.com/yossef-ashraf/QuickORM/issues) for any questions or feedback.\n- Submit a [Pull Request](https://github.com/yossef-ashraf/QuickORM/pulls) with your improvements.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\nBest regards,  \n[Yossef Ashraf](https://github.com/yossef-ashraf)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyossef-ashraf%2Fquickorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyossef-ashraf%2Fquickorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyossef-ashraf%2Fquickorm/lists"}