{"id":30666844,"url":"https://github.com/alpha-orm/php-alpha-orm","last_synced_at":"2025-08-31T22:20:43.270Z","repository":{"id":56946286,"uuid":"220972938","full_name":"alpha-orm/php-alpha-orm","owner":"alpha-orm","description":"php database orm","archived":false,"fork":false,"pushed_at":"2020-02-21T14:59:21.000Z","size":31,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T17:02:12.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/alpha-orm/alpha-orm","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/alpha-orm.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}},"created_at":"2019-11-11T12:06:37.000Z","updated_at":"2020-04-12T23:23:35.000Z","dependencies_parsed_at":"2022-08-21T07:20:52.369Z","dependency_job_id":null,"html_url":"https://github.com/alpha-orm/php-alpha-orm","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/alpha-orm/php-alpha-orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-orm%2Fphp-alpha-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-orm%2Fphp-alpha-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-orm%2Fphp-alpha-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-orm%2Fphp-alpha-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha-orm","download_url":"https://codeload.github.com/alpha-orm/php-alpha-orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-orm%2Fphp-alpha-orm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273048142,"owners_count":25036501,"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-31T02:00:09.071Z","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":[],"created_at":"2025-08-31T22:20:41.557Z","updated_at":"2025-08-31T22:20:43.265Z","avatar_url":"https://github.com/alpha-orm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alpha-orm\nAn extraordinary python database orm\n\n## Features\n* Automatically creates tables and columns\n* No configuration required, simply create database\n* Currently supported databases include mysql\n\n\n## Examples\n#\n### Setup (MySQL)\n```php\nuse ALphaORM\\ALphaORM as DB\n\nDB::setup('mysql',[\n  'host' =\u003e 'localhost',\n  'user' =\u003e 'root',\n  'password' =\u003e '',\n  'database' =\u003e 'alphaorm'\n]);\n```\n#\n#\n### CREATE\n```php\n#--------------------------------------\n#\tCREATE 1\n#--------------------------------------\n$product = DB::create('product');\n$product-\u003ename = 'Running shoes';\n$product-\u003eprice = 5000;\nDB::store($product);\n\n\n\n\n#--------------------------------------\n#\tCREATE 2\n#--------------------------------------\n$author = DB::create('author');\n$author-\u003ename = 'Chimamanda Adichie';\n\n$book = DB::create('book');\n$book-\u003etitle = 'Purple Hibiscus';\n$book-\u003eauthor = $author;\nDB::store($book);\n```\n#\n### READ\n```php\n#--------------------------------------\n#\tREAD 1 [get all records]\n#--------------------------------------\n$books = DB::getAll('book');\nforeach ($books as $book) {\n\tprint(\"{$book-\u003etitle} by {$book-\u003eauthor-\u003ename}\");\n}\n\n\n\n\n#--------------------------------------\n#\tREAD 2 [filter one]\n#--------------------------------------\n$book = DB::find('book','id = :bid', [ 'bid' =\u003e 1 ]);\nprint(\"{$book-\u003etitle} by {$book-\u003eauthor-\u003ename}\");\n\n\n\n\n#--------------------------------------\n#\tREAD 3 [filter all]\n#--------------------------------------\n$author = DB::find('author','name = :authorName',[ 'authorName' =\u003e 'William Shakespare' ]);\n$booksByShakespare = DB::findAll('book', 'author_id = :authorId', [ 'authorId' =\u003e $author-\u003egetID() ]);\nprint('Books by William Shakespare are :');\nforeach ($booksByShakespare as $book) {\n\tprint($book-\u003etitle);\n}\n```\n#\n### UPDATE\n\n```php\n\n#--------------------------------------\n#\tUPDATE\n#--------------------------------------\n$product = DB::find('product', 'id = :pid', [ 'pid' =\u003e 1 ]);\n$product-\u003eprice = 500;\n\n$book = DB::find('book','id = :bid', [ 'bid' =\u003e 1 ]);\n$book-\u003eauthor-\u003ename = 'New author';\n$book-\u003eisbn = '3847302-SD';\n$book-\u003etitle = 'New Title';\nDB::store($book);\nprint($book);\n```\n#\n### DELETE\n```php\n#--------------------------------------\n#\tDELETE 1 [delete single record]\n#--------------------------------------\n$book = DB::find('book','id = :bid', [ 'bid' =\u003e 1 ]);\nDB::drop($book);\n\n\n\n\n#--------------------------------------\n#\tDELETE 2 [delete all records]\n#--------------------------------------\nDB::dropAll('book');\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha-orm%2Fphp-alpha-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha-orm%2Fphp-alpha-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha-orm%2Fphp-alpha-orm/lists"}