{"id":16673923,"url":"https://github.com/sensorario/orma","last_synced_at":"2026-03-13T20:36:41.260Z","repository":{"id":171102922,"uuid":"647448735","full_name":"sensorario/orma","owner":"sensorario","description":"An orm made just for study scope","archived":false,"fork":false,"pushed_at":"2023-06-03T09:44:56.000Z","size":52,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-17T20:55:57.610Z","etag":null,"topics":["orm","php-project","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sensorario.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-05-30T20:06:08.000Z","updated_at":"2023-06-06T13:30:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b0a27c7-b93d-452c-86dc-f8a5392e1a09","html_url":"https://github.com/sensorario/orma","commit_stats":null,"previous_names":["sensorario/orma"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sensorario/orma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Forma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Forma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Forma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Forma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensorario","download_url":"https://codeload.github.com/sensorario/orma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Forma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30474935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"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":["orm","php-project","php8"],"created_at":"2024-10-12T12:28:44.802Z","updated_at":"2026-03-13T20:36:41.238Z","avatar_url":"https://github.com/sensorario.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ORMA\n\n - you can create tables\n - add columns\n - CRUD operations\n - designed for sqlite or postgresql\n\n## install\n\n```\ncomposer require sensorario/orma\n```\n\nCopy `vendor/sensorario/orma/public/index.php` on your project root.\nSQLite does not require any installation. Postgres can be used with docker: `vendor/sensorario/orma/docker-compose.yaml`.\n\nHappy coding\n\n## pdo\n\nPostgres data refers to docker machine inside the project.\n\n```php\n$config = [\n    'postgresql' =\u003e [\n        'dns' =\u003e 'pgsql:host=database;dbname=your_database_name',\n        'username' =\u003e 'your_username',\n        'password' =\u003e 'your_password',\n    ],\n    'sqlite' =\u003e [\n        'dns' =\u003e 'sqlite:./erdatabase',\n    ],\n    'db' =\u003e 'postgresql',\n    'db' =\u003e 'sqlite',\n];\n\n$pdo = new PDO(\n    $config[$config['db']]['dns'],\n    $config[$config['db']]['username'],\n    $config[$config['db']]['password'],\n);\n```\n\n## init\n\n```php\n$orma = new Orma($pdo, match($driver) {\n    'sqlite' =\u003e new SQLiteDriver,\n    'postgresql' =\u003e new PostgreSQLDriver,\n});\n```\n\n## create a table\n\n```php\n$orma($table)-\u003ecreateTable();\n```\n\n## add a column\n\n```php\n$orma-\u003eaddColumn($column);\n```\n## insert\n\n```php\n$orma-\u003einsert([ 'id' =\u003e 42, ]);\n```\n## delete\n\n```php\n$orma-\u003edelete([ 'id' =\u003e 42, ]);\n```\n\n## update\n\n```php\n$orma-\u003eupdate([ 'foo' =\u003e 'bar', ], [ 'id' =\u003e 42, ]);\n```\n\nPS. This repo is made just for fun. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Forma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensorario%2Forma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Forma/lists"}