{"id":20963876,"url":"https://github.com/codemix/php-orientdb","last_synced_at":"2025-05-14T09:31:56.988Z","repository":{"id":16701969,"uuid":"19458669","full_name":"codemix/php-orientdb","owner":"codemix","description":"A fast PHP driver for the OrientDB binary protocol.","archived":false,"fork":false,"pushed_at":"2014-05-21T23:39:01.000Z","size":548,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-05-23T06:10:17.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codemix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-05T14:29:54.000Z","updated_at":"2015-10-18T14:15:15.000Z","dependencies_parsed_at":"2022-09-09T20:30:58.030Z","dependency_job_id":null,"html_url":"https://github.com/codemix/php-orientdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fphp-orientdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fphp-orientdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fphp-orientdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fphp-orientdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemix","download_url":"https://codeload.github.com/codemix/php-orientdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225284597,"owners_count":17449933,"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","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":"2024-11-19T02:48:42.430Z","updated_at":"2024-11-19T02:48:42.946Z","avatar_url":"https://github.com/codemix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP-OrientDB\n\n[![Build Status](https://travis-ci.org/codemix/php-orientdb.svg?branch=master)](https://travis-ci.org/codemix/php-orientdb)\n\nA fast PHP driver for the OrientDB binary protocol.\n\n\n\u003e **status: alpha**\n\u003e This is work in progress, alpha quality software.\n\u003e Please [report any bugs](https://github.com/codemix/php-orientdb/issues) you find so that we can improve the library for everyone.\n\n## Usage\n\n### Configuring the client\n\n```php\n$client = new OrientDB\\Client([\n  'hostname' =\u003e 'localhost',\n  'port' =\u003e 2424,\n  'username' =\u003e 'root',\n  'password' =\u003e 'yourpassword'\n]);\n```\n\n### List the databases on the server.\n\n```php\nforeach($client-\u003egetDatabases() as $name =\u003e $db) {\n  echo $name, \"\u003cbr\u003e\";\n}\n```\n\n### Use a particular database\n\n```php\n$db = $client-\u003egetDatabases()-\u003emydatabase;\n```\n\n### Use a particular database, with custom credentials\n\n```php\n$db = $client-\u003egetDatabases()-\u003emydatabase;\n$db-\u003eusername = 'me';\n$db-\u003epassword = 'mypassword';\n```\n\n### Create a new database\n\n```php\n$db = $client-\u003egetDatabases()-\u003ecreate('mydatabase', 'plocal');\n```\n\n### Drop an existing database\n\n```php\n$client-\u003egetDatabases()-\u003edrop('mydatabase', 'plocal');\n```\n\n### Query builder: Insert record\n\n```php\n$record = $db-\u003einsert(['name' =\u003e 'Me'])-\u003einto('MyClass')-\u003eone();\n```\n\n### Query builder: Update record\n\n```php\n$db-\u003eupdate('MyClass')-\u003eset(['name' =\u003e 'Charles'])-\u003ewhere(['name' =\u003e 'Me'])-\u003eone();\n```\n\n### Query builder: Delete record\n\n```php\n$db-\u003edelete('MyClass')-\u003ewhere(['name' =\u003e 'Charles'])-\u003eone();\n```\n\n### Query builder: Select records\n\n```php\n$results = $db-\u003eselect('name')-\u003efrom('OUser')-\u003egroupBy('status')-\u003eall();\n```\n### Query builder: Select records with fetch plan.\n\n```php\n$results = $db-\u003eselect()-\u003efrom('OUser')-\u003ewhere(['status' =\u003e 'ACTIVE'])-\u003efetch(['roles' =\u003e 2])-\u003eall();\n```\n\n### Query builder: Select expression\n\n```php\n$totalUsers = $db-\u003eselect('count(*)')-\u003efrom('OUser')-\u003escalar();\n```\n\n### Query builder: Traverse records\n\n```php\n$rows = $db-\u003etraverse()-\u003efrom('OUser');\n```\n\n\n### List all the clusters in the database.\n\n```php\nforeach($db-\u003eclusters as $name =\u003e $cluster) {\n  echo 'Cluster '.$name.' has '.$cluster-\u003ecount().\" records.\\n\";\n}\n```\n\n### List all the classes in the database.\n\n```php\nforeach($db-\u003eclasses as $name =\u003e $class) {\n  echo $name.\"\\n\";\n}\n```\n\n\n# License\n\nMIT, see [LICENSE.md](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fphp-orientdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemix%2Fphp-orientdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fphp-orientdb/lists"}