irm-1.6-b3/MDB/pgsql.php
/**
     * Convert a text value into a DBMS specific format that is suitable to
     * compose query statements.
     *
     * @param resource  $prepared_query query handle from prepare()
     * @param           $parameter
     * @param           $lob
     * @return string text string that represents the given argument value in
     *      a DBMS specific format.
     * @access private
     */
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

@param resource  $prepared_query query handle from prepare()
@param           $parameter
@param           $lob
@return string text string that represents the given argument value in
a DBMS specific format.
@access private
Convert a text value into a DBMS specific format that is suitable to compose query statements . @param resource $prepared_query query handle from prepare () @param $parameter @param $lob @return string text string that represents the given argument value in a DBMS specific format . @access private
function _getLobValue($prepared_query, $parameter, $lob)
    {
        $connect = $this->connect();
        if (MDB::isError($connect)) {
            return($connect);
        }
        if ($this->auto_commit && !@pg_exec($this->connection, 'BEGIN')) {
            return($this->raiseError(MDB_ERROR, NULL, NULL,
                '_getLobValue: error starting transaction'));
        }
        if (($lo = @pg_locreate($this->connection))) {
            if (($handle = @pg_loopen($this->connection, $lo, 'w'))) {
                while (!$this->endOfLob($lob)) {
                    $result = $this->readLob($lob, $data, $this->options['lob_buffer_length']);
                    if (MDB::isError($result)) {
                        break;
                    }
                    if (!@pg_lowrite($handle, $data)) {
                        $result = $this->raiseError(MDB_ERROR, NULL, NULL,
                            'Get LOB field value: ' . @pg_errormessage($this->connection));
                        break;
                    }
                }
                @pg_loclose($handle);
                if (!MDB::isError($result)) {
                    $value = strval($lo);
                }
            } else {
                $result = $this->raiseError(MDB_ERROR, NULL, NULL,
                    'Get LOB field value: ' . @pg_errormessage($this->connection));
            }
            if (MDB::isError($result)) {
                $result = @pg_lounlink($this->connection, $lo);
            }
        } else {
            $result = $this->raiseError(MDB_ERROR, NULL, NULL, 'Get LOB field value: ' . pg_ErrorMessage($this->connection));
        }
        if ($this->auto_commit) {
            @pg_exec($this->connection, 'END');
        }
        if (MDB::isError($result)) {
            return($result);
        }
        return($value);
    }
function _getLobValue ( $ prepared_query , $ parameter , $ lob ) { $ connect = $ this -> connect ( ) ; if ( MDB :: isError ( $ connect ) ) { return ( $ connect ) ; } if ( $ this -> auto_commit && ! @ pg_exec ( $ this -> connection , 'BEGIN' ) ) { return ( $ this -> raiseError ( MDB_ERROR , NULL , NULL , '_getLobValue: error starting transaction' ) ) ; } if ( ( $ lo = @ pg_locreate ( $ this -> connection ) ) ) { if ( ( $ handle = @ pg_loopen ( $ this -> connection , $ lo , 'w' ) ) ) { while ( ! $ this -> endOfLob ( $ lob ) ) { $ result = $ this -> readLob ( $ lob , $ data , $ this -> options [ 'lob_buffer_length' ] ) ; if ( MDB :: isError ( $ result ) ) { break ; } if ( ! @ pg_lowrite ( $ handle , $ data ) ) { $ result = $ this -> raiseError ( MDB_ERROR , NULL , NULL , 'Get LOB field value: ' . @ pg_errormessage ( $ this -> connection ) ) ; break ; } } @ pg_loclose ( $ handle ) ; if ( ! MDB :: isError ( $ result ) ) { $ value = strval ( $ lo ) ; } } else { $ result = $ this -> raiseError ( MDB_ERROR , NULL , NULL , 'Get LOB field value: ' . @ pg_errormessage ( $ this -> connection ) ) ; } if ( MDB :: isError ( $ result ) ) { $ result = @ pg_lounlink ( $ this -> connection , $ lo ) ; } } else { $ result = $ this -> raiseError ( MDB_ERROR , NULL , NULL , 'Get LOB field value: ' . pg_ErrorMessage ( $ this -> connection ) ) ; } if ( $ this -> auto_commit ) { @ pg_exec ( $ this -> connection , 'END' ) ; } if ( MDB :: isError ( $ result ) ) { return ( $ result ) ; } return ( $ value ) ; }
Convert a text value into a DBMS specific format that is suitable to
 compose query statements.
Convert a text value into a DBMS specific format that is suitable to compose query statements .