-
Notifications
You must be signed in to change notification settings - Fork 13
PhpOrient Protocols Binary Operations RecordUpdate
RECORD UPDATE
Update a record. Returns the new record's version. Request: (cluster-id:short)(cluster-position:long) (update-content:boolean)(record-content:bytes)(record-version:int) (record-type:byte)(mode:byte) Response: (record-version:int)(count-of-collection-changes) [(uuid-most-sig-bits:long)(uuid-least-sig-bits:long)(updated-file-id:long) (updated-page-index:long)(updated-page-offset:int)]*
Where record-type is: 'b': raw bytes 'f': flat data 'd': document
and record-version policy is: '-1': Document update, version increment, no version control. '-2': Document update, no version control nor increment. '-3': Used internal in transaction rollback (version decrement). '>-1': Standard document update (version control).
and mode is: 0 = synchronous (default mode waits for the answer) 1 = asynchronous (don't need an answer)
and update-content is: true - content of record has been changed and content should be updated in storage false - the record was modified but its own content has not been changed. So related collections (e.g. rig-bags) have to be updated, but record version and content should not be.
The last part of response is referred to RidBag management. Take a look at the main page for more details.
- Class name: RecordUpdate
- Namespace: PhpOrient\Protocols\Binary\Operations
- Parent class: PhpOrient\Protocols\Binary\Abstracts\Operation
protected integer $opCode
- Visibility: protected
public \PhpOrient\Protocols\Binary\Data\Record $record
- Visibility: public
public integer $cluster_id
- Visibility: public
public integer $cluster_position
- Visibility: public
public \PhpOrient\Protocols\Binary\Data\ID $rid
Instance of record ID, instead of manually set cluster_id and cluster_position separately
- Visibility: public
public integer $mode
- Visibility: public
public string $record_type = \PhpOrient\Protocols\Common\Constants::RECORD_TYPE_DOCUMENT
- Visibility: public
public integer $record_version = -1
- Visibility: public
public integer $record_version_policy = -1
- Visibility: public
public boolean $update_content = true
True: content of record has been changed and content should be updated in storage False: the record was modified but its own content has not been changed.
So related collections (e.g. rid-bags) have to be updated, but record version and content should not be. NOT USED before protocol 23
- Visibility: public
protected \PhpOrient\Protocols\Binary\OrientSocket $_socket
- Visibility: protected
protected array $_writeStack = array()
Stack of elements to compile
- Visibility: protected
protected string $_input_buffer
- Visibility: protected
protected string $_output_buffer
- Visibility: protected
protected \PhpOrient\Protocols\Binary\SocketTransport $_transport
- Visibility: protected
public \Closure $_callback
- Visibility: public
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_write()
- Visibility: protected
- This method is abstract.
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_read()
- Visibility: protected
- This method is abstract.
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::__construct(\PhpOrient\Protocols\Binary\SocketTransport $_transport)
- Visibility: public
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $_transport PhpOrient\Protocols\Binary\SocketTransport
null|void PhpOrient\Protocols\Binary\Abstracts\Operation::_checkConditions(\PhpOrient\Protocols\Binary\SocketTransport $transport)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $transport PhpOrient\Protocols\Binary\SocketTransport
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeHeader()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_readHeader()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
\PhpOrient\Protocols\Binary\Abstracts\Operation PhpOrient\Protocols\Binary\Abstracts\Operation::prepare()
- Visibility: public
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
\PhpOrient\Protocols\Binary\Abstracts\Operation PhpOrient\Protocols\Binary\Abstracts\Operation::send()
- Visibility: public
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_dump_streams()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::getResponse()
- Visibility: public
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeByte(integer $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value integer
integer PhpOrient\Protocols\Binary\Abstracts\Operation::_readByte()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeChar(string $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value string
integer PhpOrient\Protocols\Binary\Abstracts\Operation::_readChar()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeBoolean(boolean $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value boolean
boolean PhpOrient\Protocols\Binary\Abstracts\Operation::_readBoolean()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeShort(integer $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value integer
integer PhpOrient\Protocols\Binary\Abstracts\Operation::_readShort()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeInt(integer $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value integer
integer PhpOrient\Protocols\Binary\Abstracts\Operation::_readInt()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeLong(integer $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value integer
integer PhpOrient\Protocols\Binary\Abstracts\Operation::_readLong()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeString(string $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value string
string|null PhpOrient\Protocols\Binary\Abstracts\Operation::_readString()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_writeBytes(string $value)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $value string
string|null PhpOrient\Protocols\Binary\Abstracts\Operation::_readBytes()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
\PhpOrient\Exceptions\PhpOrientException PhpOrient\Protocols\Binary\Abstracts\Operation::_readError()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
mixed PhpOrient\Protocols\Binary\Abstracts\Operation::_readSerialized()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
array PhpOrient\Protocols\Binary\Abstracts\Operation::_readRecord()
record with its content.
In case of null record then -2 as short is passed.
In case of RID -3 is passes as short and then the RID: (-3:short)(cluster-id:short)(cluster-position:long).
In case of record: (0:short)(record-type:byte)(cluster-id:short) (cluster-position:long)(record-version:int)(record-content:bytes)
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
array<mixed,\PhpOrient\Protocols\Binary\Data\Record> PhpOrient\Protocols\Binary\Abstracts\Operation::_read_prefetch_record()
- Visibility: protected
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
array|null PhpOrient\Protocols\Binary\Abstracts\Operation::_read_sync()
- Visibility: public
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
\PhpOrient\Protocols\Common\ConfigurableInterface PhpOrient\Protocols\Common\ConfigurableInterface::configure(array $options)
- Visibility: public
- This method is defined by PhpOrient\Protocols\Common\ConfigurableInterface
- $options array
The options for the object.
static PhpOrient\Protocols\Binary\Abstracts\Operation::fromConfig(array $options)
- Visibility: public
- This method is static.
- This method is defined by PhpOrient\Protocols\Binary\Abstracts\Operation
- $options array
The options for the newly created class instance.