Skip to content

pyorient commands API

mogui edited this page Jun 4, 2012 · 1 revision

The object OrientDB implements the following methods from the c library.
Every optional parameter can be called as a keyword argument

connect(host, port, user, passwd)

returns: int --> connection id
executed on object int

shutdown()

returns: int --> status of operation take down the server

dbcreate(dbname )

returns: int --> status of operation status

dbexists(dbname )

returns: bool --> status of operation

dbdelete(dbname )

returns: int --> status of operation

close()

returns: int --> status of operation

dbopen(dbname [,user, password])

returns: int --> status of operation

dbsize()

returns: int --> size in byte

dbreload()

returns: int --> status of operation

dbcountrecords()

returns: int --> number of record

dbclose()

returns: int --> status of operation

datacclusteradd(clustertype, clustername, clusterfilename [, initial_size])

returns: int --> cluster id

datacclustercount(cluster_id )

returns: int --> number of records in cluster

datacclusterremove(cluster_id )

returns: int --> status of operation

datacclusterdatarange(cluster_id )

returns: tuple --> the start and end position of the cluster

command(query[,limit, command_type, fetchplan ])

returns: list --> list of OrientRecord

recordload(cluster_id, custer_position [,fetchplan])

returns: OrientRecord --> loaded record

recordcreate(cluster_id, record )

returns: int --> status of operation