Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sgpatil/orientdb-php

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

388 Commits
388 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orientdb-php

Author: Sumit Patil sgpatil.2803@gmail.com
Copyright (c) 2014-2015

PHP Wrapper for the Orientdb graph database REST interface

Installation

Add the package to your composer.json

{
    "require": {
        "sgpatil/orientdb-php": "dev-master"
    }
}

Connection

$client = new Sgpatil\Orientphp\Client(<server>, <port>, <database_name>);

$client->getTransport()
       ->setAuth(<database_user_name>, <database_password>);

If you are using default configuration then the code should be

$client = new Sgpatil\Orientphp\Client("localhost", 2480, <database_name>);

$client->getTransport()
       ->setAuth('root', 'root');

To check database connection.

print_r($client->getServerInfo());

This will display server information.


Create Class

 $user = $client->makeClass("User", function($property){
        $property->string("name");
        $property->integer("age");
        $property->timestamp("datetime");
    })->save();

Supporting Datatype

Commands
$property->short('<field_name>');
$property->integer('<field_name>');
$property->long('<field_name>');

|
|$property->byte('<field_name>'); |$property->boolean('<field_name>'); |
|$property->float('<field_name>'); |$property->double('<field_name>'); |
|$property->datetime('<field_name>'); |$property->date('<field_name>'); |$property->timestamp('<field_name>'); |
|$property->string('<field_name>'); |$property->binary('<field_name>'); |
|$property->embedded('<field_name>'); |$property->embeddedlist('<field_name>'); |$property->embeddedset('<field_name>'); |
|$property->link('<field_name>'); |$property->linklist('<field_name>'); |$property->linkset('<field_name>'); |$property->linkmap('<field_name>'); |$property->linkbag('<field_name>'); |
|$property->custom('<field_name>'); |$property->any('<field_name>');

About

PHP Wrapper for the Orientdb graph database REST interface

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.