SequoiaLob Class. To get this Class object must be call SequoiaCL::openLob.
Close lob.
- Returns
- Returns the result, default return array.
- Return values
-
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
$err = $lobObj ->
close() ;
if( $err['errno'] != 0 ) {
echo "Failed to close lob, error code: ".$err['errno'] ;
return ;
}
SequoiaLob::getCreateTime |
( |
| ) |
|
Get the lob create time (millisecond).
- Returns
- Returns the create time.
- Return values
-
integer|SequoiaINT64 | millisecond |
Example:
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to get lob create time, error code: ".$err['errno'] ;
return ;
}
echo "Lob create time is: ".$times ;
SequoiaLob::getModificationTime |
( |
| ) |
|
Get the lob last modification time (millisecond).
- Returns
- Returns the create time.
- Return values
-
integer|SequoiaINT64 | millisecond |
Example:
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to get lob modification time, error code: ".$err['errno'] ;
return ;
}
echo "Lob modification time is: ".$times ;
SequoiaLob::getRunTimeDetail |
( |
| ) |
|
Get the run time detail information of lob.
- Returns
- Returns the run time detail information of lob, default return array.
- Return values
-
Example:
if ( empty( $detail ) )
{
$err = $db -> getLastErrorMsg() ;
echo "Failed to get run time detail, error code: ".$err['errno'] ;
return ;
}
var_dump( $detail ) ;
Get the lob size.
- Returns
- Returns the number of lob size.
- Return values
-
integer|SequoiaINT64 | lob size |
Example:
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to get lob size, error code: ".$err['errno'] ;
return ;
}
echo "Lob size is: ".$lobSize ;
Check whether current offset has reached to the max size of current lob.
- Returns
- Returns the result.
- Return values
-
Example:
if( $err['errno'] != 0 ) {
echo "Failed to call seek, error code: ".$err['errno'] ;
return ;
}
$result = $lobObj ->
isEof() ;
var_dump ( $result ) ;
Lock LOB section for write mode.
- Parameters
-
$offset | an integer or the SequoiaINT64 object argument. The lock start position. |
$length | an integer or the SequoiaINT64 object argument. The lock length, -1 means lock to the end of lob. |
- Returns
- Returns the result, default return array.
- Return values
-
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
$err = $lobObj ->
lock( 10, 100 ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call lock, error code: ".$err['errno'] ;
return ;
}
Lock LOB section for write mode and seek to the offset position.
- Parameters
-
$offset | an integer or the SequoiaINT64 object argument. The lock start position. |
$length | an integer or the SequoiaINT64 object argument. The lock length, -1 means lock to the end of lob. |
- Returns
- Returns the result, default return array.
- Return values
-
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
if( $err['errno'] != 0 ) {
echo "Failed to call lockAndSeek, error code: ".$err['errno'] ;
return ;
}
Read lob.
- Parameters
-
$length | an integer or the SequoiaINT64 object argument. The length want to read. |
- Returns
- Returns the string of read.
- Return values
-
Example:
$buffer = $lobObj ->
read( 5 ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to read lob, error code: ".$err['errno'] ;
return ;
}
Seek the place to read or write.
- Parameters
-
$offset | an integer or the SequoiaINT64 object argument. Lob offset position. |
$whence | an integer argument. Where to start position.
SDB_LOB_CUR : Set position to current location plus offset.
SDB_LOB_END : Set position to end of lob plus offset.
|
- Returns
- Returns the result, default return array.
- Return values
-
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
if( $err['errno'] != 0 ) {
echo "Failed to call seek, error code: ".$err['errno'] ;
return ;
}
SequoiaLob::write |
( |
string |
$buffer | ) |
|
Write lob.
- Parameters
-
$buffer | the string argument. The buffer of write. |
- Returns
- Returns the result, default return array.
- Return values
-
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
$err = $lobObj ->
write(
'hello' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to write lob, error code: ".$err['errno'] ;
return ;
}
const SequoiaLob::SDB_LOB_CUR 1 |
Set position to current location plus offset.
const SequoiaLob::SDB_LOB_END 2 |
Set position to end of lob plus offset.
const SequoiaLob::SDB_LOB_SET 0 |
Set position equal to offset bytes.
The documentation for this class was generated from the following file: