https://github.com/nebula-contrib/nebula-php
NebulaGraph php SDK/Client
https://github.com/nebula-contrib/nebula-php
graphdatabase nebulagraph php
Last synced: 8 months ago
JSON representation
NebulaGraph php SDK/Client
- Host: GitHub
- URL: https://github.com/nebula-contrib/nebula-php
- Owner: nebula-contrib
- Created: 2021-12-08T10:15:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-28T08:17:27.000Z (about 4 years ago)
- Last Synced: 2025-05-14T04:54:17.405Z (9 months ago)
- Topics: graphdatabase, nebulagraph, php
- Language: PHP
- Homepage:
- Size: 186 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
## Nebula-PHP







Nebula PHP client.
## Install with Composer
[https://packagist.org/packages/vesoft-inc/nebula-php](https://packagist.org/packages/vesoft-inc/nebula-php)
```shell
composer require vesoft-inc/nebula-php
```
## Quick Start
```php
authenticate("root", "1212");
$create = "CREATE SPACE IF NOT EXISTS test(vid_type=FIXED_STRING(30));";
$create .= "USE test;";
$create .= "CREATE TAG IF NOT EXISTS person(name string, age int);";
$create .= "CREATE EDGE like (likeness double);";
$client->execute($create);
sleep(10);
$client->execute('INSERT VERTEX person(name, age) VALUES "Bob":("Bob", 10), "Lily":("Lily", 9)');
$client->execute('INSERT EDGE like(likeness) VALUES "Bob"->"Lily":(80.0);');
$client->execute('FETCH PROP ON person "Bob" YIELD vertex as node');
$client->execute('FETCH PROP ON like "Bob"->"Lily" YIELD edge as e');
$client->execute('DROP SPACE test');
```
## License
Nebula PHP is under Apache2.0 license.